• Welcome to Valhalla Legends Archive.
 

Cancel Prop in Form_Unload

Started by CrAz3D, August 31, 2003, 12:13 PM

Previous topic - Next topic

CrAz3D

Dear lord, I double clicked or something, my bad
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

Would it not be possible for you to instead disable the close button?

CrAz3D

#2
Dear lord, I double clicked or something, my bad....

I just realized it when I couldn't find Grok's post & then saw that I had another topic under the Gen. Cat.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Camel

You managed to change the subject between postings.

CrAz3D

#4
Ok, I understand.  Maybe I'm talented like that. :'(
(I am aware I placed a crying smiley)
---Screw the below:
Between this Topic & the other one?......or the first post of this one & the last post I made on this topic?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

Still, you should be disabling the close button, not blocking a call to an enabled button. If a function isn't available, it should be grayed in the ui.

CrAz3D

How do I disable the close button?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

What need you be able to do with it? For example, setting ControlBox = False removes the close, minimize and maximize functions.

CrAz3D

That would work, but I still would like to have minimize & maximize capabilities.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

Ah. Hmm, well, apparently you'll then have to remove the close option from the system menu. Which will supposedly disable the X too.

Adron

From http://www.visualbasicforum.com/t63189.html :

Quote
If you want some simple code to disable the X close button, simply add these declarations to the form and add the code below to the Form Load event of the form that you want to disable the button on:

Private Const SC_CLOSE As Long = &HF060&
Private Const MF_BYCOMMAND = &H0&
Private Declare Function DeleteMenu Lib "user32.dll" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetSystemMenu Lib "user32.dll" (ByVal hWnd As Long, ByVal bRevert As Long) As Long

Private Sub Form_Load()

DeleteMenu GetSystemMenu(Me.hWnd, False), SC_CLOSE, MF_BYCOMMAND

End Sub

Grok

What's more fun is to do as Adron said, then add a PictureBox as your own caption bar.

Inside the picturebox you can put your own buttons, any size and shape, to create a cool looking form.

It's an old trick, but appropriate to mention in this conversation.

CrAz3D

rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...