From:http://www.developer.com/net/vb/article.php/1541851/VB-TIP-InputBox---OK-or-Cancel.htm
Imports System.Runtime.InteropServices
s_return = Microsoft.VisualBasic.Interaction.InputBox("请输入ClassID,中间用逗号隔开,也可不输,查询全部。格式:A,B,C" + vbCrLf + "ClassID及描述如下:" + vbCrLf + s_classmsg, "请输入分类ID", "", 300, 300)
If IsInputCancelled(s_return) Then
MessageBox.Show("cancel")
End If
Function IsInputCancelled(ByVal inputStr As String) As Boolean
Dim gh As GCHandle = GCHandle.Alloc(inputStr, GCHandleType.Pinned)
Dim StrPtr As IntPtr = gh.AddrOfPinnedObject()
Dim gh1 As GCHandle = GCHandle.Alloc("", GCHandleType.Pinned)
Dim EmptyStrPtr As IntPtr = gh1.AddrOfPinnedObject()
gh.Free()
gh1.Free()
IsInputCancelled = (StrPtr = EmptyStrPtr)
Return IsInputCancelled
End Function