Again: Minimize button

HARRY

Active Member
Licensed User
Longtime User
In a complex program I want to minimize the main form and I don't get it done.

To isolate the problem, I have written a most simple test program as follows:

Sub App_Start
Form1.show
flb1.New1("Form1" ,B4PObject(1))
flb1.FullScreen2(False,False)
flb1.MinimizeBox=True
End Sub

On the PC it runs very well, a minimize button is added and clicking on it the form is minimized.

However on the device the button stays an X and the behaviour is still closing the application.

I must be overlooking something, but what?

Harry
 

derez

Expert
Licensed User
Longtime User
From the help on Form:

The first form that is shown will be the main form.
Program ends when the user closes the main form (or using AppClose).
When closing non main forms the forms actually hide and can be visible again using Form.Show

I understand that what happens to you is because the form you are trying to minimize is the main form, the first form that the program shows.

A workaround - call another form first (the form that you want to show after you minimize ) and immediately the form you want to show.

If the form is the only one, and you want to minimize the program - use notifyicon.dll
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
However on the device the button stays an X and the behaviour is still closing the application.

I must be overlooking something, but what?

The 'X'-button IS the minimize button on the device!

Standard is the 'Ok' button which closes the form. With MinimizeBox=True you set it to the 'X'-button and the form will be minimized.

Be aware that many task managers change the function of the 'X' button to a real close button. If you use such task manager it may have a function to put your application on an exclusion list.

Greetings,
Markus
 

HARRY

Active Member
Licensed User
Longtime User
Thanks for your remarks, I solved my 'problem' with ShowTodayScreen from the Hardware library.

Harry
 

Skrobel

Member
Licensed User
Is there any way to acutally minimize the main form via runtime instead of minimize button? I want my app to hide in background in a Timer.Tick event.
But I don't want to get the user back in the TodayScreen or HomeScreen, but only to hide my app into background.

I have only one form and I use it as fullscreen...
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…