Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
[HELP] Move scrollbar automatically?
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-11-2011, 11:47 PM
Active Member
 
Join Date: May 2006
Posts: 122
Send a message via AIM to dgameman1 Send a message via MSN to dgameman1 Send a message via Skype™ to dgameman1
Default [HELP] Move scrollbar automatically?

How would I go about moving the scrollbar down a littlebit once the webbrowser has completed loading?
Reply With Quote
  #2  
Old 09-12-2011, 07:55 AM
Covey's Avatar
Creator of EliteSwitch
Ex-Moderator Visual Basic Programmers
 
Join Date: Sep 2005
Location: Fuckin' BAM!
Posts: 4,464
Default Re: [HELP] Move scrollbar automatically?

Add this to a module:
Code:
Imports System.Runtime.InteropServices

<DllImport("User32.dll")> _
    Private Sub mouse_event(ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, _
                            ByVal dwExtraInfo As Integer)
    End Sub

Private Const MOUSEEVENTF_WHEEL As Int32 = &H800
Private Const WHEEL_DELTA As Int32 = 120 

Public Sub MouseScroll(Optional ByVal intDirection As Integer = 0)
        If intDirection = 1 Then
            mouse_event(MOUSEEVENTF_WHEEL, 0, 0, -WHEEL_DELTA, 0)
        Else
            mouse_event(MOUSEEVENTF_WHEEL, 0, 0, WHEEL_DELTA, 0)
        End If
    End Sub
To scroll up use:
Code:
MouseScroll(0)
To scroll down use:
Code:
MouseScroll(1)
To do this when the webbrowser has finished loading you need to use the Webbrowser's 'DocumentCompleted' or 'Navigated' event. (I forget which one it is):
Code:
Private Sub webBrowser_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles webBrowser.Navigated

    End Sub

Private Sub webBrowser_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles webBrowser.DocumentCompleted

    End Sub
__________________
EliteSwitch v4 Source Code - http://sythe.org/showthread.php?t=1214654
Reply With Quote
  #3  
Old 09-12-2011, 03:34 PM
Active Member
 
Join Date: May 2006
Posts: 122
Send a message via AIM to dgameman1 Send a message via MSN to dgameman1 Send a message via Skype™ to dgameman1
Default Re: [HELP] Move scrollbar automatically?

You know what Covey?
You're a fucking god. Thank you =P
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 10:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1