Results 1 to 8 of 8

Thread: [RESOLVED] Stupid Baloons $#@!!!

  1. #1

    Thread Starter
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Resolved [RESOLVED] Stupid Baloons $#@!!!

    I think I'm going to kill somebody because of this. The same code, the same window position, everything is the same, one time it is displayed correctly, but another time it's upside down (7 hours are wasted so far):

    Here's the code:
    vb.net Code:
    1. ' Tips is Windows.Forms.ToolTip component.
    2.  
    3. Try
    4.     Matches = Regex.Matches(InputBuffer, pattern)
    5. Catch ex As ArgumentException
    6.     rtbRegex.BackColor = Color.Pink
    7.     rtbRegex.Select()
    8.     With Tips
    9.         .IsBalloon = True
    10.         .ToolTipTitle = "Error"
    11.         .ToolTipIcon = ToolTipIcon.Error
    12.         .UseAnimation = True
    13.         .UseFading = True
    14.         .Show("The regular expression is invalid.", rtbRegex, 3000)
    15.     End With
    16.     Exit Sub
    17. End Try

    And here's what I get (I repeat - I didn't change anything, just typed in a ( then deleted and typed it again:



    Does anybody know how to make it behave correctly?

    Does anybody

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Stupid Baloons $#@!!!

    Handle the 4th argument

    Code:
    .Show("The regular expression is invalid.", rtbRegex, 0,0,3000)
    where the 0,0 is the relative position

    MSDN
    Last edited by danasegarane; Feb 18th, 2010 at 04:01 AM.
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Stupid Baloons $#@!!!

    I tested the x and y co-ord with similar results. In my case it starts of in the wrong spot, then next time round it's ok providing I get it to re-display while its on.
    Last edited by Bruce Fox; Feb 18th, 2010 at 03:59 AM.

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: Stupid Baloons $#@!!!

    It appears that the top left corner of the TT is the anchor/reference point for it's display, not nesseserly the tip.

  5. #5
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Stupid Baloons $#@!!!

    Quote Originally Posted by Bruce Fox View Post
    It appears that the top left corner of the TT is the anchor/reference point for it's display, not nesseserly the tip.
    I agree. Only the top tip is relative. Not the Ball on
    Please mark you thread resolved using the Thread Tools as shown

  6. #6

    Thread Starter
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Stupid Baloons $#@!!!

    I gave up and dropped the idea, now it's a normal rectangle tooltip. I tried it with every overload that is available for the .Show method - it always displays incorrectly for the first time. It seemed logical to me to provide the property for the anchor point I want it point to and the properties for the rectangle itself. This 'automatic' mode seems to have some stupid bug.

  7. #7
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Stupid Baloons $#@!!!

    This one worked well for me

    Code:
      With ToolTip1
                .IsBalloon = True
                .UseAnimation = True
                .UseFading = True
                .ShowAlways = False
                .SetToolTip(TextBox1, "Test")
                .Show("Seocnd", TextBox1, TextBox1.Width - 4, 0)
    
            End With
    Please mark you thread resolved using the Thread Tools as shown

  8. #8

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