Development VB center on

Discussion in 'Software' started by death_star, 28 Apr 2004.

  1. death_star

    death_star What's a Dremel?

    Joined:
    14 Jul 2003
    Posts:
    527
    Likes Received:
    0
    I need to know the code for VB where it centers on a certain area (in say Webrowser1.) to x,y coordinates. I had this in some old code on my harddrive but when it died I lost it. Also, i know how to use sendkeys ect. but how would I make it 'hit' enter after? Thanks.
     
  2. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    What's the "it"?

    VB implies a windows application; so to hazard a guess

    1. Move the components by setting its Top and Left properties. Remember to recalculate its width and height though in relation to the Form's size, otherwise the form will just be moved.

    2. If you want to use SendKeys to 'hit' enter use the arguments "{ENTER}" or "~" for the .Send or .SendWait methods.


    Stu
     
  3. death_star

    death_star What's a Dremel?

    Joined:
    14 Jul 2003
    Posts:
    527
    Likes Received:
    0
    Thats not exactly what I wanted, I need to say... have it move the scroll bars so that I can only see a certain part and then have it remove the scroll bars. Edit: Found it out, I cant beleive i forgot these commands. :wallbash:

    Code:
    Private Sub RuneWeb_DocumentComplete(ByVal pDisp As Object, URL As Variant)
     
    Dim wbrowse As Object
      
      Set wbrowse = RuneWeb.Document.Parentwindow
       wbrowse.Scroll 45, 117
       Set wbrowse = RuneWeb.Document.body
       wbrowse.setAttribute "scroll", "no"
    End Sub
    
     
    Last edited: 1 May 2004

Share This Page