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

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




Totally embarassing new question

 
Reply to this topicStart new topic

Totally embarassing new question

Grabuto
16 Jul, 2008 - 10:37 PM
Post #1

New D.I.C Head
*

Joined: 16 Jul, 2008
Posts: 1

I worked in networking for seven years or so but always had a mental block with programming. I had no formal IT training and I felt there was some conceptual "first step" I was missing that made programming so baffling and intimidating. So I faked it by using other people's scripts, batch files etc.

Anyway, I just started screwing around with VB.NET for a hobby project. I have some books and links and whatever. I am having the damndest time just getting started. I would appreciate it if I could tell you what I would like to do, a seemingly very basic procedure not directly addressed in my book, and you could tell me how to do.

Declare an Integer (or Short) variable.
Have the user type a number into a textbox.
That number is the variable.
Display that variable in a label.

Seems like a no-brainer. Totally first-day of programming 101 type of thing but I can't get it to work.

Ultimately I would like to add changes to that number based on a variety of other information that the user has included but if I can't even get it too...

Know what I am saying.?

Thanks
User is offlineProfile CardPM
+Quote Post

sam.adams61
RE: Totally Embarassing New Question
17 Jul, 2008 - 12:58 AM
Post #2

New D.I.C Head
*

Joined: 14 Jul, 2008
Posts: 25


My Contributions
QUOTE(Grabuto @ 16 Jul, 2008 - 11:37 PM) *

I worked in networking for seven years or so but always had a mental block with programming. I had no formal IT training and I felt there was some conceptual "first step" I was missing that made programming so baffling and intimidating. So I faked it by using other people's scripts, batch files etc.

Anyway, I just started screwing around with VB.NET for a hobby project. I have some books and links and whatever. I am having the damndest time just getting started. I would appreciate it if I could tell you what I would like to do, a seemingly very basic procedure not directly addressed in my book, and you could tell me how to do.

Declare an Integer (or Short) variable.
Have the user type a number into a textbox.
That number is the variable.
Display that variable in a label.

Seems like a no-brainer. Totally first-day of programming 101 type of thing but I can't get it to work.

Ultimately I would like to add changes to that number based on a variety of other information that the user has included but if I can't even get it too...

Know what I am saying.?

Thanks


Hello there...I'm a beginner to vb.net myself, but I think if you try the following it might be just what you're look'n for:
[color=#FF6666]Open a new project, place a textbox, a label (do'nt forget to clear it's text property) & a button on to the form.
Double click the button control to go to the projects code view, and enter the following code:

CODE
Dim weeNum As Integer
        weeNum = TextBox1.Text
        Label1.Text = weeNum
        TextBox1.Clear()
        TextBox1.Focus()


Once you enter the number into the textbox & click the button, your number will appear as the label text property, the textbox will clear & regain the focus.
Hope this proves helpful...maybe some of the more experienced guys could give better advice, who knows? wink2.gif



User is offlineProfile CardPM
+Quote Post

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

Be Social

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

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month