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

Hi all,
Atlast I've rewritten the above code in vb.net 2003 and its working great.

Thanks once again...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.