Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" ( _
ByVal hWnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal ShowTypeEnum As Long) _
As Long
Private Enum ShowTypeEnum
SW_HIDE = 0
SW_SHOWNORMAL = 1
SW_SHOWMINIMIZED = 2
SW_SHOWMAXIMIZED = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
End Enum
Private Function showData() As Boolean
Dim sPath As String
Dim Err As Long
sPath = App.Path + "\xxx.exe"
Err = ShellExecute(hWnd, "open", sPath, vbNullString, vbNullString, SW_SHOW)
If Err = "2" Then
MsgBox "Datei extistiert nicht"
Exit Function
End If
End Function