关于vb.net开发winform程序,返回值的有关问题

关于vb.net开发winform程序,返回值的问题
各位高手,我想请教一下,我想编写一个winform的程序,可以让这个程序有返回值,该如何实现,拜托各位给想个办法,多谢多谢了。

------解决方案--------------------
MSDN上关于Main的说明:

...
Visual Basic 中的主过程
Main 还可以返回一个 Integer 值,操作系统将其作为程序的退出代码。其他程序可以通过检查 Windows ERRORLEVEL 值来测试该代码。若要返回退出代码,必须将 Main 过程声明为 Function 过程而不是 Sub 过程

Module mainModule
Function Main() As Integer
MsgBox( "The Main procedure is starting the application. ")
Dim returnValue As Integer = 0
' Insert call to appropriate starting place in your code.
' On return, assign appropriate value to returnValue.
' 0 usually means successful completion.
MsgBox( "The application is terminating with error level " _
& CStr(returnValue) & ". ")
Return returnValue
End Function
End Module