Results 1 to 2 of 2

Thread: how to drag from VB into text fields in browser

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Austin, Texas
    Posts
    1

    Question

    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.

  2. #2
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    for number 1,
    Set the OLEDragMode property to 1 - Automatic
    For #2
    Code:
    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???
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width