Re: CommonControls (Replacement of the MS common controls)
Hi Krool.
Why such changes in a set?
I used thisa kontrol, big problems in it didn't notice.
I dont know why he removed it, but I know I had to stop using it because when debugging my program for any leaks, the GDI Objects in task manager would grow every time I used it and never go back down. Even when the form was closed and everything cleaned up. Once I removed the tooltip from the form the GDI Objects would rise and shrink like normal.
Not sure if that is the reason he removed it, but for me that is one of the reasons I stopped using it.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Romeo91
Hi Krool.
Why such changes in a set?
I used thisa kontrol, big problems in it didn't notice.
There are plenty of ToolTip control classes around the web. Thus it is not really necessary to include it in my project. There were some problems with it also.
Anyhow, you have a backup of the control? If not I could send you a PM with it.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ishalom
... how do I add items and/or check what is selected?
Create an invisible popup menu control (and its submenus) using the IDE's Menu Editor dialog, then pop it up when the CommandButtonW's DropDown event fires. Position the menu like this:
Code:
Private Sub CommandButtonW1_DropDown()
With CommandButtonW1
PopupMenu mnuPopup, vbPopupMenuRightButton, .Left, .Top + .Height
End With
End Sub
Last edited by Bonnie West; Mar 15th, 2015 at 05:24 AM.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
CommandButtonW has no MaskColor Property, is there a way around it?
can I use an imagelist instead, if so how do I assign the image index to the button?
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ishalom
CommandButtonW has no MaskColor Property, is there a way around it?
I haven't tested this, but I believe a MaskColor property is no longer necessary because the CommandButtonW's Picture property already supports transparency in icons/bitmaps.
Last edited by Bonnie West; Mar 11th, 2015 at 07:26 PM.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Bonnie West
I haven't tested this, but I believe a MaskColor property is no longer necessary because the CommandButtonW's Picture and PictureAndCaption properties already supports transparency in icons/bitmaps.
transparency is only supported in icons not BMP files, and PNG files are not supported at all (although it would be great to see it added)
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ishalom
transparency is only supported in icons not BMP files, ...
Transparency is indeed supported for BMP files. However, it can't be just any regular BMP file, it has to be a pre-multiplied ARGB BMP file.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ishalom
CommandButtonW has no MaskColor Property, is there a way around it?
can I use an imagelist instead, if so how do I assign the image index to the button?
You can use a ImageList. The first image of the ImageList will be used automatically. If the ImageList has multiple images than the CommandButtonW uses for each state a certain index.
Attached below is a demo project and some pARGB BMP samples. Extract the archive contents to the ComCtlsDemo folder in Krool's ComCtlsDemo.rar.zip.
Oh, BTW, I created the pARGB BMPs with Pixelformer.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
I'm sorry for the slightly off topic, it's my first post here.
Could someone please tell me how can I add the this control replacement scheme to both a new vb6 project and also to an existent big vb6 project.
I do have an old vb6 big project, it's Profound a GUI that interacts to a c++ checkers/draughts variant (spanish).
If it is an easy thing to do I really could get rid of that old MS controls dependency. https://www.youtube.com/watch?v=bu2Nk1q5Y7Y
best regards,
Alvaro
Re: CommonControls (Replacement of the MS common controls)
I used krool's OpenPrinterEx in CommonDialog class.But the printer dialog failed to assign my printer "\\192.4.4.143\Canon iR2002/2202 UFRII LT(1)".I watched the return printer name is limited 30 Characters of "\\192.4.4.143\Canon iR2002/220"what is the reason?
Edited: Look like the string is being truncated. But I don't know the reason.
Last edited by Jonney; Apr 12th, 2015 at 07:10 PM.
Reason: Add Screenshot
Re: CommonControls (Replacement of the MS common controls)
Hi Krool and thank you for this fantastic piece of software!
I have only a problem in embedding your code in my old ocx-dependent:
Using the With instruction:
Code:
With MainForm.TabStrip.Tabs(TabsCounter)
.... code
End With
I have this error:
Thank you in advance for considering this problem.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by gigirex
I have this error:
Can you post the exact line and the entire procedure where that error occurs? Can you also please provide additional details about your issue?
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
Thank you for replying.
The error is precisely on the With instruction.
As workaround I have directly assigned values without the width prefix and works without problems:
Code:
Let MainForm.TabStrip.Tabs(TabsCounter).Caption = strTab(TabsCounter)
..but it don't work if I use the With instruction:
Code:
With MainForm.TabStrip.Tabs(TabsCounter)
Let .Caption = strTab(TabsCounter)
End With
..and the .key variable is read-only. Is not very important, but in the original ocx is r/w.
Thanks again.
Gigirex
Last edited by gigirex; Apr 20th, 2015 at 11:23 AM.
Reason: info details
Re: CommonControls (Replacement of the MS common controls)
hello
I just found by chance a bug in "CommonDialog.ShowOpen"
It is not possible to use "FileName" as the default file.
The simple solution is to add
Code:
Public Function ShowOpen() As Boolean
Dim Buffer As String, Filter As String
Buffer = String(PropMaxFileSize, vbNullChar)
Mid$(Buffer, 1) = PropFileName' Code add.
Dim OFN As OPENFILENAME
With OFN
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Krool
I cannot confirm this error. By me its working. Anyone else problem on this?
I couldn't reproduce Gigirex's "UDT not defined" error as well. I don't see why the With block he posted would throw such an error. At any rate, it seems he has already figured out a workaround so I guess this issue is resolved.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Re: CommonControls (Replacement of the MS common controls)
hello
Just for information:
Why do this:
Code:
Buffer = String(PropMaxFileSize, vbNullChar)
If Not PropFileName = vbNullString Then
If Len(PropFileName) > (PropMaxFileSize + 1) Then
Length = PropMaxFileSize * 2
Else
Length = LenB(PropFileName)
End If
CopyMemory ByVal StrPtr(Buffer), ByVal StrPtr(PropFileName), Length
End If
Re: CommonControls (Replacement of the MS common controls)
I have noticed that the ImageList is causing a lot of problems(Crashing, and by that sometimes corrupting the frm/frx file), has anyone had the same experience.
Last edited by ishalom; May 4th, 2015 at 09:19 AM.
Reason: typo
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by ishalom
I have noticed that the ImageList is causing a lot of problems(Crashing, and by that sometimes corrupting the frm/frx file), has anyone had the same experience.
Please describe the exact steps what causes the crashs. Thanks
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Jonney
I used krool's OpenPrinterEx in CommonDialog class.But the printer dialog failed to assign my printer "\\192.4.4.143\Canon iR2002/2202 UFRII LT(1)".I watched the return printer name is limited 30 Characters of "\\192.4.4.143\Canon iR2002/220"what is the reason?
Edited: Look like the string is being truncated. But I don't know the reason.
Update released.
This issue is now fixed. Thanks to Jonney for the solution.
Re: CommonControls (Replacement of the MS common controls)
Update released.
Found out that in the VisualStyles.bas and in CommandButtonW.ctl (graphical style only) in case the button is disabled the 'DisabledPicture' was drawn in disabled state, instead it should be drawn normally or masked. Only when there is no 'DisabledPicture' the drawing should be in disabled state in case the button is disabled.
This issue is now fixed. Thus the behavior now matches to the intrinsic VB control.
Re: CommonControls (Replacement of the MS common controls)
Ever figure out anything about why all the IPPB stuff is always throwing errors ?
VTableHandle.IPPB_GetDisplayString.Error2->Type mismatch
VTableHandle.IPPB_GetPredefinedStrings.Error2->Type mismatch
"Set ShadowIPerPropertyBrowsingVB = This" is the number one source of the errors. Click on control after clicking something else first, bunch of those errors scroll by, 9/10 properties disappear. Have to close and reopen form to get them back.
Re: CommonControls (Replacement of the MS common controls)
Hi, can you provide the events for this great control. I am using this for it's Treeview control as a work-around to the Win7/8 64 system issues with the old Treeview control, what a MS mess...
However, I cannot seem to get the Click event to work as with the VB 5/6 MS Treeview control. And, when I End the EXE Program or when in VB design mode, I get a Windows (7/8) error that checks for a problem sol'n, but can't find. Must then terminate the program.
Thank you so much, I see this as the ultimate sol'n to what MS does.
Re: CommonControls (Replacement of the MS common controls)
Originally Posted by Paul@QMC.net
I cannot seem to get the Click event to work as with the VB 5/6 MS Treeview control.
Does the Click event fire or not? Or does it not work the same only?
What about the other events. Please more details. Thanks
Originally Posted by Paul@QMC.net
And, when I End the EXE Program or when in VB design mode, I get a Windows (7/8) error that checks for a problem sol'n, but can't find. Must then terminate the program.
Do you call the InitVisualStyles method at startup in the EXE?
Originally Posted by fafalone
Ever figure out anything about why all the IPPB stuff is always throwing errors ?
VTableHandle.IPPB_GetDisplayString.Error2->Type mismatch
VTableHandle.IPPB_GetPredefinedStrings.Error2->Type mismatch
"Set ShadowIPerPropertyBrowsingVB = This" is the number one source of the errors. Click on control after clicking something else first, bunch of those errors scroll by, 9/10 properties disappear. Have to close and reopen form to get them back.
Re: CommonControls (Replacement of the MS common controls)
The issue is I can't find the code for the node click event. I only get 4 options, such as gotfocus, etc...
Have no idea on the IniVisualStyle code is or location to place in the EXE.
We have a major program for chemical engineers that does not work with the latest MS release of Comctl... We and our Clients are panicking
Do you know anyone that can work with us? We are ChemE's and this is beyond us...