Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,239 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,356 people online right now. Registration is fast and FREE... Join Now!




Help with my first project in VB

 
Reply to this topicStart new topic

Help with my first project in VB

b1exvq87
9 Dec, 2007 - 05:15 PM
Post #1

New D.I.C Head
*

Joined: 8 Dec, 2007
Posts: 11


My Contributions
Ok well i just started learning VB and my first project is going to be a web browser.
I got the design done but i need help with 2 things.

1. everything seems good until i maximize the browser app it gets big but everything els seems to stay small. not sure if you understand what i mean but if you want ill post a pic.

2. How can i make a code that lets me type in a url?

thanks for your time and please keep in mind i am a begginer i have never coded like at all lol
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Help With My First Project In VB
9 Dec, 2007 - 05:46 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Is this VB6 or VB.Net (Visual Basic 2003, Visual Basic 2005, Visual Basic 2005 Express Edition, et.). Second, have you written any code to solve either of your problems.

Here at </dream.in.code> we have zero problems helping new problems, in fact thats why we're here and its what we thrive on. And, as the Forum Rules state we will not do your homework for you. If this is VB6 I have written a tutorial that will help you immensely with your first problem: Resize form and resize controls on the form, read that tutorial, its much easier.

As for your 2nd problem, if this is in VB6 then you need to research the WebBrowser Control and see what it can do for you. This project is much easier for you than you think. Don't be the normal newbie programmer and overcomplicate things until you no longer what to be a programmer.

smile.gif
User is offlineProfile CardPM
+Quote Post

b1exvq87
RE: Help With My First Project In VB
9 Dec, 2007 - 05:54 PM
Post #3

New D.I.C Head
*

Joined: 8 Dec, 2007
Posts: 11


My Contributions
Ok well i am using VB 2005.

Nope i have not tried to write the code the the url thing. mostly because i really don't know where to start.
I do understand that you guys are here to help and not to do other peoples projects for them.

Thanks

edit: sorry for the noobness i still havent got a grip of the lang yet.

This post has been edited by b1exvq87: 9 Dec, 2007 - 05:57 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Help With My First Project In VB
9 Dec, 2007 - 06:58 PM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Here is a goof place to start on using the WebBrowser Control in VB.Net so check it out, they have several tutorials on the topic. Read the tutorials, write some code based on said tutorials, then if you run into problems post you code here, using code tags => code.gif and someone, including myself, will be more than happy to help.

Also, need to apologi9ze for what you called your "noobness", all programmers start somewhere.

PS: I am moving this to the VB.Net Forum since this is where it belongs
User is offlineProfile CardPM
+Quote Post

b1exvq87
RE: Help With My First Project In VB
9 Dec, 2007 - 07:48 PM
Post #5

New D.I.C Head
*

Joined: 8 Dec, 2007
Posts: 11


My Contributions
well i was reading over some things and still dont understand much

the only thing i got out of that was
Me.WebBrowser1.Navigate("")
If i put link in between the two "" if i click the thing i put the code into it goes to that link
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Help With My First Project In VB
9 Dec, 2007 - 09:13 PM
Post #6

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
If you have a form with a WebBrowser and a textbox as your address bar, the following would take you to DIC

CODE

Me.WebBrowser1.Navigate("http://www.dreamincode.net")


If it was placed in a buttons click event
User is offlineProfile CardPM
+Quote Post

b1exvq87
RE: Help With My First Project In VB
9 Dec, 2007 - 10:20 PM
Post #7

New D.I.C Head
*

Joined: 8 Dec, 2007
Posts: 11


My Contributions
but that really isent what i was looking for. Im looking for a code that i can put into my text box so i can type in Url's and surf the net

User is offlineProfile CardPM
+Quote Post

aceofspades686
RE: Help With My First Project In VB
10 Dec, 2007 - 10:04 AM
Post #8

D.I.C Regular
Group Icon

Joined: 8 Oct, 2007
Posts: 261


Dream Kudos: 100
My Contributions
QUOTE(b1exvq87 @ 10 Dec, 2007 - 01:20 AM) *

but that really isent what i was looking for. Im looking for a code that i can put into my text box so i can type in Url's and surf the net

That being the case, you would need to set the URL you want to navigate to in a string variable and use that variable as your parameter.

Overly simplified example:
CODE
Dim sUrl as string
sUrl = URLtextbox.text
Me. WebBrowser1.Navigate(sUrl)


Then you could use that code for when they click the go button/hit enter.
User is offlineProfile CardPM
+Quote Post

b1exvq87
RE: Help With My First Project In VB
12 Dec, 2007 - 12:55 PM
Post #9

New D.I.C Head
*

Joined: 8 Dec, 2007
Posts: 11


My Contributions
Still don't really know how to.
User is offlineProfile CardPM
+Quote Post

mrmcpott
RE: Help With My First Project In VB
29 Nov, 2008 - 12:14 AM
Post #10

New D.I.C Head
*

Joined: 24 Nov, 2008
Posts: 13

Suppose you had a form with three controls: a button (Button1), a textbox (TextBox1), and a web browser control (WebBrowser1). Note the names in parenthesis are simply to refer to the attatched image.
Attached Image
If you want to browse your own URLs in the browser at run-time you could make the button, textbox and web control. The user enters the URL into the textbox and clicks the button to "go" (navigate) to that webpage.

The code for the entire program would look like this:

CODE

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate(TextBox1.Text)
    End Sub
End Class


No code would really go into the textbox or the web control... simply in the button.

==EDIT: Explanation of code==

Under the button click action i have placed the code:
CODE

    WebBrowser1.Navigate(TextBox1.Text)


WebBrowser1 is the name of the web browser control
Navigate is the sub routine (thingy that makes things do things) that makes the web browser control go to the URL inside the parenthesis ().
My code says that the web browser (our WebBrowswer1) will Navigate to whatever the user has entered in TextBox1 (hopefully it is a web site).

NOTE: That we do not have quotes around TextBox1.Text because it is not a string, it is referencing the text in TextBox1. However, if we wanted to, for example, go to Google.com when the user clicked the button (or some other event) we would put http://www.google.com inside quotes to look like:

CODE

    WebBrowser1.Navigate("http://www.google.com/")


Because... http://www.google.com is a string being passed through the Navigate sub routine and NOT referencing some other object on the form.

This method works for any object on the form...

Hopefully (maybe) this helps someone!

This post has been edited by mrmcpott: 29 Nov, 2008 - 12:22 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 06:16AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month