Question[Help Request]Read-Only Webbrowser

Posts 1–12 of 12 · Page 1 of 1
[Help Request]Read-Only Webbrowser
Hey everyone, is there anyway I can make a webbrowser "read only" ?

*Ps, got the subject wrong lol
Hmm..
I dont think thats possible.

humm...ok then.

Thank you anyway!
if by read only u mean like just the web source sure it is...

make an invisible webbrowser make the place where u want the source to be shown(a textbox or rtb or w/e) make a text box and have it say "Url" as in like the site that u want the source from.
(sorry if i misunderstood ur post it wouldn't be the first time i have misunderstood a post)
printscreen

xD
Quote Originally Posted by trevor206 View Post
if by read only u mean like just the web source sure it is...

make an invisible webbrowser make the place where u want the source to be shown(a textbox or rtb or w/e) make a text box and have it say "Url" as in like the site that u want the source from.
(sorry if i misunderstood ur post it wouldn't be the first time i have misunderstood a post)
You did missunderstood
I'm building a bot for a browser game I play,(btw the game login system of the game is pretty hard to use using a bot ) and I wanted the user to simply see what's going on without beeing able to change it because it could somehow affect the bot's behaviour.
Quote Originally Posted by omanel View Post
You did missunderstood
I'm building a bot for a browser game I play,(btw the game login system of the game is pretty hard to use using a bot ) and I wanted the user to simply see what's going on without beeing able to change it because it could somehow affect the bot's behaviour.
If you mean that you want the browser not to navigate without your permission then its possible with a little trick.

You can use:

Wb.AllowNavigation = false

to disable navigation. But the problem is that it works only when the current navigation is completed. To fix it, hide the browser while the page is navigating.



Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Botting code here.... blah blah
        wb.Navigate("http://www.mpgh.net/forum/33-visual-basics/")
    End Sub

Private Sub wb_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wb.DocumentCompleted
        wb.AllowNavigation = False

        wb.Visible = True

    End Sub

    Private Sub wb_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles wb.Navigating
        wb.Visible = False

    End Sub
Not a good way but can be helpful !!

PS: Use Gecko engine instead of IE, IE sucks so badly !! Also I am sure Gecko would provide read-only functionality !!
Quote Originally Posted by Hassan View Post
If you mean that you want the browser not to navigate without your permission then its possible with a little trick.

You can use:

Wb.AllowNavigation = false

to disable navigation. But the problem is that it works only when the current navigation is completed. To fix it, hide the browser while the page is navigating.



Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Botting code here.... blah blah
        wb.Navigate("http://www.mpgh.net/forum/33-visual-basics/")
    End Sub

Private Sub wb_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wb.DocumentCompleted
        wb.AllowNavigation = False

        wb.Visible = True

    End Sub

    Private Sub wb_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles wb.Navigating
        wb.Visible = False

    End Sub
Not a good way but can be helpful !!

PS: Use Gecko engine instead of IE, IE sucks so badly !! Also I am sure Gecko would provide read-only functionality !!
By gecko engine I think you're talking about firefox, and by IE Internet explorer.I use firefox and sometimes chrome...but why are you saying this?because of the login part I wrote?

About the code, it worked, thank you
Quote Originally Posted by omanel View Post
By gecko engine I think you're talking about firefox, and by IE Internet explorer.I use firefox and sometimes chrome...but why are you saying this?because of the login part I wrote?

About the code, it worked, thank you
No, I said that because Gecko is much better over all !!

Ah glad to see it helped you
Quote Originally Posted by Hassan View Post
No, I said that because Gecko is much better over all !!

Ah glad to see it helped you
But what's Gecko?
A web browser? A developers toolkit or something, didn't get it o.0
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us