当应用程序收到通知时,我需要让我的vb.net应用程序能够闪烁/闪烁以吸引用户的注意.
就像这个图像中的DW图标一样:

我已经谷歌搜索了一段时间,并尝试了各种代码示例,都没有成功.
这是我到目前为止所得到的:
Public Class FlashWindow
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Shared Sub main()
FlashWindow(Me.Handle, 1)
End Sub
End Class
Run Code Online (Sandbox Code Playgroud)
此代码立即抛出以下错误:
'我'仅在实例方法中有效
任何人都可以让我知道我哪里出错或如何实现这一目标?
我需要能够加密和解密 php 和 vb.net 中的字符串。PHP 需要能够解密在 vb.net 中加密的字符串,而 vb.net 需要能够解密在 php 中加密的字符串。
我在两个环境中都有可以在该环境中工作的工作代码,但它们不能相互协作。
我对此进行了大量搜索,我相信这与 AES256 的 openssl 实现以及它与 IV 或类似的东西加盐的方式有关。
vb 实现为 IV 生成一个随机 GUID,并在对其进行 base64 编码之前将其添加到加密字符串中。
我的 vb.net 代码是这样的......
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography
Public Class tbSecurity
Public Shared enckey = "00000000000000000000000000000000"
Public Shared Function AESEncryptStringToBase64(strPlainText As String) As String
Dim Algo As RijndaelManaged = RijndaelManaged.Create()
With Algo
.BlockSize = 128
.FeedbackSize = 128
.KeySize = 256
.Mode = CipherMode.CBC
.IV = Guid.NewGuid().ToByteArray()
.Key = Encoding.ASCII.GetBytes(enckey)
End With …Run Code Online (Sandbox Code Playgroud) Am having a problem with a BackgroundWorker getting stuck. have thrown in loads of console.writeline's to help try and narrow down where the issue is, but am getting nowhere fast.
I noticed when going back through the output, I have this message... The thread 0x2d68 has exited with code 259 (0x103)
Can anyone tell me what that means?
EDIT - Below is my full code. To give some background, this app is processing requested received from a website to deploy …