Results 1 to 8 of 8

Thread: [RESOLVED] [2005] Displaying text on form

  1. #1

    Thread Starter
    Lively Member Amerigo's Avatar
    Join Date
    Dec 2008
    Location
    PSR B1620-26 c-1
    Posts
    126

    Resolved [RESOLVED] [2005] Displaying text on form

    I need to display text on the form (not a msgbox). Is that possible?
    A large text box would be acceptable if it's background could be made transparent with no border, but it seems that is not allowed.
    Anyone who does not wonder, is either omnipotent or a fool.
    Amerigoware <<<My Projects

  2. #2
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: [2005] Displaying text on form

    A label maybe?

    I'm going to assume that for some reason a label is not an option, but it is important that you specify why!
    If a label is indeed not an option, you can look into the Graphics.DrawString method (use the forms Paint event and the "e" PaintEventArgs object).

  3. #3

    Thread Starter
    Lively Member Amerigo's Avatar
    Join Date
    Dec 2008
    Location
    PSR B1620-26 c-1
    Posts
    126

    Re: [2005] Displaying text on form

    Lable? Ok. Can that be populated programmatically?

    Lable1 = myString
    or
    Lable1.text = myString
    Anyone who does not wonder, is either omnipotent or a fool.
    Amerigoware <<<My Projects

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [2005] Displaying text on form

    Yes, and its background can be set to transparent.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Lively Member Amerigo's Avatar
    Join Date
    Dec 2008
    Location
    PSR B1620-26 c-1
    Posts
    126

    Re: [2005] Displaying text on form

    Thank you both, but how do I get the "String" from the code to label?
    Anyone who does not wonder, is either omnipotent or a fool.
    Amerigoware <<<My Projects

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [2005] Displaying text on form

    What "String" from the code?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7
    Junior Member
    Join Date
    Dec 2008
    Posts
    29

    Re: [2005] Displaying text on form

    Code:
    dim mystring as string = "hello there!"
    
    label1.text = mystring

  8. #8

    Thread Starter
    Lively Member Amerigo's Avatar
    Join Date
    Dec 2008
    Location
    PSR B1620-26 c-1
    Posts
    126

    Re: [2005] Displaying text on form

    nevermind, got it.
    Anyone who does not wonder, is either omnipotent or a fool.
    Amerigoware <<<My Projects

Posting Permissions

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



Click Here to Expand Forum to Full Width