Home > Software engineering >  Vb.net create no focus form, used for on-screen keyboard
Vb.net create no focus form, used for on-screen keyboard

Time:10-05

Rookie help each great god:
How to implement Vb.net create no focus form, used for screen keyboard?

CodePudding user response:

No focus shows no problem, but when you click on the focus will shift,
 Imports System. The Runtime. InteropServices 

Public Class Form1

Private Shared Function ShowWindow (_
ByVal HWND As IntPtr, _
ByVal nCmdShow As Int32) As Boolean
End the Function

Private Const SW_SHOWNOACTIVATE As Int32=4

Private Sub Button1_Click (ByVal sender As System. Object, ByVal e the As System. EventArgs) Handles for. Click
Dim FRM the As New Form2
ShowWindow (FRM) Handle, SW_SHOWNOACTIVATE)
End Sub
End the Class