I have a project that shows calendar events on screen. The form has border false and skiptaskbar true.
This fine until a minimise key (WIN + PgDn) sequence is sent, resulting the programme's disappearance!
How can I intercept the minimise action?
How to prevent form being minimised
-
- Posts: 190
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: How to prevent form being minimised
I can't get the key combination [Win]+[PgDn] to work but try the following: -
Public Sub Form_Deactivate()
Me.Activate
End
-
- Posts: 190
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
Re: How to prevent form being minimised
Thanks cogier, I'll try it.
I also think this does the job
I also think this does the job
Code: Select all
Public Sub Form_LostFocus()
Me.Minimized = False
End
-
- Posts: 190
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
Re: How to prevent form being minimised
This works:-
Code: Select all
Public Sub Form_State()
If Me.Minimized Then Me.Minimized = False
End
- BruceSteers
- Posts: 1523
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: How to prevent form being minimised
Setting a Forms "Utility" property to true in the IDE will hide the minimize button.
I don't know if it stops the minimising though, worth a try.
that sounds like an odd shortcut set somewhere else as it is not Gambas default to minimise on Super+PgDown
I don't know if it stops the minimising though, worth a try.
that sounds like an odd shortcut set somewhere else as it is not Gambas default to minimise on Super+PgDown
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- BruceSteers
- Posts: 1523
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: How to prevent form being minimised
Well i discovered Meta + PageDown is a LXDE KDE thing.
I don't have any of those systems to try it on but..
You could also try something like this...
Public Sub Form_KeyPress()
If Key.Meta And If Key.PageDown Then Stop event
End
I don't have any of those systems to try it on but..
You could also try something like this...
Public Sub Form_KeyPress()
If Key.Meta And If Key.PageDown Then Stop event
End
If at first you don't succeed , try doing something differently.
BruceS
BruceS
-
- Posts: 190
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
Re: How to prevent form being minimised
Sorry, I forgot that I've always set Meta + PageDown as a custom shortcut for window minimise