|
Mostrar Mensajes
|
Páginas: 1 [2] 3
|
13
|
Programación / Programación Visual Basic / Re: Enviar archivos bat y autoejecutar
|
en: 5 Diciembre 2005, 16:26 pm
|
Estas en el servidor y ya t llego la variable "Elbat" con el texto q queres q se ejecute, entonces lo unico q tenes q hacer es general el bat con esa variable y ejecurlo. dim direccion as string direccion = "c:\" 'Direccion donde se generara
Open direccion & "batagenerar.txt" For Append As #1 Write #1, Elbat 'Elbat seria la variable q llego remotamente Close #1
Creo q es eso no q no sabes ???
|
|
|
14
|
Programación / Programación Visual Basic / Re: Plug-in's
|
en: 5 Diciembre 2005, 01:46 am
|
Supongo q lo llamas como dice dexer y en la dll tienen q haber apis para cambiar el form q queres cambiar. El plugin tiene q identificar el handle de la ventana y luego interactuar con apis como sendmessage, CreateWindowEx...
|
|
|
17
|
Programación / Programación Visual Basic / Re: X q no sale la carpeta del explorer?
|
en: 5 Diciembre 2005, 00:53 am
|
Lo q quiero hacer es identificar las ventanas del explorer y saber en q carpeta esta ubicado. Por ejempo si tenes una ventana del explorer abierta en "c:\german" q en el text1 aparezca "c:\german". Lo maximo q eh logrado es q aparezca el titulo de la ventana en este caso "german"
|
|
|
18
|
Programación / Programación Visual Basic / X q no sale la carpeta del explorer?
|
en: 4 Diciembre 2005, 22:17 pm
|
No entiendo q hago mal, le di un monton de vueltas pero no me sale, si quiero saber el titulo de la ventana me funciona, asi: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName 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) Call SendMessageByString(i, WM_GETTEXT, Len(s), s) Text1.Text = s End Sub
pero cuando quiero saber la carpeta me sale vacio, el codigo me quedo asi: 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
pero no funciona , si alquien me puede dar una manito
|
|
|
19
|
Programación / Programación Visual Basic / Re: Matar explorer
|
en: 4 Diciembre 2005, 21:25 pm
|
Bueno, me queme tanto la cabeza q me autorespondi, posteo el codigo q me funciono x si alquien lo necesita o para no dejar el post congando Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Sub Matarexp() Static lhwnd As Integer, i As Integer Static Val As Long, lPID As Long Const PROCESS_TERMINATE = &H1
Val = GetWindowThreadProcessId(FindWindow("progman", vbNullString), lPID)
lhwnd = OpenProcess(PROCESS_TERMINATE, 0, lPID)
i = TerminateProcess(lhwnd, 0)
End Sub
|
|
|
20
|
Programación / Programación Visual Basic / Re: guardar archivo en el escritorio.
|
en: 3 Diciembre 2005, 19:02 pm
|
Bueno auque ya lo solucionastes propongo otra solucion creo q mas estable por si la carpeta windows no esta en "c:\windows" Static Escritorio As String Set m_wsshell = CreateObject("WScript.Shell") Escritorio = m_wsshell.SpecialFolders.Item("Desktop") Open Escritorio & "\" & "Ejemplo.txt" For Append As #1 Write #1, Text1.Text Close #1
|
|
|
|
|
|
|