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 


Dialog / Cancel the Alt-F4 switch

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


Joined: 16 Sep 2002
Posts: 105

PostPosted: Fri Nov 21, 2003 9:29 pm    Post subject: Dialog / Cancel the Alt-F4 switch Reply with quote

Seeking "How To" stop a user from using ALT-F4 to close a splash screen.

All feedback invited. Thanks, Mike
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Nov 21, 2003 10:15 pm    Post subject: Reply with quote

In your :evloop, check for the "CLOSE" event, if the close event has been triggered, ignore it.

Code:

:EVENTLOOP
  WAIT EVENT
  %E = @event()
  IF %E
    IF @equal(%E,CLOSE)
      GOTO EVENTLOOP
    ELSE
      GOTO %E
    END
  END
GOTO EVENTLOOP


At this point, there are only two ways to close your program;

1. Within your own code, close the program when you are ready.

2. Using the windows task manager to kill the program.l

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
noveltech
Contributor
Contributor


Joined: 16 Sep 2002
Posts: 105

PostPosted: Sat Nov 22, 2003 3:29 am    Post subject: Thanks, Garrett Reply with quote

Thank you, Garrett, it works great!, nt
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Nov 22, 2003 5:19 am    Post subject: Reply with quote

Hi noveltech
U might want to have a look at it if U want to show the close button disabled too.
http://codescript.vdsworld.com/VDS5src/Disable_Close_Button.zip

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
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