api findwindow
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Const WM_GETTEXT = &HD
Private Sub Command1_Click()
Dim i As Long
Dim s As String
s = String$(100, " ")
i = FindWindow("cabinetwclass", vbNullString)
i = FindWindowEx(i, ByVal 0&, "WorkerW", vbNullString)
i = FindWindowEx(i, ByVal 0&, "Rebarwin32", vbNullString)
i = FindWindowEx(i, ByVal 0&, "ComboBoxEx32", vbNullString)
i = FindWindowEx(i, ByVal 0&, "combobox", vbNullString)
i = FindWindowEx(i, ByVal 0&, "edit", vbNullString)
Call SendMessageByString(i, WM_GETTEXT, Len(s), s)
Text1.Text = s
End Sub
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const HWND_TOPMOST = -1
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cX As Long, ByVal cY As Long, ByVal wFlags As Long) As Long
Private Sub Form_Load()
Call SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Sub
Private WithEvents check As CheckBox
private sub crearboton()
Set check = miFormularioPadre.Controls.Add("VB.checkbox", "check")
With check
.Visible = True
.Width = 2000
.Caption = "nuevo check"
End With
end sub