Page 1
Page 1
Started By
Message

Any programmers around? Need help in Visual Studio.

Posted on 11/4/14 at 2:48 pm
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 2:48 pm
This for a Visual Programming Basics class. I literally haven't the slightest clue what I am doing. Going to school for computer networking and this is a required class.

Can someone tell me where I am going wrong? I can't get this last error message fixed. I am completely lost. Not even sure how I got this far. I already turned it in because it was due last night, but I'm hoping if I can get some guidance on what I did wrong then I can start to figure things out.

Posted by Doldil
The Ham
Member since Jan 2010
6214 posts
Posted on 11/4/14 at 2:54 pm to
try telephonelabel = cint(TelephoneText.Text) instead of Cint(telephoneText)?

*edit*

also in your DIM statement you have "telephonelab" as your integer but you're trying to store in to "telephonelabel" could also be causing you issues.
This post was edited on 11/4/14 at 2:59 pm
Posted by TigerRagAndrew
Check my style out
Member since Aug 2004
7256 posts
Posted on 11/4/14 at 2:57 pm to
Cint (telephonetext.text)
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 2:58 pm to
Tried that, same thing.
Posted by Doldil
The Ham
Member since Jan 2010
6214 posts
Posted on 11/4/14 at 2:58 pm to
check edit
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 3:01 pm to
quote:

also in your DIM statement you have "telephonelab" as your integer but you're trying to store in to "telephonelabel" could also be causing you issues.



:banghead:
Posted by Doldil
The Ham
Member since Jan 2010
6214 posts
Posted on 11/4/14 at 3:03 pm to
it happens man...

I don't know if it would help at all, but my naming convention was always

intNAMEHERE
txtNAMEHERE
strNAMEHERE
lblNAMEHERE
etc...
instead of adding the identifier at the end because lab/label is obviously easy to overlook
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 3:09 pm to
Yeah, she wants Label, or Text/TextBox on the end of our naming conventions.

I fixed that, and now it is giving me problems with the .toString on the bottom.

"An unhandled exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll

Additional information: Conversion from string "System.Windows.Forms.TextBox, Te" to type 'Integer' is not valid."


I hate programming, no chance on God's green earth I pass this class. It is a mini semester, so we have to build 2 of these a week. Plus other assignments.
Posted by JollyGreenGiant
The Help Board
Member since Jul 2004
24918 posts
Posted on 11/4/14 at 3:27 pm to
You need CInt(TelephoneText.Text)
Posted by Covingtiger
New Orleans Saints Fan
Member since Mar 2010
3313 posts
Posted on 11/4/14 at 4:42 pm to
quote:

You need CInt(TelephoneText.Text)
this.

What you're doing now is trying to convert the entire TelephoneText object to an integer. You just need to convert the value of the object's Text property to an integer if that makes any sense yet.

Also, if you're trying to store that in a label, you'll need to store it in the label's Text property. I'm totally confused by the naming conventions that she's wanting you to use, but if that's your label's ID then: TelephoneLabel.Text = TelephoneText.Text
This post was edited on 11/4/14 at 7:35 pm
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 4:46 pm to
Posted by TigerRagAndrew
Check my style out
Member since Aug 2004
7256 posts
Posted on 11/4/14 at 7:04 pm to
We fixed that shite earlier in the thread baw. U need to have a different attitude. Programming skills can take your career much farther than just being a network or desktop analyst
Posted by VaBamaMan
North AL
Member since Apr 2013
8215 posts
Posted on 11/4/14 at 8:20 pm to
quote:

What you're doing now is trying to convert the entire TelephoneText object to an integer. You just need to convert the value of the object's Text property to an integer if that makes any sense yet.


No one explained that this was why .text needed added. That simple statement explained several things to me.

quote:

U need to have a different attitude.


This is my second programming class. Took basics last semester because that was my original degree field. Switched to networking when I realized that I wasnt getting it. I am not an idiot, I just had a hard time wrapping my head around learning computer language. This class is a requirement for Networking though.

I appreciate the help greatly from everyone. Thanks guys.
Posted by Doldil
The Ham
Member since Jan 2010
6214 posts
Posted on 11/5/14 at 8:42 am to
quote:

I am not an idiot, I just had a hard time wrapping my head around learning computer language.


I went through my entire first couple of vb.net classes getting through alright but not really understanding the logic of everything...about the start of my 3rd quarter and my first C# class things just kind of clicked and everything started making sense. The logic behind programming can sometimes take a little bit to click, especially when it's all new to you.

I don't do programming in my day to day job, but occasionally have to do a little bit of it. It's definitely nice to know the basics, so keep at it and you'll be fine.
first pageprev pagePage 1 of 1Next pagelast page
refresh

Back to top
logoFollow TigerDroppings for LSU Football News
Follow us on X, Facebook and Instagram to get the latest updates on LSU Football and Recruiting.

FacebookXInstagram