|
-
Feb 27th, 2010, 04:49 PM
#1
Thread Starter
New Member
[Question] Creating Web Browser
Hi all,
we have a little tool in our company but the developer left no source code and can no longer be contacted.
basically I would like to create a Web Browser that displays the Content in it's screen.
I started like this:
Code:
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
WebBrowser1.GoForward()
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
The 1st Struggle already is that hitting Enter after adding the Address does not display the content. I need to click on the Search Button.
Additionally it would be nice if the Address is an IP Address that the last Part of the IP address could automatically be incremented and show the next Device in the Browser.
Any hints?
THX
PT-1
-
Feb 27th, 2010, 05:08 PM
#2
New Member
Re: [Question] Creating Web Browser
As far as the pressing enter in the textbox goes try this code in the textbox's keydown event:
Code:
If e.KeyCode = Keys.Enter Then
'Runs the Button1_Click Event
Button1_Click(Me, EventArgs.Empty)
end if
I'm not sure what exactly you mean with the IP addresses however
-
Feb 27th, 2010, 05:59 PM
#3
Thread Starter
New Member
Re: [Question] Creating Web Browser
 Originally Posted by Bewl
As far as the pressing enter in the textbox goes try this code in the textbox's keydown event:
Code:
If e.KeyCode = Keys.Enter Then
'Runs the Button1_Click Event
Button1_Click(Me, EventArgs.Empty)
end if
I'm not sure what exactly you mean with the IP addresses however
Like this?
Code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If e.KeyCode = Keys.Enter Then
'Runs the Button1_Click Event
Button1_Click(Me, EventArgs.Empty)
End If
End Sub
Does not work....
IP Address for example
I browse to 192.168.178.14 and want a button and then be on 192.168.178.15
THX
PT-1
-
Feb 27th, 2010, 06:05 PM
#4
Re: [Question] Creating Web Browser
we have a little tool in our company but the developer left no source code and can no longer be contacted.
Is it a VB .NET application? if so, it's likely that you can decompile it via red gate's reflector.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Feb 27th, 2010, 06:15 PM
#5
New Member
Re: [Question] Creating Web Browser
 Originally Posted by pt-1
Like this?
Code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If e.KeyCode = Keys.Enter Then
'Runs the Button1_Click Event
Button1_Click(Me, EventArgs.Empty)
End If
End Sub
Does not work....
You need to put that code into the TextBox1 "KeyDown" event, not "TextChanged"
-
Mar 4th, 2010, 09:15 AM
#6
Thread Starter
New Member
Re: [Question] Creating Web Browser
-
Mar 4th, 2010, 09:57 AM
#7
Thread Starter
New Member
Re: [Question] Creating Web Browser
Using Reflector I actually managed to have a look at the "old" Software and found the code to add a /URL behind the IP address I already have in the txt Box.
Now all I need to do is understand the code and modify to fit with my code ;-)
Code:
Private Sub radioButton1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim text As String = Me.textBox1.Text
Dim index As Integer = [text].IndexOf("/")
If (index <> -1) Then
Me.textBox1.Text = ([text].Substring(0, index) & "/!mem")
Else
Me.textBox1.Text = (Me.textBox1.Text & "/!mem")
End If
Me.sendToBrowser(Me.textBox1.Text)
End Sub
Still searching for the increase and decrease Buttons ....
-
Mar 5th, 2010, 12:23 PM
#8
Thread Starter
New Member
Re: [Question] Creating Web Browser
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|