View previous topic :: View next topic |
Author |
Message |
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Jul 14, 2002 1:05 am Post subject: Hot Keys Without Menus... |
|
|
I just figured this out a few minutes ago...
Name the first menu item "-". You're gonna have some
blank space at the top of your window, but only about
1/2 of what a menu usually adds, and there's no menu
items showing. I added a button at 0, 0 to show how
much space is added.
Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Hot Keys,-1,0,200,100
DIALOG ADD,MENU,-,A|A,B|B,C|C,F1|F1,F2|F2,F3|F3
DIALOG ADD,BUTTON,B1,0,0,30,20
DIALOG ADD,TEXT,T1,0,35,,,"Press a key: A, B, C, F1, F2, F3"
DIALOG SHOW
:EVLOOP
WAIT EVENT
%e = @event()
goto %e
:B1BUTTON
:AMENU
:BMENU
:CMENU
:F1MENU
:F2MENU
:F3MENU
INFO You caused an %e event...@tab()
goto EVLOOP
:CLOSE
EXIT
|
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
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Sep 08, 2002 8:26 pm Post subject: |
|
|
Here's a hidden F1 hotkey using an offscreen "Help" BUTTON,
and a hidden ESCAPE hotkey using an offscreen "Cancel" BUTTON.
Thanks to Skit and Tommy for this.
Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test Program,-1,0,300,200
DIALOG ADD,BUTTON,Help,0,0,0,0
DIALOG ADD,BUTTON,Cancel,0,0,0,0
DIALOG SHOW
:EVLOOP
WAIT EVENT
goto @event()
:HelpBUTTON
rem -- If not compiled, this also opens VDS help --
INFO This uses the F1 key...@tab()
goto EVLOOP
:CancelBUTTON
INFO This uses the ESC key...@tab()
goto EVLOOP
:CLOSE
EXIT
|
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
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|