View Full Version : Visual Basic 6 question
Christopher4187
- 1st July 2006, 19:12
Hi,
I have been trying to do something for a few hours now and I need help. I have attached a picture so if my question isn't clear, you can take a look at it. When you run a form in VB6, how can you change the title of that form? It seems like something so simple but I can't get it.
Chris
Luciano
- 1st July 2006, 19:43
Hi,
At run-time:
Form1.Caption = "Hello this is the form caption!"
or
Me.Caption = "Hello this is the form caption!"
* * *
At Design Time:
Change the property "Caption" of the form.
* * *
Best regards,
Luciano
Christopher4187
- 1st July 2006, 22:08
Thanks, works great!
Christopher4187
- 3rd July 2006, 12:47
I know I saw this topic somewhere in the forum about a week or two ago but I can't seem to find it now. What I am doing is receiving a number (10048757 5A) and using an if-then statement to execute a command. The first number (10048757) tells VB what device it is and the second number (5A) tells VB that status of the device. Right now I am using an if then:
If string= 10048757 5A then
deviceA="on"
endif
This works good but there are some devices that have analog values. The one previously mentioned is digital (either 55 or 5A). So, what I am trying to do is ignore the larger number and do something like this:
text1.text=5A
but the string variable is 10048757 5A. How can I ignore the larger number and only display the 5A or any other number?
Thanks,
Chris
Luciano
- 3rd July 2006, 12:57
Hi,
Use the the "Right" Function.
The Right function returns a specified number of characters from the right side of a string.
See also "Left" Function.
Best regards,
Luciano
mister_e
- 3rd July 2006, 13:06
If some are interested, i have a huge and great VB6 reference EBOOK in here. Unfortunately it's to big to fit here, just drop me your e-mail on my PM and i can send it to those who need.
Also, Bruce have a great and short tutorial on VB bellow
http://www.rentron.com/VisualBasic.htm
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.