vb.net模拟 vb net

vb.net 模拟 Win + D 显示桌面显示桌面的本质是个系统 Shell(IShellDispatch4.ToggleDesktop()),所以只需要调用这个 Shell 就好了 , 用不着模拟按键 。
项目引用 C:\Windows\System32\shell32.dll,参考代码:
Dim objShel As Shell32.ShellClass = New Shell32.ShellClass()
CType(objShel, Shell32.IShellDispatch4).ToggleDesktop()
VB.NET模拟鼠标问题Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Dim postion1 As New Point
mouse_event(H1 Or H8000, postion1.X * 65535 / 1366, postion1.Y * 65535 / 768, 0, 0)
'按绝对位置移动鼠标
'在鼠标坐标系统中vb.net模拟,屏幕在水平和垂直方向上均匀分割成65535×65535个单元vb.net模拟,
'当前所用显示屏分辨率为1366*768
'所以要进行如上转换
mouse_event(H2, 0, 0, 0, 0) '鼠标左键按下
mouse_event(H4, 0, 0, 0, 0) '鼠标左键弹起
msdn上有 mouse_event 的详解,大致使用如上
VB.NET怎么编模拟袖珍计算器的完整程序?Public C护激篙刻蕻灸戈熏恭抹lass Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim c As Char
c = Trim(TextBox3.Text)
Select Case c
Case "+"
TextBox4.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
Case "-"
TextBox4.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
Case "*"
TextBox4.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
Case "\"
If Val(TextBox2.Text) = 0 Then
MsgBox("分母为0")
Else
TextBox4.Text = Val(TextBox1.Text) \ Val(TextBox2.Text)
End If
Case "/"
If Val(TextBox2.Text) = 0 Then
MsgBox("分母为0")
Else
TextBox4.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End If
End Select
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
【vb.net模拟 vb net】关于vb.net模拟和vb net的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读