在我的vb.net窗口应用程序中,我写了一些代码在MouseMove
事件中。 当我的应用程序运行并且光标进入我的应用程序时,一个messagebox
弹出并在一秒钟内不可见。我无法阅读那里面有什么messagebox
。.net框架中的未知消息框
任何人都可以请帮我摆脱这个不必要的messagebox
这是有标题.net框架。 这里是我的代码
Public Class ToolDashboard
Imports System.Configuration
Imports System.Collections.Specialized
Public Class CompassToolDashboard
Dim path As NameValueCollection
Private Sub ToolDashboard_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Location = New Point(Screen.PrimaryScreen.WorkingArea.Width - (Me.Width - 50), Screen.PrimaryScreen.WorkingArea.Height - Me.Height)
path = ConfigurationManager.GetSection("ToolPath")
End Sub
Private Sub ToolDashboard_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter
Me.BringToFront()
While Me.Opacity < 1
Me.Opacity = Me.Opacity + 0.06
End While
End Sub
Private Sub ToolDashboard_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave
While Me.Opacity > 0
Me.Opacity = Me.Opacity - 0.001
End While
End Sub
Private Sub CloseForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseForm.Click, CloseForm.Click
Process.GetCurrentProcess().Kill()
End Sub
Private Sub ShareTool_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VMDashboard.Click
System.Diagnostics.Process.Start(path("IndexGenerator"))
'getting path for Indexgenerator.exe from app.config
'Index generator.exe is present in a remote system
End Sub
End Class
你试图完成什么?我非常确定,在事件处理程序中使用'Application.DoEvents'的'While'循环(特别是对于像MouseMouve这样经常被**的**)是不是一个好主意。 – Andreas
当光标在我的申请表上时(通过在窗体不透明度上加上0.01),否则窗体将是不可见的(通过从窗体不透明度中推导出0.003)。如果你有更好的主意来完成这个任务。 – Kenta
您确定它是[Message box](http://i.msdn.microsoft.com/dynimg/IC534155.png)而不是[balloon](http://msdn.microsoft.com/en-us /library/windows/desktop/aa511451.aspx)或[tooltip](http://msdn.microsoft.com/en-us/library/windows/desktop/aa511495.aspx)? –