10 Replies - 12506 Views - Last Post: 05 September 2008 - 05:37 PM Rate Topic: -----

#1 richard356  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 03-August 08

Web browser scroll bars

Posted 05 September 2008 - 03:17 PM

Private Sub gobtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gobtn.Click
		WebBrowser1.Navigate(addressbar.Text)
	End Sub
	Private Sub stopbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stopbtn.Click
		WebBrowser1.Stop()
	End Sub
	Private Sub forwardbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles forwardbtn.Click
		WebBrowser1.GoForward()
	End Sub
	Private Sub refreshbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles refreshbtn.Click
		WebBrowser1.Refresh()
	End Sub
	Private Sub backbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles backbtn.Click
		WebBrowser1.GoBack()
	End Sub


Hi,

Please could someone tell me how I could replace the scroll bar on the web browser control for 2 buttons (up and down arrows)

thanks in advance.

This post has been edited by richard356: 05 September 2008 - 03:18 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Web browser scroll bars

#2 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 04:10 PM

I don't know if you can do that but here is how to hide the scroll bars.
webBrowser.ScrollBarsEnabled = false



I will keep working on it

EDIT:
You can try using the AutoScrollOffset
webBrowser.AutoScrollOffset



Sorry but I don't want to give you something that doesn't work so I didn't include the code I am currently using to try(Which isn't working).

This post has been edited by gbertoli3: 05 September 2008 - 04:25 PM

Was This Post Helpful? 0
  • +
  • -

#3 richard356  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 03-August 08

Re: Web browser scroll bars

Posted 05 September 2008 - 04:15 PM

or how to customise them......................so far i haven't found how.
Was This Post Helpful? 0
  • +
  • -

#4 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 04:32 PM

What do you mean by customize?
Was This Post Helpful? 0
  • +
  • -

#5 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 04:51 PM

Are you using the Microsoft Web Browser Control or the WebBrowser Control?
Was This Post Helpful? 0
  • +
  • -

#6 richard356  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 03-August 08

Re: Web browser scroll bars

Posted 05 September 2008 - 04:55 PM

sorry would of replied a bit quicker but browser crashed.
just change the colours and no idea but im using visual studio 2008
Was This Post Helpful? 0
  • +
  • -

#7 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 05:01 PM

Ok here is how to scroll

make sure you set the ScrollBarsEnabled property to false
webBrowser.ScrollBarsEnabled = false

To scroll down
webBrowser.document.Body.ScrollTop = webBrowser.document.Body.ScrollTop + 10



To scroll up
webBrowser.document.Body.ScrollTop = webBrowser.document.Body.ScrollTop - 10



Hope this helps

EDIT:

Sorry I posted it in C#, all fixed now

This post has been edited by gbertoli3: 05 September 2008 - 05:11 PM

Was This Post Helpful? 1
  • +
  • -

#8 richard356  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 03-August 08

Re: Web browser scroll bars

Posted 05 September 2008 - 05:22 PM

i took them out anyway because visual studio didn't like them :P

This post has been edited by richard356: 05 September 2008 - 05:23 PM

Was This Post Helpful? 0
  • +
  • -

#9 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 05:28 PM

If you need anymore help with your webbrowser just let me know. You can either pm me or post it in the forums.
Was This Post Helpful? 0
  • +
  • -

#10 richard356  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 03-August 08

Re: Web browser scroll bars

Posted 05 September 2008 - 05:36 PM

thanks.
Was This Post Helpful? 0
  • +
  • -

#11 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Web browser scroll bars

Posted 05 September 2008 - 05:37 PM

No Problem
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1