|
-
Mar 29th, 2007, 01:17 AM
#1
Thread Starter
Junior Member
[resolved] VB Applications
hello.. hw can i make vb appkication, which asks the user for first name, middle name, and title and address. it displays first character of the first name, first character of the middle name and the title on one lable and address on another label..
thnx for rplyin..
Last edited by adad; Mar 29th, 2007 at 01:52 AM.
Reason: resolved
-
Mar 29th, 2007, 01:23 AM
#2
Re: VB Applications
The best way would be to put TextBoxes on a form or something to have them enter their info.
Not sure if this is how you want it but, add 2 labels on your form. lblName and lblAddress
vb Code:
Option Explicit
Private strFName As String 'First name.
Private strMName As String 'Middle name.
Private strTitle As String 'Title.
Private strAddress As String 'Address.
Private Sub Form_Load()
strFName = InputBox("Enter your first name: ")
strMName = InputBox("Enter your middle name: ")
strTitle = InputBox("Enter a title: ")
strAddress = InputBox("Enter your address: ")
lblName.Caption = Left$(strFName, 1) & " " & Left$(strMName, 1) & " " & strTitle
lblAddress.Caption = strAddress
End Sub
-
Mar 29th, 2007, 01:26 AM
#3
Hyperactive Member
Re: VB Applications
Code:
Dim strFirst, strMiddle as String
Dim strAddress, strTitle as string
strFirst = inputbox("Enter your First name")
strMiddle = inputbox("Enter your Middle name")
strTitle = inputbox("Enter your Title")
strAddress = inputbox("Enter your Address")
Label1.Caption = Left$(strFirst,1) & " " & Left$(strMiddle,1) & " " & strTitle
Label2.Caption = strAddress
something like that?
-
Mar 29th, 2007, 01:28 AM
#4
Hyperactive Member
Re: VB Applications
Dang...mine hung while posting and you beat me to it
-
Mar 29th, 2007, 01:30 AM
#5
Re: VB Applications
We all like doing other ones homework in here, don't we
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Mar 29th, 2007, 01:30 AM
#6
Lively Member
Re: VB Applications
Is this a posting race? The fastest poster will win 1 million dollars. lol.
-
Mar 29th, 2007, 01:32 AM
#7
Hyperactive Member
Re: VB Applications
 Originally Posted by opus
We all like doing other ones homework in here, don't we
Yes we do.
I find the best way to learn how to code is to look at somebody else's code.
-
Mar 29th, 2007, 01:34 AM
#8
Lively Member
Re: VB Applications
Hey opus and Capp, I have lots of homework. Do you wanna take care of my homeworks? lol. Yes, you're maybe right looking at others problems eh?
-
Mar 29th, 2007, 01:41 AM
#9
Re: VB Applications
 Originally Posted by Capp
Yes we do.
I find the best way to learn how to code is to look at somebody else's code.
That's how I learned. 
 Originally Posted by opus
We all like doing other ones homework in here, don't we
When it's something like this that takes about 30 seconds to write I really don't mind too much. Especially since the best way to learn sometimes is by looking at other code as Capp said.
-
Mar 29th, 2007, 01:45 AM
#10
Re: VB Applications
It's true actually. We learned from other's problems. Everyday, we gained new information by the problems of others and we try to solved it. By that way, we develop our skills. And not just that, It's a good thig to help others, right?
-
Mar 29th, 2007, 01:49 AM
#11
Thread Starter
Junior Member
Re: VB Applications resolved
 Originally Posted by DigiRev
The best way would be to put TextBoxes on a form or something to have them enter their info.
Not sure if this is how you want it but, add 2 labels on your form. lblName and lblAddress
vb Code:
Option Explicit
Private strFName As String 'First name.
Private strMName As String 'Middle name.
Private strTitle As String 'Title.
Private strAddress As String 'Address.
Private Sub Form_Load()
strFName = InputBox("Enter your first name: ")
strMName = InputBox("Enter your middle name: ")
strTitle = InputBox("Enter a title: ")
strAddress = InputBox("Enter your address: ")
lblName.Caption = Left$(strFName, 1) & " " & Left$(strMName, 1) & " " & strTitle
lblAddress.Caption = strAddress
End Sub
thnx
-
Mar 29th, 2007, 01:55 AM
#12
Thread Starter
Junior Member
Re: VB Applications
 Originally Posted by Capp
Code:
Dim strFirst, strMiddle as String
Dim strAddress, strTitle as string
strFirst = inputbox("Enter your First name")
strMiddle = inputbox("Enter your Middle name")
strTitle = inputbox("Enter your Title")
strAddress = inputbox("Enter your Address")
Label1.Caption = Left$(strFirst,1) & " " & Left$(strMiddle,1) & " " & strTitle
Label2.Caption = strAddress
something like that?
thnx bro..
-
Mar 29th, 2007, 01:56 AM
#13
Thread Starter
Junior Member
Re: [resolved] VB Applications
thnx for rplyin to all of u..
-
Mar 29th, 2007, 01:56 AM
#14
Re: VB Applications
 Originally Posted by zynder
It's true actually. We learned from other's problems. Everyday, we gained new information by the problems of others and we try to solved it. By that way, we develop our skills. And not just that, It's a good thig to help others, right?
I learned programming the same way, however if a thread sounds too much like homework, I prefer to give hints using pseudo-code, that way you need to think and not only copy&paste!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Mar 29th, 2007, 02:07 AM
#15
Thread Starter
Junior Member
Re: VB Applications
 Originally Posted by opus
I learned programming the same way, however if a thread sounds too much like homework, I prefer to give hints using pseudo-code, that way you need to think and not only copy&paste!
yes u r right.. thnx bro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|