Results 1 to 11 of 11

Thread: Is this alright....

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Is this alright....

    Just wanted to check and see if this was alright to do

    VB Code:
    1. messagelogtxt.text = RTrim(messagelogtxt.Text)

    Thanks in Advance.
    Don't Rate my posts.

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    To right trim the contents of a textbox, yes.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278
    hi,

    perfectly fine
    shoot some another question ......

    regds,
    ashay

  4. #4

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Ok cool

    Thanks Guys.

    I'll see if I can think up another dumb question for ya.
    Don't Rate my posts.

  5. #5
    Hyperactive Member ashay's Avatar
    Join Date
    Feb 2002
    Location
    Mumbai,India
    Posts
    278
    hi,

    wow....so u got more dumber ones too......

    regds,
    ashay

  6. #6

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Ok I need an Icon to represent the Clearing of a Chat window. Something like an Eraser or a Pencil with an Eraser on the end.

    It has to be 265 as its for a Toolbar.

    Thanks in Advance.
    Don't Rate my posts.

  7. #7
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    messagelogtxt.text = RTrim(messagelogtxt.Text)
    This coerces a string into a variant, right trims it and then coerces it back into a string. To avoid the data type coercion overhead use Rtrim$...

    HTH,
    Duncan

  8. #8
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Originally posted by Merrion


    This coerces a string into a variant, right trims it and then coerces it back into a string. To avoid the data type coercion overhead use Rtrim$...

    HTH,
    Duncan

    VB Code:
    1. Private Sub Form_Load()
    2.     MsgBox TypeName(RTrim("arg "))
    3. End Sub
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  9. #9

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Is "coerces a string into a variant" a good thing or a bad thing?

    Don't Rate my posts.

  10. #10
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Originally posted by Pc_Madness
    Is "coerces a string into a variant" a good thing or a bad thing?

    Its a bad thing.
    Allowing VB to coerce things - nono.
    And working with variants, unless you're delibrately doing it, then its a bad idea.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  11. #11

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Don't worry, I found a reasonable Eraser Icon.
    Don't Rate my posts.

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