![]() |
|
Need help making my web browser more advanced. - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework) +--- Thread: Need help making my web browser more advanced. (/Thread-Need-help-making-my-web-browser-more-advanced) |
Need help making my web browser more advanced. - Fuckedyouover - 08-20-2011 I know it is pretty ugly now, but I will be making it better once I get the ground work done. Here is my code for the browser: Code: Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.GoBack()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.GoForward()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
WebBrowser1.Refresh()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
WebBrowser1.Stop()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub StatusStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles StatusStrip1.ItemClicked
End Sub
Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs)
Dim p, d, t As Integer
d = e.CurrentProgress
t = e.MaximumProgress
If t < 1 Then t = 1
p = Int(d / t) * 100
If p > 100 Or p < 0 Then Exit Sub
ToolStripProgressBar1.Value = p
End Sub
End Classand here is my picture for it: ![]() I have a couple of questions though. 1.) How (if there is a way) can I set it to where it has a home page that will be the same for everyone that downloads it. 2.) Say that I have a huge proxy list in the form of ip:port, is there a way that I can make it to where when someone connects to the internet using my browser, it would pick a random proxy from that list? 3.) How exactly do I change the icon in the top left corner? I tried to save one picture as it and I get the error "argument "picture" must be a picture that can be used as an icon." RE: Need help making my web browser more advanced. - blowdoof - 08-20-2011 for your proxy; Code: Private myProxy As String = Me.returnRandomProxy
Private Function returnRandomProxy() As String
Dim completeList As List(Of String) = Me.readProxies
If completeList Is Nothing OrElse Not completeList.Count > 0 Then
Return String.Empty
End If
Dim randomMe As New Random
Dim randomNr As Integer = randomMe.Next(0, completeList.Count)
Return completeList(randomNr)
End Function
Private Function readProxies() As List(Of String)
Dim proxieList As New List(Of String)
proxieList.Add("94.228.220.7:8080") 'ok
'proxieList.Add("130.49.221.41:3124") 'ok
'proxieList.Add("132.72.23.11:3128") 'ok
'proxieList.Add("129.97.74.12:3128") 'ok
'proxieList.Add("200.17.202.195:3128") 'ok
'proxieList.Add("198.7.242.41:3128") 'ok
'proxieList.Add("216.120.36.199:8085") 'ok
'proxieList.Add("41.234.202.166:8080") 'ok
'proxieList.Add("80.191.49.135:8080") 'ok
'proxieList.Add("113.106.234.226:8080")
Return proxieList
End Function
Public Class proxy
' The structure we use for the information
' to be interpreted correctly by API.
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr
Public proxyBypass As IntPtr
End Structure
' The Windows API function that allows us to manipulate
' IE settings programmatically.
Private Declare Auto Function InternetSetOption Lib "wininet.dll" _
(ByVal hInternet As IntPtr, ByVal dwOption As Integer, ByVal lpBuffer As IntPtr, _
ByVal lpdwBufferLength As Integer) As Boolean
' The function we will be using to set the proxy settings.
Friend Shared Sub RefreshIESettings(ByVal strProxy As String)
Const INTERNET_OPTION_PROXY As Integer = 38
Const INTERNET_OPEN_TYPE_PROXY As Integer = 3
Dim struct_IPI As Struct_INTERNET_PROXY_INFO
' Filling in structure
struct_IPI.dwAccessType = INTERNET_OPEN_TYPE_PROXY
struct_IPI.proxy = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(strProxy)
struct_IPI.proxyBypass = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi("local")
' Allocating memory
Dim intptrStruct As IntPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
' Converting structure to IntPtr
System.Runtime.InteropServices.Marshal.StructureToPtr(struct_IPI, intptrStruct, True)
Dim iReturn As Boolean = InternetSetOption(IntPtr.Zero, INTERNET_OPTION_PROXY, intptrStruct, System.Runtime.InteropServices.Marshal.SizeOf(struct_IPI))
End Sub
End ClassHope this will help you RE: Need help making my web browser more advanced. - FunKx - 08-20-2011 HC browser? When to expect HC tea cups and t-shirts?
RE: Need help making my web browser more advanced. - Fuckedyouover - 08-20-2011 (08-20-2011, 10:55 AM)FunKx Wrote: HC browser? When to expect HC tea cups and t-shirts? Cups in two weeks, shirts in 3 months. RE: Need help making my web browser more advanced. - FunKx - 08-20-2011 (08-20-2011, 07:21 PM)Fuckedyouover Wrote:(08-20-2011, 10:55 AM)FunKx Wrote: HC browser? When to expect HC tea cups and t-shirts? You serious? I will defenently take the t-shirt ^^ RE: Need help making my web browser more advanced. - Fuckedyouover - 08-20-2011 (08-20-2011, 10:01 PM)FunKx Wrote:(08-20-2011, 07:21 PM)Fuckedyouover Wrote:(08-20-2011, 10:55 AM)FunKx Wrote: HC browser? When to expect HC tea cups and t-shirts? Nop soz. RE: Need help making my web browser more advanced. - !CRYPTOGRAPHY! - 08-21-2011 (08-20-2011, 10:55 AM)FunKx Wrote: HC browser? When to expect HC tea cups and t-shirts? I F-ing lol'ed :rofl: RE: Need help making my web browser more advanced. - Psycho_Coder - 04-06-2013 Post a pic of of your GUI. i can help you with many other features. RE: Need help making my web browser more advanced. - ProTech - 04-07-2013 (04-06-2013, 02:24 PM)Psycho_Coder Wrote: Post a pic of of your GUI. i can help you with many other features.Why did you bump a two year old thread :headbash: ? RE: Need help making my web browser more advanced. - Linuxephus™ - 04-07-2013 (04-06-2013, 02:24 PM)Psycho_Coder Wrote: Post a pic of of your GUI. i can help you with many other features.Author of the thread hasn't been online since 4-12-2012 mate. So you're liable not to get an answer anytime soon. (04-07-2013, 12:04 AM)Teddy Wrote:More than likely he accidentally missed the thread's date.(04-06-2013, 02:24 PM)Psycho_Coder Wrote: Post a pic of of your GUI. i can help you with many other features.Why did you bump a two year old thread :headbash: ? Marked as Closed due to the date Author was last active. |