Skip to content
Home > Programming > how to find send a file window? > Reply To: how to find send a file window?

Reply To: how to find send a file window?

#187811
autopilot
Member

@Johnny5 wrote:

hi autopilot, thx for fast reply, i’m able to get the window popup, however using API SPY to find the window is not work, is the another way to find that window? b/c I have to find the window handle to insert text into the filepath textbox. Thanks for your help.

johnny try using the findwindow api.

    Declare Auto Function FindWindow Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Auto Function FindWindowNullClassName Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As Integer, ByVal lpWindowName As String) As Integer
Declare Auto Function FindWindowNullWindowCaption Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As String, ByVal lpWindowName As Integer) As Integer

if you know the window caption, class name or both, then you can get the handle with one of the above api calls.

or… you can get this vb6 project or this vb2005 module and follow the examples to get the subwindow handles.

autopilot

EDIT: I like to use a spy utility that comes with autohotkey

EDIT2: the above code is for vb2005… if you are using vb6, you will have to change integer to long