| View previous topic :: View next topic |
| Author |
Message |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Wed Mar 12, 2003 5:56 am Post subject: alt f4? |
|
|
how can i disable ALT F4!!!
thank you in advacne |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Mar 12, 2003 7:28 am Post subject: |
|
|
To the best of my knowledge that's not possible with just VDS. The ALT+F4
hot-key combo is assigned to the system menu. That's the menu that pops
up when you click on the icon in the upper left corner of the window.
I don't have a function in my SSmenu.dll that can get the handle for the
system menu. However, I will add that function to the dll. Afterwards you'll
be able to get the handle for the menu and then disable any of the menu
items on the system menu. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Wed Mar 12, 2003 7:30 am Post subject: |
|
|
| thankyou i will check back for a link to the updated version |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Mar 12, 2003 2:25 pm Post subject: |
|
|
Do you want to disable ALT+F4 only for a VDS window, or for another one? Cause if it only has to be for a VDS window, you can check if the mouse is over the close button if someone tries to close your app...
| Code: |
DIALOG CREATE,New Dialog,-1,0,100,100
REM *** Modified by Dialog Designer on 12-3-2003 - 15:15 ***
DIALOG SHOW
:Evloop
wait event
goto @event()
:Close
if @greater(@mousepos(X),@fadd(@diff(@dlgpos(,W),20),@dlgpos(,L)))
if @greater(@sum(@dlgpos(,L),@dlgpos(,W)),@mousepos(X),5)
if @greater(@mousepos(Y),@dlgpos(,T))
if @greater(@fadd(@dlgpos(,T),20),@mousepos(Y))
exit
end
end
end
end
goto Evloop |
|
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Wed Mar 12, 2003 5:37 pm Post subject: |
|
|
If you want to use it on a VDS app, just create a menu with an item that
has a hotkey of Alt+F4. If you do not want the menu to show, then create the
menu and try hiding it using ssmenu.dll. Don't know if the hot key will still
work, but, I know it works assigning Alt+F4 to a menu item. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Mar 12, 2003 5:46 pm Post subject: |
|
|
I have added a function to retrieve the handle of the system menu, I
however, forgot that I had started to make some changes to SSMenu.dll so
I also need to finish them before releasing an update.
BTW, using SSMenu.dll to disable the ALT+F4 hotkey will also disable the
CLOSE button at the upper right hand corner of the window.
Give me another day or two and I should have SSMenu.dll updated. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Wed Mar 12, 2003 6:55 pm Post subject: |
|
|
| well the thing is i dont want my app to close if someone hits ALT + F4 i want the user to have to use the close button... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 12, 2003 7:01 pm Post subject: |
|
|
Here ya go...
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Hot Keys,-1,0,200,100
DIALOG ADD,MENU,-,NoClose|ALT+F4
DIALOG SHOW
:EVLOOP
WAIT EVENT
goto @event()
:NoCloseMENU
INFO Not closing program...@tab()
goto EVLOOP
:CLOSE
EXIT
|
You can put the NoCloseMENU label above the EVLOOP label,
and it won't need any further attention:
| Code: |
:NoCloseMENU
:EVLOOP
WAIT EVENT
goto @event()
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361

Last edited by Mac on Wed Mar 12, 2003 7:08 pm; edited 1 time in total |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Mar 12, 2003 7:02 pm Post subject: |
|
|
Then you've got examples enough, I think....  |
|
| Back to top |
|
 |
|