Results 1 to 9 of 9

Thread: [ActiveX Control] Textbox Height

  1. #1

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Arrow [ActiveX Control] Textbox Height

    I'm making an ActiveX Control that can display messages in Balloons (like Windows XP-style), to act a an alert method better than a Tooltip but not as formal as a messagebox.

    The balloon is automatically sized using the caption's AutoSize and WordWrap property. This works fine when you let the balloon pop up once. If you do it twice, however, the code doesn't work anymore. If you download the test program you'll see what I mean. Can anyone help me with this? Thanks.
    Attached Files Attached Files
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Got example code to use with it??
    I'm trying:

    Balloon1.ShowMessage Text1.Text, Exclamation, "Text1"

  3. #3

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Yes, sample code's attached. You should open Group1 instead of the control. Then run Project2. The problem is only encountered with text that needs at least two lines.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by TheVader
    Yes, sample code's attached. You should open Group1 instead of the control. Then run Project2. The problem is only encountered with text that needs at least two lines.
    Well D'oh!

    Brb.

  5. #5

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Can you check it out again, please?

    Anyone else care to take a look?
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  6. #6
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Do you want to do this for fun or cause you can't find other code to show a balloon tooltip?


    Has someone helped you? Then you can Rate their helpful post.

  7. #7

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    For fun and practicing. And I don't like to use controls I haven't written myself.

    This can't bee too difficult... :S The tip is showing fine once, so mainly only the properties should have to be reset to the default values and it would work over and over...
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by TheVader
    For fun and practicing. And I don't like to use controls I haven't written myself.

    This can't bee too difficult... :S The tip is showing fine once, so mainly only the properties should have to be reset to the default values and it would work over and over...
    I didn't look at it too much, but I think there's a problem with the way you're setting the autosize/wordwrap properties at different points in your code.

    Is it necessary to do it in the HideMessage method??

    Also, I think this needs a look at:

    VB Code:
    1. Private Sub UserControl_Resize()
    2.  
    3. shpBalloon.Width = UserControl.Width
    4. shpBalloon.Height = UserControl.Height
    5. lblCaption.Width = UserControl.Width - 650
    6. lblCaption.Height = UserControl.Height - 240
    7.  
    8. End Sub

    Because if you play around with the autosize values, the 3rd line above causes it to shrink.

    But as I said, I didn't take much of a look at it. SOz.

  9. #9

    Thread Starter
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    Thanks, it was indeed the resizing. In the HideMessage sub I added some code to reset the control to its original size. That did it.
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

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