Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Imports System.Console
Imports System.Runtime.InteropServices
Public Class Form1
Friend WithEvents SimButton As New Button
<DllImport("user32.dll")> _
Public Shared Sub mouse_event(ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
End Sub
Public Enum MouseEventType As Integer
LeftDown = &H2
LeftUp = &H4
RightDown = &H8
RightUp = &H10
End Enum
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitializeComponent()
Me.Left = 100
Me.Top = 100
SimButton.Left = 100
SimButton.Top = 100
SimButton.Text = "Klik mij"
Me.Controls.Add(SimButton)
Cursor.Position = New Point(240, 240)
mouse_event(MouseEventType.LeftDown, Cursor.Position.X, Cursor.Position.Y, 0, IntPtr.Zero)
mouse_event(MouseEventType.LeftUp, Cursor.Position.X, Cursor.Position.Y, 0, IntPtr.Zero)
End Sub
End Class
Code:Imports System.Console Imports System.Runtime.InteropServices Public Class Form1 Friend WithEvents SimButton As New Button <DllImport("user32.dll")> _ Public Shared Sub mouse_event(ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer) End Sub Public Enum MouseEventType As Integer LeftDown = &H2 LeftUp = &H4 RightDown = &H8 RightUp = &H10 End Enum Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load InitializeComponent() Me.Left = 100 Me.Top = 100 SimButton.Left = 100 SimButton.Top = 100 SimButton.Text = "Klik mij" Me.Controls.Add(SimButton) Cursor.Position = New Point(240, 240) mouse_event(MouseEventType.LeftDown, Cursor.Position.X, Cursor.Position.Y, 0, IntPtr.Zero) mouse_event(MouseEventType.LeftUp, Cursor.Position.X, Cursor.Position.Y, 0, IntPtr.Zero) End Sub End Class
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.