Disable Windows-Icons (top right corner of program window)

CryoGenID

Active Member
Licensed User
Longtime User
[Solved] Disable Windows-Icons (top right corner of program window)

Hello everybody!

I am currently working on a windows (desktop)-based program and would like to disable the icons on the top right corner (minimize, maximize, close).
The problem is: As soon as somebody clicks "close", the (e.g. form1.close)-Sub gets called by B4PPC automatically and I don't know how I could abort the Closing of the Form/Application at that moment...

So my question is:
How can I disable the "close"-icon or at least "ignore" it, if somebody clicks it?

Thanks a lot in advance,

best regards,

Christian
 
Last edited:

mjcoon

Well-Known Member
Licensed User
How can I disable the "close"-icon or at least "ignore" it, if somebody clicks it?

The method Form1.CancelClose would seem to be made for this purpose but I don't know if it will stop Windows closing the desktop window...

Mike.
 

CryoGenID

Active Member
Licensed User
Longtime User
Hey Mike!

Thanks a LOT for your reply...

Well I think I was already so confused with this problem that I didn't see the obvious :BangHead:

Thanks again, now it works like I wanted it to :)

Best regards,

Christian
 

Zenerdiode

Active Member
Licensed User
You could also use the Door Library to give you a bit more control.
 

Attachments

  • ControlBox.sbp
    1.5 KB · Views: 234

CryoGenID

Active Member
Licensed User
Longtime User
Thanks a lot for that hint and the Demo-Program!! :sign0060:
Update: Agraham, thanks also to you, I will have a look at once :)

That really looks good, I think I will use these new possibilities :)

Best regards,

Chris
 
Hello.
I was expecting something of the ControlBox.sbp in this thread.

May I know where to get a list properties that are not the subset supported by Basic4ppc? Like "MinimizeBox","True".And how to handle them?
:sign0104:
 

agraham

Expert
Licensed User
Longtime User
You can find the details of a .NET Control by Googling for it and picking the MSDN link that usually comes up or by browsing the .NET Development itself .NET Development. From the list on the left click ".NET Framework 2.0" then "Class Library Reference" then "System.Windows.Forms" then the controls then its members. Functions available in the Compact Framework have a little device icon by them.
 
Top