Visual Basic 6 question


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Visual Basic 6 question

    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
    Attached Images Attached Images  

  2. #2
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    Thanks, works great!

  4. #4
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Another VB6 question

    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

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    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

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  2. Visual Basic 6 and Vista
    By cooksydesign in forum Off Topic
    Replies: 2
    Last Post: - 11th February 2008, 13:54
  3. Visual Basic 6 and Pic com
    By shawn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th September 2005, 05:21
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. '877 and Visual Basic 6
    By Tomas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th March 2004, 02:31

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts