Closing forms by cliking 'X' in VB.NET 2003 after showing some confirmation

Thread Solved

Join Date: May 2007
Posts: 541
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Closing forms by cliking 'X' in VB.NET 2003 after showing some confirmation

 
0
  #1
Jun 4th, 2007
Hi, there, all fellow programmers I need a help on this. I have a code in vb6. It acts when a click action is made on 'X' on form1. Here is the code :-

private sub form1_unload(cancel as integer)
dim confirm as integer

confirm=msgbox("Sure to exit ?",vbyesno+vbquestion,"Confirm Exit")
if confirm=vbyes then
end
elseif confirm=vbno then
cancel=vbno
exit sub
endif
end sub


The above code works fine in vb6 environment. Now I need to write similar code in vb.net 2003 also. Does anybody have any idea how to do this? Plz this is urgent. Reply me as soon as possible
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 541
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: Closing forms by cliking 'X' in VB.NET 2003 after showing some confirmation

 
0
  #2
Jun 4th, 2007
Hi all,
Atlast I've rewritten the above code in vb.net 2003 and its working great.

Thanks once again...
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 1787 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC