ShowBalloonTip 在 Windows 1 中不起作用,而在以前的 WIndows 版本中起作用
ShowBalloonTip not working in Windows 1 when it worked it previous editions of WIndows
自从我升级到 Windows 10,我的程序拒绝显示更新发布时的通知图标,当我使用 Windows 7.
时它起作用了
这是代码:
Imports System.Net
Public Class Updates
Public Sub CheckForUpdates()
Try
Dim request As System.Net.HttpWebRequest = CType(System.Net.HttpWebRequest.Create("http://versionfile.txt"), HttpWebRequest)
Dim response As System.Net.HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim newestversion As String = sr.ReadToEnd()
Dim currentversion As String = Application.ProductVersion
If newestversion > currentversion Then
CardMaker.NotifyIcon1.ShowBalloonTip(3000, "Update Available!", "Click Here to download it", ToolTipIcon.Info)
End If
Catch ex As Exception
MsgBox("An error occured while trying to check for updates:" + vbNewLine + ex.Message + vbNewLine + vbNewLine + ex.ToString, Title:="Error 006")
My.Computer.Clipboard.SetText(ex.ToString)
End Try
End Sub
End Class
现在这段代码有意义了,它在理论上有效,但在实践中无效,即 windows 10。问题是,该程序在那里,如果人们使用 Windows 10.
,他们可能实际上也没有收到通知
这是一个已知问题吗?如果是这样,有解决办法吗?
没关系,修复它。您必须 select 视觉设计器中的通知图标才能显示气球提示,尽管它是在代码中定义的。
自从我升级到 Windows 10,我的程序拒绝显示更新发布时的通知图标,当我使用 Windows 7.
时它起作用了这是代码:
Imports System.Net
Public Class Updates
Public Sub CheckForUpdates()
Try
Dim request As System.Net.HttpWebRequest = CType(System.Net.HttpWebRequest.Create("http://versionfile.txt"), HttpWebRequest)
Dim response As System.Net.HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim newestversion As String = sr.ReadToEnd()
Dim currentversion As String = Application.ProductVersion
If newestversion > currentversion Then
CardMaker.NotifyIcon1.ShowBalloonTip(3000, "Update Available!", "Click Here to download it", ToolTipIcon.Info)
End If
Catch ex As Exception
MsgBox("An error occured while trying to check for updates:" + vbNewLine + ex.Message + vbNewLine + vbNewLine + ex.ToString, Title:="Error 006")
My.Computer.Clipboard.SetText(ex.ToString)
End Try
End Sub
End Class
现在这段代码有意义了,它在理论上有效,但在实践中无效,即 windows 10。问题是,该程序在那里,如果人们使用 Windows 10.
,他们可能实际上也没有收到通知这是一个已知问题吗?如果是这样,有解决办法吗?
没关系,修复它。您必须 select 视觉设计器中的通知图标才能显示气球提示,尽管它是在代码中定义的。