Page 102 of 105 FirstFirst ... 2529299100101102103104105 LastLast
Results 4,041 to 4,080 of 4199

Thread: CommonControls (Replacement of the MS common controls)

  1. #4041
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    You only can archive this goal if you draw your own control using OwnerDraw....
    check the VBCCR source code, there is plenty of code how to draw your own controls.
    See CheckBoxW.ctl -> WindowProcUserControl -> DrawThemeBackground (this api draws for example the checkbox)
    Last edited by Mith; Jul 11th, 2025 at 09:39 AM.

  2. #4042
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    Hi Krool,

    i have a problem with the "RightToLeft" property of your controls. For example:

    when i set RightToLeft=TRUE only the caption text moves to the right but the checkbox or optionbutton not.
    Normally the checkbox or optionbutton should be displayed on the right side of the caption text.

    Is this bug or how can i solve this?

    Attachment 195148

  3. #4043

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    Hi Krool,

    i have a problem with the "RightToLeft" property of your controls. For example:

    when i set RightToLeft=TRUE only the caption text moves to the right but the checkbox or optionbutton not.
    Normally the checkbox or optionbutton should be displayed on the right side of the caption text.

    Is this bug or how can i solve this?

    Attachment 195148
    It's to keep vb6 compat. Set the .Alignment property to Right.

  4. #4044
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    3,560

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    You only can archive this goal if you draw your own control using OwnerDraw....
    As I said, this is at best a workaround, so I will wait until this is achieved in the base controls, if it isn't then I won't use the control. I do have another workaround in any case.

    The issue is that VB6 programs running on 4K+monitors look increasingly puny, you cannot rely on desktop scaling as it has a potential effect on other programs and in any case, I never trust any feature provided by Microsoft to survive very long, deprecation or change...
    Also, factor in that running VB6 programs on emulators or via Wine on non-Windows systems means that desktop scaling of controls may simply not be available.

    VB6 programs have the possibility to stand on their own using manual scaling but only if the core controls can scale in ratio to the form. Only these tow fail to do so. I am sure that it will be incorporated into the Krool's controls sometime in the future, scaling is a benefit. I just see it as a matter of time - and as I said, I have a workaround.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  5. #4045
    Lively Member
    Join Date
    Oct 2016
    Posts
    115

    Re: CommonControls (Replacement of the MS common controls)

    FrameW will not let you edit controls within the frame in design mode if it's disabled

  6. #4046
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    FrameW will not let you edit controls within the frame in design mode if it's disabled
    I can reproduce this too. With a disabled MS frame you can edit the controls...

    I think Krool forgot to distinguish between design and run-time mode.

  7. #4047

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Semke View Post
    FrameW will not let you edit controls within the frame in design mode if it's disabled
    Thanks. Fixed by using a helper PropEnabled variable and set UserControl.Enabled only when not in design mode.

  8. #4048
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Question Strange behavior of the RichtextBox

    Hi Krool,

    i have a strange problem with the RichTextBox control:

    Normally i can start editing the text after loading a text file into the RichTextBox but with some text files "Editing" is like locked:

    1. I click with the mouse somewhere random in the RichTextBox and start typing but nothing happen.

    2. I ONLY can select some amount of chars of some random text and after that i can exactly type this amount of chars anywhere in the Richtextbox!

    It is like that the normal Edit-Mode is internally locked and only some kind of text-replace-mode is available!

    Code:
    RichTextBox1.LoadFile sTextFile, RtfLoadSaveFormatUnicodeText
    RichTextBox1.Enabled=True
    RichTextBox1.Locked=False
    RichTextBox1.AllowOverType=False
    RichTextBox1.OverTypeMode=False
    RichTextBox1.TextMode=1
    All text files are stored with UTF-16 BOM and have the same access rights and attributes.

    Any ideas how to fix this strange editing problem?
    Last edited by Mith; Jul 20th, 2025 at 07:21 AM.

  9. #4049
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    I found a solution to fix this problem:

    i had to set the property "MaxLength" from 0 to 200.000 to enter more text.
    The amount of characters in the loaded text files is always below 200.000 chars.

    Can you explain how "0" limits the amount of chars you can enter?

  10. #4050
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    OK, i think i got it now! I found this info:

    "When this property is set to 0, the maximum length of the text that can be entered in the control is 64 KB of characters. You can use this property to restrict the length of text entered in the control."

    I thought 0 means unlimited or the maximum available amount...

  11. #4051
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Question Richtextbox GetLineCount returns a wrong value when using word wrap

    VBCCR 1.8.77 VB6SP6

    GetLineCount returns 5 using the following text in a Richtextbox and using .ScrollBars = vbBoth:

    Code:
    Whereas recognition of the inherent dignity and of the equal and inalienable rights of all members of the human family is the foundation of freedom, justice and peace in the world, 
    Whereas disregard and contempt for human rights have resulted in barbarous acts which have outraged the conscience of mankind, and the advent of a world in which human beings shall enjoy freedom of speech and belief and freedom from fear and want has been proclaimed as the highest aspiration of the common people, 
    Whereas it is essential, if man is not to be compelled to have recourse, as a last resort, to rebellion against tyranny and oppression, that human rights should be protected by the rule of law, 
    Whereas the peoples of the United Nations have in the Charter reaffirmed their faith in fundamental human rights, in the dignity and worth of the human person and in the equal rights of men and women and have determined to promote social progress and better standards of life in larger freedom, 
    Whereas Member States have pledged themselves to achieve, in cooperation with the United Nations, the promotion of universal respect for and observance of human rights and fundamental freedoms,
    GetLineCount returns 12 after setting rtfLang.ScrollBars = vbVertical to word wrap the text.

    Is this a bug?

    How can i get the "real" LineCount of 5 to use .GetLine(i) to get the 5 lines without the word wrap?

  12. #4052
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,733

    Re: CommonControls (Replacement of the MS common controls)

    Then you want the number of hard line breaks?
    Don’t know whether there’s a method fir that.
    You can always check it yourself by examining the .TextRtf or .Text

  13. #4053
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Arnoutdv View Post
    Then you want the number of hard line breaks?
    I found a workaround:

    Code:
    ' Doesnt work correct with word wrap (Scrollbars=vbvertical)
    For I = 1 To rtfLang.GetLineCount
     Line = rtfLang.GetLine(I)
    Next I
    
    ' workaround:
    Rows = Split(rtfLang.Text, vbCrLf)
    For I = 0 To UBound(Rows)
     Line = Rows (I)
    Next I

  14. #4054

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mith View Post
    I found a workaround:

    Code:
    ' Doesnt work correct with word wrap (Scrollbars=vbvertical)
    For I = 1 To rtfLang.GetLineCount
     Line = rtfLang.GetLine(I)
    Next I
    
    ' workaround:
    Rows = Split(rtfLang.Text, vbCrLf)
    For I = 0 To UBound(Rows)
     Line = Rows (I)
    Next I
    Yes EM_GETLINECOUNT works weird in RichTextBox when word wrap is on.
    You may split text by vbCrLf when .UseCrLf property is True only. Otherwise it is vbCr or vbLf (don't know now) only.

  15. #4055
    New Member
    Join Date
    Jul 2025
    Posts
    4

    Re: CommonControls (Replacement of the MS common controls)

    Hello,
    I'm trying to replace the MSCOMCTL library in MS Access. I've added a TreeView component and I'm attempting to handle an event with the following code:
    Code:
    Private Sub TreeView_Expand(ByVal Node As VBCCR18.TvwNode)
       Debug.Print "Key is" & Node.Key
    End Sub
    However, when I open the form, I receive an error.
    The expression [key up| mouse move|Node click|Mouse up|Click (any of this option)] you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name.

    The next events are processed correctly as long as I remove the event Expand.
    Code:
    Private Sub TreeView_DblClick()
    Debug.Print "abcd"
    
    End Sub
    
    Private Sub TreeView_Click()
    Debug.Print "abcd"
    
    End Sub
    and there is no other code.

  16. #4056
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,733

    Re: CommonControls (Replacement of the MS common controls)

    Did you just change the existing Event handlers from the original Treeview?
    You should use the events from the CommonControls TreeView and then add/copy the code from the original TreeView events.

  17. #4057
    New Member
    Join Date
    Jul 2025
    Posts
    4

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Arnoutdv View Post
    Did you just change the existing Event handlers from the original Treeview?
    You should use the events from the CommonControls TreeView and then add/copy the code from the original TreeView events.
    First, I took my existing forms and replaced components from MSCOMCTL with those from VBCCR, but that approach didn't work.

    Now, I created a new form, added a VBCCR18.TreeView component to it, and am trying to adapt old code to these new controls.

    But I ran into an issue where the needed event doesn't fire properly. It doesn’t work even on a clean new form without other code or components.

    To be honest, VB is not my language, I worked with it over 20 years ago when I was just starting to learn programming from a book, and since then I haven't had any experience with VBA.
    So I might’ve missed something important here. Could you please provide me with a minimal example showing how to handle the node expansion event (for instance, display the node's text)?

    thx

  18. #4058
    New Member
    Join Date
    Jul 2025
    Posts
    4

    Re: CommonControls (Replacement of the MS common controls)

    looks like, I've figured it out, thank you for guiding me.

  19. #4059
    New Member
    Join Date
    Feb 2022
    Posts
    7

    Re: CommonControls (Replacement of the MS common controls)

    I've noticed an issue with the CommandButtonW control. I have them on a panel on an MDI form as the main toolbar. If the focus goes off the form (to another window/application), and the button is then clicked without the MDI form becoming active first, the click event does not fire. The button responds to the visual styles still (hover effect). If I instead click a regular button, the click event is performed, even if the form doesn't have the focus.

  20. #4060
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    AutoSize Feature Request

    Hi Krool,

    i have a feature request for the CheckboxW and the OptionButtonW:

    Can you add the existing AutoSize property from the LabelW control to the CheckboxW and the OptionButtonW control?

    This can be very useful when having a GUI that is translated into other languages.

    The length of the displayed text can be so different in every language and it is a pain in the ass to check all forms with all languages to check no text is truncated.

    I think the exisiting core functionality of the AutoSize property from the LabelW control only needs to adapted to the other controls.

    What do u think?

  21. #4061

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: AutoSize Feature Request

    Quote Originally Posted by Mith View Post
    Hi Krool,

    i have a feature request for the CheckboxW and the OptionButtonW:

    Can you add the existing AutoSize property from the LabelW control to the CheckboxW and the OptionButtonW control?

    This can be very useful when having a GUI that is translated into other languages.

    The length of the displayed text can be so different in every language and it is a pain in the ass to check all forms with all languages to check no text is truncated.

    I think the exisiting core functionality of the AutoSize property from the LabelW control only needs to adapted to the other controls.

    What do u think?
    It's certainly possible but not trivial, because there is no message or anything which does it for you. So, I would need to code it and check for each style combination do make the best fit. (if MS introduces new styles, the property would get outdated)
    So, I would recommend to make a hidden Label and set the Caption and let it autosize and then apply the width of that hidden label plus the "extra width" to your CheckBoxW/OptionButtonW.

    According to reactOS the "extra width" would be the checkBoxWidth + text_offset: (for a normal CheckBoxW/OptionButtonW without fancy styles, imagelist etc.)
    Code:
    checkBoxWidth  = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1;
    Code:
    GetCharWidthW( hDC, '0', '0', &text_offset );
    text_offset /= 2;
    Quote Originally Posted by hausman View Post
    I've noticed an issue with the CommandButtonW control. I have them on a panel on an MDI form as the main toolbar. If the focus goes off the form (to another window/application), and the button is then clicked without the MDI form becoming active first, the click event does not fire. The button responds to the visual styles still (hover effect). If I instead click a regular button, the click event is performed, even if the form doesn't have the focus.
    What is that "panel" for a control ? I can't reproduce it with a simple UserControl control container placed on the MDI form..
    Last edited by Krool; Jul 29th, 2025 at 10:01 AM.

  22. #4062
    New Member
    Join Date
    Feb 2022
    Posts
    7

    Re: AutoSize Feature Request

    Quote Originally Posted by Krool View Post
    What is that "panel" for a control ? I can't reproduce it with a simple UserControl control container placed on the MDI form..
    That was it... the panel was a old 3rd party FramePlus control. Switching to a PictureBox (for testing) solved the issue. Thanks!

  23. #4063
    New Member
    Join Date
    Jul 2025
    Posts
    4

    Re: CommonControls (Replacement of the MS common controls)

    Hello.

    I have a question regarding how to use this component with the x64 version of Office. When trying to connect the component, VBA shows that the reference is missing, but that's not true, as the file is in place.

    When opening the document, I receive an error:

    The expression On open you entered as event property setting produced the following error: A problem occured while <docname> was communication with the OLE server or ActiveX Control.

    Does a version of the component for x64 exist?

  24. #4064

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by mmorzhakov View Post
    Hello.

    I have a question regarding how to use this component with the x64 version of Office. When trying to connect the component, VBA shows that the reference is missing, but that's not true, as the file is in place.

    When opening the document, I receive an error:

    The expression On open you entered as event property setting produced the following error: A problem occured while <docname> was communication with the OLE server or ActiveX Control.

    Does a version of the component for x64 exist?
    The code is x64 ready. However, it can only be compiled to x64 ocx with twinBASIC.
    Since twinBASIC is beta and has still known issues there is no pre-compiled x64 ocx yet.

  25. #4065
    New Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    12

    Re: CommonControls (Replacement of the MS common controls)

    Perhaps, this document can also be referred to

    VBCCR (VB6 ActiveX Universal Control Alternative Library) supports native unicode characters
    https://doc.vb6.pro/vbccr/

  26. #4066
    New Member woeoio's Avatar
    Join Date
    Jan 2022
    Posts
    12

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by woeoio View Post
    Perhaps, this document can also be referred to

    VBCCR (VB6 ActiveX Universal Control Alternative Library) supports native unicode characters
    https://doc.vb6.pro/vbccr/
    https://doc.vb6.pro/en/vbccr/

  27. #4067
    Hyperactive Member
    Join Date
    Mar 2009
    Posts
    264

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by yereverluvinuncleber View Post
    The scaling performed above is being performed in code to allow a form to be scaled dynamically by dragging the corner up or down to resize. All controls are anchored and during a resize event are sized by proportion to the scaling of the whole form.
    But what you want isn't normal form/windowscontrols behaviour. When I resize a window I expect to get more room, not controls to resize with it. I made a few controls myself and I never even considered what you want as that isn't normal Windows behaviour. Resizing a window does not scale controls, with regular window forms. That kind of thing is mostly done on windows with external applications making only scale the specified window, as if you had set scaling in windows itself.

    Maybe Twinbasic supports it, but that's because they wrote their own controls for their window form behaviour, they're not using standard window controls for that.

  28. #4068
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    TREEVIEW BUG:
    The item with INDEX=10 is selected and in focus state
    But when I check other options, the focus will switch, and after checking, it will return to the original focus, causing visual flickering

  29. #4069
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    Can a new attribute be added to label w and textw: vertical centering.
    For example, if the font height is 12 pixels and the control height is 30 pixels, let the font start displaying at the top=9 position

  30. #4070
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    how to add images when run exe?
    ImageList1.ListImages.Add(?
    how to set iamges size(24bit? 128*128)?

    treeeview can set iamges without ImageList1 control?

  31. #4071
    New Member
    Join Date
    Sep 2025
    Posts
    7

    Re: CommonControls (Replacement of the MS common controls)

    hello,Krool, can LISTVIEW enhance the modification function? For example, can it be set whether a certain column and a certain row are allowed be modified? You provide the modification call in LISTVIEW, and I can write a two-dimensional array to store the modification flag of each cell in the entire LISTVIEW When I need to modify a certain cell, I can directly call your modification, such as modifying the table header data: LISTVIEW1.LvwColumnHeader.fixrow, column, modification flag)
    Modify sub-item: LISTVIEW1.LvwListSubItem.fix(row, column, modification flag). Although are some table controls that can be used, my data is not much, at most a few rows and columns, and the use of listview is also very intuitive. I am forward to your reply.

  32. #4072
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    ListView ReportMode Header TooTipText not shown

    VBCCR 1.8.77
    VB6SP6, Win10

    Hi Krool,

    a ToolTipText isnt shown when hovering the mouse over a listview header (View:Report):

    Code:
    Dim xHeader As LvwColumnHeader
    Set xHeader = lvwFolder.ColumnHeaders.Add(, , "Name")
    xHeader.ToolTipText = "test123"
    Bug or do i something wrong?

  33. #4073

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: ListView ReportMode Header TooTipText not shown

    Quote Originally Posted by Mith View Post
    VBCCR 1.8.77
    VB6SP6, Win10

    Hi Krool,

    a ToolTipText isnt shown when hovering the mouse over a listview header (View:Report):

    Code:
    Dim xHeader As LvwColumnHeader
    Set xHeader = lvwFolder.ColumnHeaders.Add(, , "Name")
    xHeader.ToolTipText = "test123"
    Bug or do i something wrong?
    ShowColumnTips must be True.

  34. #4074
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    LISTVIEW , how to select a cell like excel?
    or when CELL SELECT CHANGE (ROW=2,COL=2)
    CELL BACK BOLOR=YELLOW?

    when CELL SELECT CHANGE (ROW=3,COL=3)
    CELL BACK BOLOR=YELLOW?
    last cell(2,2).back color=whilte?

    How to set the thickness, pixel size, and color of grid lines
    How to click on a cell with the mouse and modify the content like a text box


    Quote Originally Posted by Gosub60 View Post
    hello,Krool, can LISTVIEW enhance the modification function? For example, can it be set whether a certain column and a certain row are allowed be modified? You provide the modification call in LISTVIEW, and I can write a two-dimensional array to store the modification flag of each cell in the entire LISTVIEW When I need to modify a certain cell, I can directly call your modification, such as modifying the table header data: LISTVIEW1.LvwColumnHeader.fixrow, column, modification flag)
    Modify sub-item: LISTVIEW1.LvwListSubItem.fix(row, column, modification flag). Although are some table controls that can be used, my data is not much, at most a few rows and columns, and the use of listview is also very intuitive. I am forward to your reply.


    set/get cell value:
    Code:
    Public Property Get Cell(ByVal Row As Long, Col As Integer) As String
        Cell = ListView1.ListItems(Row).SubItems(Col - 1)
    End Property
    
    Public Property Let Cell(ByVal Row As Long, Col As Integer, ByVal vNewValue As String)
          ListView1.ListItems(Row).SubItems(Col - 1) = vNewValue
          Exit Property
          If Col = 1 Then 'MSCOMCTL_ListView
                ListView1.ListItems(Row).Text = vNewValue '?1??????N?????????
          Else
                ListView1.ListItems(Row).SubItems(Col - 1) = vNewValue
          End If
    End Property
    Last edited by xiaoyao; Sep 28th, 2025 at 04:36 AM.

  35. #4075
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xiaoyao View Post
    LISTVIEW , how to select a cell like excel?
    Excel doesn't use a ListView, but a Grid. A ListView and a Grid are two fundamentally different controls....

  36. #4076
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    i only want have a way to read txt(line=30,col=5) ,or edit value

    set cell back color,Set CellPicture
    set cell draw text start at 31px (1-30px draw picture or progress bar)

  37. #4077
    Fanatic Member Mith's Avatar
    Join Date
    Jul 2017
    Location
    Thailand
    Posts
    540

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xiaoyao View Post
    i only want have a way to read txt(line=30,col=5) ,or edit value

    set cell back color,Set CellPicture
    set cell draw text start at 31px (1-30px draw picture or progress bar)
    In this case you should use a grid instead of a list view...see VBFlexGrid Control

  38. #4078

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Often in this thread there was a request of how to apply unicode text to an intrinsic .ToolTipText property.

    This module is a lightweight solution that comes without hooks and is IDE safe even without thunks.
    It also allows multi-line tool tip texts.

    Ensure that InitVBBubbleW is called once. Any valid Form object is enough. It is just needed to ensure that VBBubble class is loaded and the handle is retrieved.

    Code:
    Private Sub Form_Load()
    Call InitVBBubbleW(Me)
    End Sub
    You can unload it manually by calling ReleaseVBBubbleW. However, this is optional as it will be called automatically.
    Code:
    Call ReleaseVBBubbleW
    Example of setting a unicode text with optional draw flags and with an optional max width of 400 pixels. (if ommited, defaults to -1 which means no limit)

    Code:
    Const DT_RTLREADING As Long = &H20000
    Call SetToolTipTextW(MonthView1, "test" & vbLf & ChrW(5000) & ".", DT_RTLREADING, 400)
    Example of retrieving the unicode text.

    Code:
    Debug.Print GetToolTipTextW(MonthView1)
    Setting the .ToolTipText directly is still supported and cause no harm. It will be displayed as ANSI then and is limited to 255 characters, but multi-line still being supported.

    To note is that this module is standalone and does not have any dependency.
    Attached Files Attached Files
    Last edited by Krool; Oct 31st, 2025 at 06:03 AM.

  39. #4079

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    VBBubbleW not limited to 255 characters anymore.

    SetToolTipTextW/GetToolTipTextW changed as it is necessary to pass now the control holding the .ToolTipText property.
    Last edited by Krool; Oct 31st, 2025 at 06:03 AM.

  40. #4080
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    760

    Re: CommonControls (Replacement of the MS common controls)

    Excellent - thanks for that tooltip module!

Page 102 of 105 FirstFirst ... 2529299100101102103104105 LastLast

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