| | |
Closing forms by cliking 'X' in VB.NET 2003 after showing some confirmation
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
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
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
![]() |
Similar Threads
- picture box in vb.net 2003. (VB.NET)
- About Windows Forms C# .net 2003 (C#)
- Visual Studio 6.0 or Visual Studio .Net 2003? (Windows Software)
- Visual Studio 6.0 or Visual Studio .Net 2003 (C++)
- how to update visual studio .net 2003 (ASP.NET)
- how to run .net 2003 trial version on Terminal server 2000 (VB.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: NEED Visual Basic tutorials
- Next Thread: How to search from a database, selecting from a combo or list box in vb?
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





