Frage: Besteht die Möglichkeit über eine Bildschirmtastatur in einer TextBox (diese ist in einer UserForm) Text und Zahlen einzugeben? Die Tastatur soll immer sichtbar sein, wenn die TextBox aktiv ist, sonst nicht.
Is possible via an onscreen keyboard in a TextBox (this is in a user form) enter text and numbers? The keyboard should always be visible when the TextBox is active, otherwise not.
Hier noch eine Beispieldatei / Here's a sample file:
OnScreenKeyboard - OSK - Bildschirmtastatur...[XLS 40 KB]
Is possible via an onscreen keyboard in a TextBox (this is in a user form) enter text and numbers? The keyboard should always be visible when the TextBox is active, otherwise not.
Hier noch eine Beispieldatei / Here's a sample file:
OnScreenKeyboard - OSK - Bildschirmtastatur...[XLS 40 KB]
'--------------------------------------------------------------------------
' Module : UserForm1
' Author : Case (Ralf Stolzenburg)
' Date : 25.04.2013
' Purpose : On Screen Keyboard - OSK - Bildschirmtastatur...
'--------------------------------------------------------------------------
OptionExplicit
PrivateSubCommandButton1_Click()
Shell"wmic Process where ""name='osk.exe'"" call terminate",vbHide
UnloadMe
EndSub
PrivateSubTextBox1_Enter()
TextBox1.Text=""
ShellAndWait"cmd /c osk"
EndSub
PrivateSubTextBox1_Exit(ByValCancelAsMSForms.ReturnBoolean)
Shell"wmic Process where ""name='osk.exe'"" call terminate",vbHide
EndSub
'--------------------------------------------------------------------------
' Module : UserForm1
' Procedure : ShellAndWait
' Author : Case (Ralf Stolzenburg)
' Date : 25.04.2013
' Purpose : ShellAndWait mit ausgeblendetem Dosfenster...
'--------------------------------------------------------------------------
PrivateSubShellAndWait(ByValstrPathNameAsString)
DimWshShellAsObject
OnErrorGoToFin
SetWshShell=CreateObject("WScript.Shell")
WshShell.RunstrPathName,0,True
Fin:
SetWshShell=Nothing
IfErr.Number<>0ThenMsgBox"Error: "&_
Err.Number&" "&Err.Description
EndSub
' UserForm nicht über das "X" schliessen lassen
PrivateSubUserForm_QueryClose(CancelAsInteger,CloseModeAsInteger)
IfCloseMode=0ThenCancel=True
EndSub