Support Forums
Simple things you should know[Some code and advice] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: Simple things you should know[Some code and advice] (/showthread.php?tid=11628)



Simple things you should know[Some code and advice] - Xypher - 08-29-2010

[1] Always use Application.Exit() instead of things like End, me.close, and any other variation of those.
End is like holding down the power button and can cause errors.
Me.close does not always work properly.
Application.Exit() is what the normal x button uses.

[2] Use Messagebox.Show() instead of msgbox...
MsgBox is imported from Visual Basic 6 and actually uses up more memory than Messagebox.show() does.
-Credits to Vorfin for telling me that.

[3] To open up another form use the code formname.show.
Replace formname with the name of your form.

[4] Do not use code to do something that can be done in the properties.


I will continue to update this with new things.


RE: Simple things you should know[Some code and advice] - Botted - 08-29-2010

Wow thanks man, really helpful, i will be using Application.Exit() for now on (:


RE: Simple things you should know[Some code and advice] - Omniscient - 08-29-2010

Those are nice tips. One day I'll start doing .net coding.


RE: Simple things you should know[Some code and advice] - Sam - 08-29-2010

Small but still a good little source of information. Thank you Xypher. I look forward to reading more.


RE: Simple things you should know[Some code and advice] - Fragma - 08-29-2010

Useful tips. I didn't even know you could use Application.Exit() rather than Me.Close(). You learn something new everyday.