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 


alt f4?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Wed Mar 12, 2003 5:56 am    Post subject: alt f4? Reply with quote

how can i disable ALT F4!!!
thank you in advacne
Back to top
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Mar 12, 2003 7:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Wed Mar 12, 2003 7:30 am    Post subject: Reply with quote

thankyou i will check back for a link to the updated version
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Mar 12, 2003 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Wed Mar 12, 2003 5:37 pm    Post subject: Reply with quote

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


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Mar 12, 2003 5:46 pm    Post subject: Reply with quote

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


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

PostPosted: Wed Mar 12, 2003 5:46 pm    Post subject: Reply with quote

You can also add hidden menus for hotkeys in straight VDS:

http://www.vdsworld.com/forum/viewtopic.php?t=420

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
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Wed Mar 12, 2003 6:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


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

PostPosted: Wed Mar 12, 2003 7:01 pm    Post subject: Reply with quote

Here ya go... Wink
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 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


Last edited by Mac on Wed Mar 12, 2003 7:08 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Mar 12, 2003 7:02 pm    Post subject: Reply with quote

Then you've got examples enough, I think.... Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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