forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Hot Keys Without Menus...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Jul 14, 2002 1:05 am    Post subject: Hot Keys Without Menus... Reply with quote

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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Sep 08, 2002 8:26 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group