How to prevent form being minimised

Post

Posted
Rating:
#1 (In Topic #514)
Regular
bill-lancaster is in the usergroup ‘Regular’
 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?
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
I can't get the key combination [Win]+[PgDn] to work but try the following: -

Code (gambas)

  1. Public Sub Form_Deactivate()
  2.  
  3.   Me.Activate
  4.  
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
bill-lancaster is in the usergroup ‘Regular’
Thanks cogier, I'll try it.
I also think this does the job

Code

Public Sub Form_LostFocus()
  Me.Minimized = False
End
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
bill-lancaster is in the usergroup ‘Regular’
This works:-

Code

Public Sub Form_State()
  If Me.Minimized Then Me.Minimized = False
End
Online now: No Back to the top

Post

Posted
Rating:
#5
Guru
BruceSteers is in the usergroup ‘Guru’
 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
Online now: No Back to the top

Post

Posted
Rating:
#6
Guru
BruceSteers is in the usergroup ‘Guru’
 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
Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
bill-lancaster is in the usergroup ‘Regular’
 Sorry, I forgot that I've always set Meta + PageDown as a custom shortcut for window minimise
Online now: No Back to the top
1 guest and 0 members have just viewed this.