VBBubbleW now supports an optional max width (in pixels) in SetToolTipTextW. (defaults to -1 which means no limit)
Printable View
VBBubbleW now supports an optional max width (in pixels) in SetToolTipTextW. (defaults to -1 which means no limit)
Update released.
Included hWndToolTip read-only run-time property.
This allows for example to overwrite the max tip width of an info tip.
The ListView has in addition also the hWndHeaderToolTip read-only run-time property.Code:SendMessage TabStrip1.hWndToolTip, TTM_SETMAXTIPWIDTH, 0, ByVal 400&
The OCX got updated and typelib jumped to 1.2
Code:Object={379157C5-E9BD-43F1-9F83-B037496BED42}#1.2#0; VBCCR18.OCX
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
in itCode:<requestedExecutionLevel level="asInvoker" uiAccess="true" />
A.
The project has one form which is set to top mostin Fom_LoadCode:WS_EX_TOPMOST
B.
The Form has a command button array, initially only one command button with index 0.
C.
I add a new command buttons at runetimeThis works fine in the IDE, but when I run the compiled exe, the new added buttons are not shown.Code:Load CommandButton(i): CommandButton(i).visible=true
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?
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.
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.
Can you develop a UI that can be zoomed in and out freely? Like WPF.
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
thank youCode: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
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
There is a 64-bit buffer overflow I found, see https://github.com/Kr00l/VBCCR/pull/38
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!
Thank you for the reply.
set the ShowTips property is true.
The problem has been resolved.
thank you Very Much.
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?
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?
xxdoc123, can you please do a small demo where the problem can be replicated / tested ?
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
xxdoc123, I need a full working .vbp project which includes also your picture source. Otherwise how should I test ?
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.
Very good, actually I can do it on Win10. If Win7 fails. Are you testing on Win7?
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?
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.
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!)
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.
Hello, I want to report a bug in DTPicker: "nn" is not recognized for minutes, only "mm":
https://learn.microsoft.com/en-us/of...r-applicationsCode:DTPicker1.CustomFormat = "MM/dd/yyyy HH.nn:ss"
DTPicker1.Format = DtpFormatCustom
DTPicker1.Value = Now
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)
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.
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'.
Update released.
Included the TextIndent/PictureIndent property of a Panel in the StatusBar control.
This allows to fine-tune the placement or to give some extra space in-between for a child control on a panel.
Any suggestion how to rapidly fill a treeview?
E.g. in the procedure _Expand() add 100000 children takes quite some time.
Thanky you, Chris
VBCCR 1.8.83
hi Krool,
the header of the calendar is truncated when setting VisualStyles=false
Attachment 195921
Side question : how do you get the calendar in dark mode ?
Good catch. That only happens from comctl 6.1 onwards. (Vista+)
In fact it is a MS bug as the dropdown does not resize when unthemed. For the default font it is just luck that it fits somewhat. (but not perfect)
Also found another bug that CalendarFont is only read from property bag but not written properly to it. Means it can't be set at design time.
Will fix both issues soon.
Check this thread for VB6 & DarkMode: https://www.vbforums.com/showthread.php?t=900444
VBCCR v1.8.86
Its fixed:
Attachment 195928
Thx Krool!
VBCCR 1.8.86
Hi Krool,
i guess i maybe found another bug in the DTPicker-Control:
I set AllowUserInput=FALSE but the user still can modify the date in the editbox.
DTPicker1_CalendarGetDayBold -> SetDayState function has bold state setting bug, when trying to set bold state other than sunday ie. midweek/public holidays.
fex. Good Friday and if New Years's Day is in mid week.
Bold state seems to be shifted by one day earlier. Sundays work ok.Attachment 195931
Attached is screenshot see that Good Friday is shifted, likewise May Day. OS has Finnish calendar settings.
AllowUserInput = FALSE does not mean it is locked. It's just that when you press F2 or click on it there is no custom user input possible via ParseUserInput event.
Can't replicate. See my code below works.. it would be maybe less confusing if the State() array would be zero-based and not one-based. But that is now impossible to change..
Code:Private Sub DTPicker1_CalendarGetDayBold(ByVal StartDate As Date, ByVal Count As Long, State() As Boolean)
Dim i As Long
For i = 1 To Count
Select Case DateAdd("d", i - 1, StartDate)
Case #4/3/2026#, #5/1/2026#
State(i) = True
End Select
Next i
End Sub
When using 'i-1' computation. midweek/public holidays are ok, but weekends not, as shifted by one day.
Attachment 195934Code:Private Sub dtDeliverydate_CalendarGetDayBold(ByVal StartDate As Date, ByVal Count As Long, State() As Boolean)
Dim i As Long
Dim dtDate As Date
For i = 1 To Count
'dtDate = DateAdd("d", i, StartDate)
dtDate = DateAdd("d", i - 1, StartDate)
If Weekday(dtDate, vbMonday) = vbSunday Then State(i) = True
If Weekday(dtDate, vbMonday) = vbSaturday Then State(i) = True
If IsArkiPyha(dtDate) Then
'State(i) = True 'Bug...
'If i < Count Then State(i + 1) = True 'Bug correction. 'Bold state setting seems to be shifted by one day earlier. Weekends (Saturdays and Sundays) work ok.>
If i < Count Then State(i) = True
End If
Next i
End Sub
Expand/show MonthView over one month and close it to display just one month, selected date range shifts.
Code:Dim mStartDate As Date
Dim mEndDate As Date
Private Sub MonthView1_MouseEnter()
Debug.Print "MonthView1_MouseEnter"
MonthView1.MonthColumns = 3
If IsDate(mStartDate) And IsDate(mEndDate) Then
Debug.Print "mStartDate = " & mStartDate
Debug.Print "mEndDate = " & mEndDate
Call MonthView1_SelChange(mStartDate, mEndDate)
MonthView1.Refresh 'Refresh, does not work correctly, when selected multiple months or month other than leftmost.
End If
End Sub
Private Sub MonthView1_MouseLeave()
Debug.Print "MonthView1_MouseLeave"
MonthView1.MonthColumns = 1
End Sub
Private Sub MonthView1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Debug.Print "MonthView1_MouseUp"
End Sub
Private Sub MonthView1_SelChange(ByVal StartDate As Date, ByVal EndDate As Date)
Debug.Print "MonthView1_SelChange - StartDate = " & StartDate & " EndDate = " & EndDate
mStartDate = StartDate
mEndDate = EndDate
lblOhje.Caption = "Selected date range = " & mStartDate & " - " & mEndDate
End Sub