Page 103 of 105 FirstFirst ... 35393100101102103104105 LastLast
Results 4,081 to 4,120 of 4199

Thread: CommonControls (Replacement of the MS common controls)

  1. #4081

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    VBBubbleW now supports an optional max width (in pixels) in SetToolTipTextW. (defaults to -1 which means no limit)
    Last edited by Krool; Oct 30th, 2025 at 01:57 PM.

  2. #4082

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Included hWndToolTip read-only run-time property.

    This allows for example to overwrite the max tip width of an info tip.

    Code:
    SendMessage TabStrip1.hWndToolTip, TTM_SETMAXTIPWIDTH, 0, ByVal 400&
    The ListView has in addition also the hWndHeaderToolTip read-only run-time property.

    The OCX got updated and typelib jumped to 1.2
    Code:
    Object={379157C5-E9BD-43F1-9F83-B037496BED42}#1.2#0; VBCCR18.OCX

  3. #4083
    Member
    Join Date
    Feb 2023
    Posts
    55

    Re: CommonControls (Replacement of the MS common controls)

    Hi krol,

    thanks a lot for your great work with these unicode controls.

    However I have a problem with it:

    I have an exe with a manifest in it with
    Code:
    <requestedExecutionLevel level="asInvoker" uiAccess="true" />
    in it

    A.
    The project has one form which is set to top most
    Code:
    WS_EX_TOPMOST
    in Fom_Load

    B.
    The Form has a command button array, initially only one command button with index 0.

    C.
    I add a new command buttons at runetime
    Code:
    Load CommandButton(i): CommandButton(i).visible=true
    This works fine in the IDE, but when I run the compiled exe, the new added buttons are not shown.


    I can set the form to HWND_NOTOPMOST and after adding the form again to WS_EX_TOPMOST, then the button is shown.
    But with this (after a while) Windows does sometimes not brings the activateed window to top. e.g. I press Alt+Tab: the activated window remains in the back. (known bug in Windows)


    (note: for running an exe with uiAccess="true" the exe must be signed)


    Project:
    https://www.transfernow.net/dl/20251103NStH2vEK


    Any idea/solution for that?
    Last edited by Chris_G33; Nov 3rd, 2025 at 07:39 AM.

  4. #4084
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    760

    Re: CommonControls (Replacement of the MS common controls)

    Hey Chris,

    Does this same exact code work if you use the VB command buttons? I'm wondering if this has to do with with VBCCR controls or some other aspect of the code.

  5. #4085
    Member
    Join Date
    Feb 2023
    Posts
    55

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by AAraya View Post
    Does this same exact code work if you use the VB command buttons? I'm wondering if this has to do with with VBCCR controls or some other aspect of the code.
    Yes, with a standard button this works fine.

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

    Question modern ToolTipText-support

    Quote Originally Posted by Krool View Post
    Update released.

    Included hWndToolTip read-only run-time property.
    Why dont you include a modern ToolTipText-support for all VBCCR-controls?
    Is there a reason why this have never been implemented?

    My current approach is:

    1. set the tooltiptext for each control at design time
    2. at form load parse all controls on the form for existing tooltiptexts
    3. create a new modern tooltiptext-window for each control and delete the text at the Control-ToolTipText-Property

    It would be much cleaner if the VBCCR controls had a property to switch to the Modern-Style-ToolTipText and handle all the class & api-stuff inside the control.

  7. #4087

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: modern ToolTipText-support

    Quote Originally Posted by Mith View Post
    Why dont you include a modern ToolTipText-support for all VBCCR-controls?
    Is there a reason why this have never been implemented?

    My current approach is:

    1. set the tooltiptext for each control at design time
    2. at form load parse all controls on the form for existing tooltiptexts
    3. create a new modern tooltiptext-window for each control and delete the text at the Control-ToolTipText-Property

    It would be much cleaner if the VBCCR controls had a property to switch to the Modern-Style-ToolTipText and handle all the class & api-stuff inside the control.
    I provided the VBBubbleW module where you can have multi-line, unicode and max width plus custom draw styles.
    It lacks theme only. Maybe that's a thing to investigate?

  8. #4088
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: CommonControls (Replacement of the MS common controls)

    Can you develop a UI that can be zoomed in and out freely? Like WPF.

  9. #4089
    Fanatic Member
    Join Date
    Jan 2016
    Posts
    834

    Re: CommonControls (Replacement of the MS common controls)

    hello Krool
    Is it possible to make RichTextBox trasparent allowing the underlying controls to show through?
    This code does not seem to do the task

    Code:
    Private Const WS_EX_TRANSPARENT = &H20&
    Private Const GWL_EXSTYLE = (-20)
     
    Private Declare Function SetWindowLong _
        Lib "user32" Alias "SetWindowLongA" _
        (ByVal hwnd As Long, _
        ByVal nIndex As Long, _
        ByVal dwNewLong As Long) As Long
        
    Private Sub Form_Load()
        SetWindowLong RichTextBox1.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
    End Sub
    thank you
    Last edited by Mustaphi; Nov 27th, 2025 at 12:56 PM.

  10. #4090
    Junior Member
    Join Date
    Dec 2020
    Posts
    29

    Re: CommonControls (Replacement of the MS common controls)

    Hello:
    I'm very interested in migrating our VB6 application to TwinBasic. The app using the 32-bit VBCCR18.OCX is pretty seamless (and thanks again for this work). However, the TwinPack seems to have an issue with the ImageList, as there is no right-click Properties option to add images. Using a latest TB build (906), I just made a simple EXE to test, then click on the VBCCR18 TwinPack, added an ImageList, and get this behavior (both bit-ness). Is there a particular setting needed or something I am missing? Thanks!
    Don

  11. #4091

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by TheLeePiper View Post
    Hello:
    I'm very interested in migrating our VB6 application to TwinBasic. The app using the 32-bit VBCCR18.OCX is pretty seamless (and thanks again for this work). However, the TwinPack seems to have an issue with the ImageList, as there is no right-click Properties option to add images. Using a latest TB build (906), I just made a simple EXE to test, then click on the VBCCR18 TwinPack, added an ImageList, and get this behavior (both bit-ness). Is there a particular setting needed or something I am missing? Thanks!
    Don
    It's experimental. So, let's not waste time and wait until v1 of tB is out.

  12. #4092

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Mustaphi View Post
    hello Krool
    Is it possible to make RichTextBox trasparent allowing the underlying controls to show through?
    This code does not seem to do the task

    Code:
    Private Const WS_EX_TRANSPARENT = &H20&
    Private Const GWL_EXSTYLE = (-20)
     
    Private Declare Function SetWindowLong _
        Lib "user32" Alias "SetWindowLongA" _
        (ByVal hwnd As Long, _
        ByVal nIndex As Long, _
        ByVal dwNewLong As Long) As Long
        
    Private Sub Form_Load()
        SetWindowLong RichTextBox1.hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT
    End Sub
    thank you
    That's not possible. You can just draw/print the content transparently somewhere.
    See the SelPrint/PrintDoc method. Or do manually via EM_FORMATRANGE.

  13. #4093
    New Member
    Join Date
    Jan 2026
    Posts
    1

    Re: CommonControls (Replacement of the MS common controls)

    There is a 64-bit buffer overflow I found, see https://github.com/Kr00l/VBCCR/pull/38

  14. #4094

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by kaon View Post
    There is a 64-bit buffer overflow I found, see https://github.com/Kr00l/VBCCR/pull/38
    Thanks! Fixed.

  15. #4095
    Junior Member
    Join Date
    Apr 2022
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    When using a ToolBar in a child form of an MDIForm, the button tooltips are not displayed. How can this be resolved? Thank you very much!

  16. #4096

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by fengzhongxia View Post
    When using a ToolBar in a child form of an MDIForm, the button tooltips are not displayed. How can this be resolved? Thank you very much!
    Can't reproduce.

    Is the ShowTips property set to true?

  17. #4097
    Junior Member
    Join Date
    Apr 2022
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    Thank you for the reply.
    set the ShowTips property is true.
    The problem has been resolved.
    thank you Very Much.

  18. #4098
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Private Function insetPic(finds As String, pic As StdPicture)

    richTest1.Find finds
    Dim pot As Integer, stln As Integer
    pot = richTest1.SelStart
    stln = richTest1.SelLength



    If richTest1.SelLength <> 0 Then

    richTest1.SelText = ""
    Call richTest1.OLEObjectsAddFromPicture(pic) ' DONT WORK OK I CAN NOT SEE PIC INSERT OK
    End If

    End Function

    Call insetPic("$Pic", Picture1.Image)

    how can insert a picture to RTF?
    Last edited by xxdoc123; Feb 1st, 2026 at 04:48 AM.

  19. #4099

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xxdoc123 View Post
    Private Function insetPic(finds As String, pic As StdPicture)

    richTest1.Find finds
    Dim pot As Integer, stln As Integer
    pot = richTest1.SelStart
    stln = richTest1.SelLength



    If richTest1.SelLength <> 0 Then

    richTest1.SelText = ""
    Call richTest1.OLEObjectsAddFromPicture(pic) ' DONT WORK OK I CAN NOT SEE PIC INSERT OK
    End If

    End Function

    Call insetPic("$Pic", Picture1.Image)

    how can insert a picture to RTF?
    Does it work when you use Picture1.Picture instead of Image ?

  20. #4100
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Does it work when you use Picture1.Picture instead of Image ?
    in win10 work ok?but in win7 not work

  21. #4101

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xxdoc123 View Post
    in win10 work ok?but in win7 not work
    What picture is it? 32 bit bitmap ?

  22. #4102
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    I am using the picture control and used print to draw a table.
    picture1.autoredraw =true
    picture1.print “some datat”

    picture1.autoredraw =false
    set picture1.picture=picture1.image

    I used this picture1.image to set?

  23. #4103

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xxdoc123 View Post
    I am using the picture control and used print to draw a table.
    picture1.autoredraw =true
    picture1.print “some datat”

    picture1.autoredraw =false
    set picture1.picture=picture1.image

    I used this picture1.image to set?
    Please test to use picture1.picture

  24. #4104
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Please test to use picture1.picture
    sorry. I'm late.have the same question.

  25. #4105

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    xxdoc123, can you please do a small demo where the problem can be replicated / tested ?

  26. #4106
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Private Function insetPic(???? As String, pic As StdPicture)

    richTest1.Find ????
    Dim pot As Integer, stln As Integer
    pot = richTest1.SelStart
    stln = richTest1.SelLength



    If richTest1.SelLength <> 0 Then
    'richTest1.SetSelectionFontAttributes , , 70
    richTest1.SelText = ""
    Call richTest1.OLEObjectsAddFromPicture(pic)
    End If

    End Function

    Picture1.AutoRedraw = True
    Picture1.ScaleMode = vbTwips
    Picture1.BackColor = vbWhite

    '

    Picture1.Font.Size = 10

    '
    rowHeight = Picture1.TextHeight("T") + 200

    '
    Picture1.Cls

    '
    X = 0
    Y = 0

    '
    For j = 0 To 2
    '
    Picture1.Line (X, Y)-(X + colWidth(j), Y + rowHeight), vbBlack, B

    '
    Picture1.CurrentX = X + 100
    Picture1.CurrentY = Y + 100

    Select Case j

    Case 0
    Picture1.Print "xx"

    Case 1
    Picture1.Print "11"

    Case 2

    Picture1.Print "22"
    ' Picture1.Width = X + colWidth(j) + 12
    End Select

    X = X + colWidth(j)
    Next j

    '
    Y = Y + rowHeight

    For i = 1 To rowNmu - 1
    X = 0

    For j = 0 To 2
    '
    Picture1.Line (X, Y)-(X + colWidth(j), Y + rowHeight), vbBlack, B

    '
    Picture1.CurrentX = X + 100
    Picture1.CurrentY = Y + 100
    Picture1.Print Split(row(i), "|")(j)

    X = X + colWidth(j)
    Next j

    Y = Y + rowHeight
    Next i

    Picture1.Height = Y + 200
    Picture1.AutoSize = False '
    Picture1.Refresh

    Set Picture1.Picture = Picture1.Image
    '


    Call insetPic("$Pic", Picture1.picture)

    I used this rtf

    https://www.vbforums.com/attachment....3&d=1768520469
    Last edited by xxdoc123; Feb 11th, 2026 at 07:09 AM.

  27. #4107

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    xxdoc123, I need a full working .vbp project which includes also your picture source. Otherwise how should I test ?

  28. #4108
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Sorry, my image was directly generated using the picture control. It is not saved locally. As shown in the code above. I obtained the picture object directly. The trf document uses the document in the link. To insert images into the table.

  29. #4109

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by xxdoc123 View Post
    Sorry, my image was directly generated using the picture control. It is not saved locally. As shown in the code above. I obtained the picture object directly. The trf document uses the document in the link. To insert images into the table.
    I get errors at colWidth(j) and by Split(row(i), "|")(j)
    But beside that the generated picture was successfully inserted into the RichTextBox...

  30. #4110
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    733

    Re: CommonControls (Replacement of the MS common controls)

    Very good, actually I can do it on Win10. If Win7 fails. Are you testing on Win7?

  31. #4111
    Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    49

    Re: CommonControls (Replacement of the MS common controls)

    I have some issues with the RTF control (btw I suspect similar issues with other controls from the VBCCR.ocx).
    It took me a while to find out, but here I am:
    Some properties e.g. setting the Scrollbars property make the control to recreate itself (by calling some ReCreateRichTextBox()).
    This makes the scrollbars not respond anymore to mouse dragging (at least, in my app it is) or mouse clicks. Also the mousewheel stops scrolling the scrollbar but scrolling the contents still works.
    I suspect this is because the handle of the control window changes. I also see that my codejock skin control is getting out of sync.
    As far as I understand this is by design and cannot be altered(?) If so, everybody using the controls, be careful when altering properties in controls that may not be altered (mostly properties that Microsofts MsComCtl ff restricts from altering during runtime), e.g. Scrollbars, Multiline, RightToLeft and more.
    If I'm wrong then It would be great to correct the bug because this restriction was one of the reasons to switch to VBCCR-Controls.

  32. #4112

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Seniorchef View Post
    I have some issues with the RTF control (btw I suspect similar issues with other controls from the VBCCR.ocx).
    It took me a while to find out, but here I am:
    Some properties e.g. setting the Scrollbars property make the control to recreate itself (by calling some ReCreateRichTextBox()).
    This makes the scrollbars not respond anymore to mouse dragging (at least, in my app it is) or mouse clicks. Also the mousewheel stops scrolling the scrollbar but scrolling the contents still works.
    I suspect this is because the handle of the control window changes. I also see that my codejock skin control is getting out of sync.
    As far as I understand this is by design and cannot be altered(?) If so, everybody using the controls, be careful when altering properties in controls that may not be altered (mostly properties that Microsofts MsComCtl ff restricts from altering during runtime), e.g. Scrollbars, Multiline, RightToLeft and more.
    If I'm wrong then It would be great to correct the bug because this restriction was one of the reasons to switch to VBCCR-Controls.
    You mean how to prevent the window handle change? Difficult, as it's done for a reason.

    When you know it will be changed you can prepare. Save the new window handle, change the subclasses. Means cancel the subclasses before and create new ones afterwards.

    Or did I missunderstand?

  33. #4113
    Member
    Join Date
    Mar 2020
    Location
    Germany (BW)
    Posts
    49

    Re: CommonControls (Replacement of the MS common controls)

    No, you made the point.

    That was my solution for the spellcheck in my rtf editor. It works fine, I knew the point to send the Message (IMF_Spellchecking), because I handle the critical properties and can do as you wrote. But the mousewheel and the skin framework are out of my reach. I even don't know what is controlling the mousewheel for sure.
    In either way - thanks for the reply Krool.

  34. #4114
    New Member
    Join Date
    Mar 2026
    Location
    In the basement mostly
    Posts
    1

    Re: CommonControls (Replacement of the MS common controls)

    Krool, I've been a VB developer since about 1997. I started with BASIC in 1982 with the VIC-20... and when I decided to write a Windows app for DJs, Visual Basic just came natural (there wasn't much in this space in 1997 -- just WinAmp and re-skins of it).

    Little did I know, the program would kinda take off, and yet my development environment of choice would be pretty much abandoned by Microsoft shortly after that... so today, the VAST majority of my actual code is done in a C++ DLL -- I subclass the living heck out of everything but there's always SOME way VB gets in the way. Especially with strings.

    Anyway I was on the hunt for a RichText edit control (InkEdit is just too buggy, crashes a lot) and Gemini suggested your controls.

    How on earth did I not find this years ago! My ListView (and many of my other custom controls/subclassing) is great but took TONS of work, many wasted "trial and error" hours etc. Your OCX -- I mean I *just* started playing with it, but already, to have a Unicode-aware LABEL that directly displays Emoji with no fuss -- the hours this would have saved me over the years you've been actively working on this.....

    Anyway I'm super happy to have found this. I'll probably dig under the hood at some point but as it stands, I'm just using it as a drop-in replacement for controls, one at a time as I see the need.

    Thanks so much for all the work (I read quite a lot of this forum thread overnight!) and I'll be a regular! Thanks for keeping Visual Basic alive, and helping modernize what you can do with it 25+ years after Microslop shelved it...

    Geez, I probably spent 3 or 4 weeks full-time just implementing my own version of "dark mode" - at some point I will for sure look at how you do it, but I'm too proud of the work I did to abandon mine

    I have a major version release soon, so I don't want to change too much in my product right now -- but once that's out, I'll for sure be making use of these controls, eventually eliminating my reliance on the outdated MS common controls...

    (sorry, been up ALL night and I'm just excited to have found this after so many years of fighting with VB!)

  35. #4115

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Jm4n69, thanks for your kind words.

    Update released. Improved the MousePointer property in the FrameW control. (e.g. properly show 4 - Hand cursor)
    Like exactly 1 year ago the LabelW control got this improvement.

  36. #4116
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,667

    Re: CommonControls (Replacement of the MS common controls)

    Hello, I want to report a bug in DTPicker: "nn" is not recognized for minutes, only "mm":

    Code:
        DTPicker1.CustomFormat = "MM/dd/yyyy HH.nn:ss"
        DTPicker1.Format = DtpFormatCustom
        DTPicker1.Value = Now
    https://learn.microsoft.com/en-us/of...r-applications

  37. #4117

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Eduardo- View Post
    Hello, I want to report a bug in DTPicker: "nn" is not recognized for minutes, only "mm":

    Code:
        DTPicker1.CustomFormat = "MM/dd/yyyy HH.nn:ss"
        DTPicker1.Format = DtpFormatCustom
        DTPicker1.Value = Now
    https://learn.microsoft.com/en-us/of...r-applications
    The MS DTPicker has the same issue. I think it is due to DTM_SETFORMAT not accepting it. The link you are referring to is the VB Format() function.

  38. #4118

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    The StatusBar control is now a ControlContainer like the ToolBar/CoolBar control.
    This makes it easier to place a control onto a panel via "Set MyControl.Container = StatusBar".
    The MS StatusBar is not a ControlContainer which is a unnecessary limitation.

    The OCX (1.8) will not be updated anymore now for new features. (only bugfixes)

  39. #4119

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released related to ControlContainer and StatusBar.

    Included the Resize event in the StatusBar control.
    A control container should have such event to re-arrange it's contained controls.

  40. #4120

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Included the FontQuality property for all controls where applicable.
    This can be convenient when using 'Microsoft Sans Serif' to have more unicode chars supported but to exactly look like 'MS Sans Serif'.

Page 103 of 105 FirstFirst ... 35393100101102103104105 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