Results 1 to 6 of 6

Thread: How can I set the scrollbar Position on a Shell'd IE Window?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    18

    How can I set the scrollbar Position on a Shell'd IE Window?

    Ok,

    I've used the Shell API to launch a Internet Explorer window and goto a certain webpage.

    Now I've got control of the IE window, but the webpage is too long and therefore scrollbars appear on the right.

    How can I take control of the scroll bar, to move the page down to a certain position?

    Any help Appreciated.

    Mrman

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: How can I set the scrollbar Position on a Shell'd IE Window?

    .SelStart to somewhere down the page?

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: How can I set the scrollbar Position on a Shell'd IE Window?

    IE supports .SelStart????

    mrman, you said you have control of the IE window, what method are you using to do this? Are you automating it via VB, using webbrowser control reference, or the IE reference?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    18

    Re: How can I set the scrollbar Position on a Shell'd IE Window?

    I use this code :-

    Dim SWs As New SHDocVw.ShellWindows

    Dim IE As SHDocVw.InternetExplorer

    Dim html As String

    Dim iX As Integer
    Dim iY As Integer

    On Error Resume Next

    'cycle throught all ShellWindows, IE is a pointer to the current window
    Dim tmpX As Byte
    tmpX = Val(Windows.Text)
    For Each IE In SWs

    ' is the window my site ?
    If InStr(1, LCase(IE.LocationURL), "mysite.com") > 0 Then
    'get the html
    html = IE.Document.body.innerHTML

    Thanks

    Mrman

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: How can I set the scrollbar Position on a Shell'd IE Window?

    oops. thinking WebBrowser control. my mistake.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Feb 2005
    Posts
    18

    Re: How can I set the scrollbar Position on a Shell'd IE Window?

    Manage to fix it

    I put this command in :

    Browser1.parentWindow.scrollTo Text1, Text1

    Where text1 is the number point you wish to scroll to.

    Thanks for looking

    MrMan

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