PDA

Click to See Complete Forum and Search --> : how to drag from VB into text fields in browser


Squeek
Oct 3rd, 2000, 11:54 PM
I'm trying to drag text from a VB app into a text field in a browser form. Basically this is for an application like GATOR, but I need to do some special things that Gator won't do for me.

First problem: Once I drag outside my own frame, I get the no-drop icon. Second problem: How to get window handle of window at mouse position when left button is released. Third problem: How to get names of text fields in the browser form. Fourth problem: Hos to stuff my text into the fields.

Any help would be appreciated.

gwdash
Oct 4th, 2000, 03:35 PM
for number 1,
Set the OLEDragMode property to 1 - Automatic
For #2

Dim mousepos As POINT_TYPE ' coordinates of the mouse cursor

Dim hwnd As Long ' handle to the window found at the point
Dim retval As Long ' return value

' Determine the window the mouse cursor is over.
retval = GetCursorPos(mousepos) ' get the location of the mouse
hwnd = WindowFromPoint(mousepos.x, mousepos.y) ' determine the window that's there
If hwnd = 0 Then ' error or no window at that point
Debug.Print "No window exists at that location."
End
End If

for #3)
Probably have to parse the source by hand, don't know how though

for #4
Maybe use SendKeys to tab and then paste???