hey all, ok i have this really small program that needs one more thing to get it completed and i am extremly new to visual basic and i just can't figure this out.
Ok, so this is a program that when u debug it, you put in you first and last name and then click calculate, then an inputbox comes up asking: "What grade do you teach?" you can put any grade in, so i put "6" in (without the quotes) and then when i click ok another box comes up and is susposed to say, "John Smith teaches grade 6" but when i click the ok button it only displays "John smith teaches grade" and doesn't display the number 6, that's all i am tryign to display. Does any one no how to get that number 6, or any number really to be displayed? If you could check this out that'd be great! Here is the code, the interface is 2 text boxes, 1 asking for your first name and the other asking for your last name, and a button saying "calculate"
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Employee As New Person
Dim strgrade As Integer
Dim DOB As Date
strgrade = InputBox("What Grade Do you Teach?", "Grade Ask")
MessageBox.Show(Employee.FirstName & " " & Employee.LastName _
& " teaches grade " & Employee.Age(DOB) & "")
Public Class Person
Private Name1 As String
Private Name2 As String
Public Property FirstName() As String
Set(ByVal value As String)
Name1 = value
Public Property LastName() As String
Set(ByVal value As String)
Name2 = value
Public Function Age(ByVal Birthday As Date) As Integer
Return Int(Now.Subtract(Birthday).Days / 365.25)
Public Class Teacher
ok i "stepped into" it and nothing happens once it gets into the string, it displays "John Smith teaches grade 2007" because of the DOB...
I no this program seems weird, but my prof. gave this to me as a birthday date program, originaly you were suspossed to put in ur first and last name and then you picked a date from this calendar and then once u clicked ok it would display in a messageBox saying "John Smith is 6 years old." But just for fun he gave this to me and told me to try and ask around to see if i could get it working. because he has the working one and won't show it to me until i have it working.
o ok sorry, isn't this fourm here to help and direct me in the right direction... can anyone else anser to this problem i'm having, i don't see why just you have to respond, this is the best fourm i'm told to, all other VB forums suck. does anyone else know what else i'd need to?
Let's see, you've been given an assignment, one where you have to solve a problem. Then you come here and just want the answer to the problem handed to you. What would you learn in the process?? Would you pass the assignment?? Maybe. But, will you pass the next one??
You already have everything you need to solve the problem. You've been given all kinds of hints on where to look and what you might want to search for and do research on. BTW: The #1 skill you MUST have as a developer is the ability to do research on problems and possible solutions. It's not actually writing code...
ok well i am still going to mess around with this program. I am not going to be a developer because theres a ridiculous amount of crap you have to learn in order to be able to code something. there is so much crap that i not needed in visual basic. This course is just a requirement that is part part of my degree.
The research skills apply to problem solving. That's the whole point behind the exercise. Your problem can be solved in a single line of code. Noone here is going to write it for you because you won't learn anything if we did.
wow do i feel like a douche... I read over your replys a few times, i really thought about it and did research for an hour today and some how i got the program to work. It displays the corret message and everything, and you were totaly right and i didn't even see it, "The #1 skill you MUST have as a developer is the ability to do research on problems and possible solutions." i just wanna thank you for giving me that tip, i gave it some though last night and i made it happen today!
And Test on Hyper Termonal Program (by TCP/IP winsock)
1. type "w" is Forward
2. type "s" is Backward
3. type "a" is turn Left
4. type "d" is turn Right
5. type other is stop
but main problem is
Application VB.NET on Pocket PC
1. How to send word "w,s,a,d" to robot by wireless of Pocket PC
1.1 what namespace ?
1.2 what Reference ?
1.3 what member , class and properties in use ?
2. In .NET 2.0 Compact Framework is support this problem ?
and i want example program.
Thank you very much .
ps. I'm sorry if you don't understand this question , I can speak English a little bit.
The remote server returned an error: (500) Syntax error, command unrecognized.
When I try to get the size of a file, The code matches what I found on the net and I also download a class with this function in it and I still get the same error. This has been driving me nuts for days now, I can't find any thing else on the matter on the net!
here is the code:
Dim u As New System.Uri("ftp://192.168.0.33/logo.ycb")
Dim FTPclient2 As System.Net.FtpWebRequest = CType(System.Net.FtpWebRequest.Create(u), System.Net.FtpWebRequest)
FTPclient2.Credentials = New System.Net.NetworkCredential(mLogin, mPassword)