-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Rinzwind
Great work! Bug report: seems to be something wrong with the statusbar control in the latest OCX version.
VBCCR10
Run-time error '91':
Object variable or With block variable not set
This message appears and won't close (or the IDE crashes).
That actually happens to all OCX version, except revision number 0.
The reason was that the ASM Design Mode subclass only works on a "blank" compile.
If I compile with "binary compatibility" the ASM Design Mode subclass is like broken.
So I replaced the ASM Design Mode subclass with normal subclass as on a OCX this is no problem.
I only did a ASM Design Mode subclass as for the Std-EXE version this was necessary.
So as there is no ASM Design Mode subclass in the OCX version now the controls CoolBar and ToolBar should work now.
-
Re: CommonControls (Replacement of the MS common controls)
Question regarding the OCX.... I've tried to use the new Command Button .... it does not have a Style property that matches the old VB one .. (e.g., standard or graphical) that allows setting the background color of the command button. My project sets the background color when the control gets focus ...but with this new one it does not seem to function. I've fiddled with what seems like possible properties that might be related to this but nothing seems to get this to work for me. Is there is a way? Also, I can't seem to get the 'image and caption' option to work. If I put an image on the button ... it only shows the image and not the caption. Wont' caption unless the image is (none).
What would REALLY be nice is two properties that permit setting of a 'got focus backcolor' and a 'lost focus backcolor' so it did it automatically so you don't need to use a lot of got_focus and lost_focus events to deal with it.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
c141heaven
Question regarding the OCX.... I've tried to use the new Command Button .... it does not have a Style property that matches the old VB one .. (e.g., standard or graphical) that allows setting the background color of the command button. My project sets the background color when the control gets focus ...but with this new one it does not seem to function. I've fiddled with what seems like possible properties that might be related to this but nothing seems to get this to work for me. Is there is a way? Also, I can't seem to get the 'image and caption' option to work. If I put an image on the button ... it only shows the image and not the caption. Wont' caption unless the image is (none).
What would REALLY be nice is two properties that permit setting of a 'got focus backcolor' and a 'lost focus backcolor' so it did it automatically so you don't need to use a lot of got_focus and lost_focus events to deal with it.
The CommandButtonW does not have a Style property yet. The 'Graphical' is in true a ownerdrawn button. To get a similar result you need to use the "PushLike" property but this does not include for instance the backcolor as you already encounter.
The 'image and caption' property is only working when you use a manifest file within your project to link to comctl32.dll 6.1. (Vista, 7+)
So at the moment the 'Graphical' (Ownerdrawn) style to emulate the intrinsic command button behavior and appearance is not yet done.
-
Re: CommonControls (Replacement of the MS common controls)
All working well for me, but I notice that you have replaced the standard vb msgbox function with your own, but I can't see any difference in the box produced on XP or Win 7. Any reason for the replacement? The same goes for GetAttr although I've not used that.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jim Naylor
All working well for me, but I notice that you have replaced the standard vb msgbox function with your own, but I can't see any difference in the box produced on XP or Win 7. Any reason for the replacement? The same goes for GetAttr although I've not used that.
I have replaced some functions in order to support unicode.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
I have replaced some functions in order to support unicode.
Krool, in last version control ToolTip property(Let/Get) DelayTime is wrong
Code:
Public Property Let DelayTime(ByVal TimeType As TipDelayTimeConstants, ByVal Value As Long)
Select Case Time
Case TipDelayTimeReshow, TipDelayTimeShow, TipDelayTimeInitial
Select Case Value
Case 0 To 32767
If ToolTipHandle <> 0 Then SendMessage ToolTipHandle, TTM_SETDELAYTIME, Time, ByVal MakeDWord(Value, 0)
Case Else
Err.Raise 380
End Select
Case Else
Err.Raise 380
End Select
End Property
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
Krool, in last version control ToolTip property(Let/Get) DelayTime is wrong
Code:
Public Property Let DelayTime(ByVal TimeType As TipDelayTimeConstants, ByVal Value As Long)
Select Case Time
Case TipDelayTimeReshow, TipDelayTimeShow, TipDelayTimeInitial
Select Case Value
Case 0 To 32767
If ToolTipHandle <> 0 Then SendMessage ToolTipHandle, TTM_SETDELAYTIME, Time, ByVal MakeDWord(Value, 0)
Case Else
Err.Raise 380
End Select
Case Else
Err.Raise 380
End Select
End Property
Oops. Fixed. :)
Thanks
-
Re: CommonControls (Replacement of the MS common controls)
For Spinbox control,Due to increment can't be 0.1, is it possible to display Text "2.5" but the value is "25" with increment = 1?
-
Re: CommonControls (Replacement of the MS common controls)
Bug report:
in Class CommonDialog ShowFont Function:
Should put "Set PropFont = New StdFont" After "If RetVal <> 0 Then" to de-reference the old Font object.
Quote:
If RetVal <> 0 Then
Set PropFont = New StdFont
I found this bug in my post #765747.
After @Max187Boucher give solution, VB6's CommonDialog1 works perfectly.
But I used your CommonDialog class the problem still exist. After adding this line, problem gone.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jonney
Bug report:
in Class CommonDialog ShowFont Function:
Should put "Set PropFont = New StdFont" After "If RetVal <> 0 Then" to de-reference the old Font object.
I found this bug in my
post #765747.
After @Max187Boucher give solution, VB6's CommonDialog1 works perfectly.
But I used your CommonDialog class the problem still exist. After adding this line, problem gone.
That is not necessary. In the Class_Initialize is already a 'Set PropFont = New StdFont'.
Just ensure that when you override the Font property of the CommonDialog this is always a new one and not referrenced to something else.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
That is not necessary. In the Class_Initialize is already a 'Set PropFont = New StdFont'.
Just ensure that when you override the Font property of the CommonDialog this is always a new one and not referrenced to something else.
I made a demo for you to troubleshooting.
Refer to attachment:
Attachment 114653
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jonney
I do not think it is a good idea to make a 'New' Font after the dialog was called. Thus it should be kept as the original.
Instead you should de-reference the passed Font from the Textboxes.
So Instead of:
Code:
Private Sub cmdNewFont_Click()
Dim otempFont As StdFont, Flags As CdlCFConstants
Dim FontDialog As KroolCommonDialog
Set otempFont = txtFooter1.Font
Put like following:
Code:
Private Sub cmdNewFont_Click()
Dim otempFont As StdFont, Flags As CdlCFConstants
Dim FontDialog As KroolCommonDialog
Set otempFont = New StdFont 'de-reference Font Object
With otempFont
.Bold = txtFooter1.FontBold
.Italic = txtFooter1.FontItalic
.Underline = txtFooter1.FontUnderline
.Strikethrough = txtFooter1.FontStrikethru
.Size = txtFooter1.FontSize
.Name = txtFooter1.FontName
End With
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
I do not think it is a good idea to make a 'New' Font after the dialog was called. Thus it should be kept as the original.
Instead you should de-reference the passed Font from the Textboxes.
So Instead of:
Code:
Private Sub cmdNewFont_Click()
Dim otempFont As StdFont, Flags As CdlCFConstants
Dim FontDialog As KroolCommonDialog
Set otempFont = txtFooter1.Font
Put like following:
Code:
Private Sub cmdNewFont_Click()
Dim otempFont As StdFont, Flags As CdlCFConstants
Dim FontDialog As KroolCommonDialog
Set otempFont = New StdFont 'de-reference Font Object
With otempFont
.Bold = txtFooter1.FontBold
.Italic = txtFooter1.FontItalic
.Underline = txtFooter1.FontUnderline
.Strikethrough = txtFooter1.FontStrikethru
.Size = txtFooter1.FontSize
.Name = txtFooter1.FontName
End With
OK. That is fine,I have to write more codes to assign Font. I don't know what the behind story of "Set otempFont = txtFooter1.Font" and "Set txtFooter1.Font = otempFont". This is the simply and logic but bring some strange problem.
-
Re: CommonControls (Replacement of the MS common controls)
hello Krool
can you please update OCX version. thank you very much
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
quicken
hello Krool
can you please update OCX version. thank you very much
Not now, but in near future I will release a version 1.1 of the OCX with the latest state.
Hotfixes are also done in the version 1.0 of the OCX as long as they did not break the compatibility.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Not now, but in near future I will release a version 1.1 of the OCX with the latest state.
Hotfixes are also done in the version 1.0 of the OCX as long as they did not break the compatibility.
ok krool i am waiting for last release
thanks again
-
Re: CommonControls (Replacement of the MS common controls)
I show the vbLongDate and vbLongTime in the StatusBar. With every new version, I would go into StatusBar.ctl's Sub GetDisplayText to change Case SbrPanelStyleTime and Case SbrPanelStyleDate accordingly.
Without changing StatusBar.ctl, is there any way I can make the change in my project Form_Load? This will make it much easier.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
I am getting a run-time error after editing the Property Pages for the toolbar control (VB6 IDE crashed mid-edit, I now get the same error each time I try to run my program through the IDE or compile).
Attachment 115403
Any suggestions?
PS - The demo program runs fine which references the same ocx.
Thank you
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
netkiller
treeview bug? when set treeview's propety HideSelection=False, treeview not draw selected cell when lost focus
Quote:
Originally Posted by
netkiller
you add following code to skip problem:
If NMTVCD.ClrTextBk <> WinColor(vbButtonFace) Then
Update released.
Due that this workaround does not work when the backcolor of the control is vbButtonFace I now tried to troubleshoot this once again.
And now this is finally solved "properly".
Quote:
Originally Posted by
I-Like-Toast
I am getting a run-time error after editing the Property Pages for the toolbar control (VB6 IDE crashed mid-edit, I now get the same error each time I try to run my program through the IDE or compile).
Attachment 115403
This is solved on I-Like-Toast's side. The reason for this was a corrupt ImageList in a .frx file.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Attachment 115617
Hello
My test program crashes with your ocx control.:cry:
why?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
public
You forgot a point (".") before the 'Count'.
So, instead of this:
Code:
Private Sub Create_ListView_OCX()
Dim nb As Long
With ListView_OCX.ListItems
If Count Then
.Clear
End If
do like following:
Code:
Private Sub Create_ListView_OCX()
Dim nb As Long
With ListView_OCX.ListItems
If .Count Then
.Clear
End If
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
You forgot a point (".") before the 'Count'.
So, instead of this:
Code:
Private Sub Create_ListView_OCX()
Dim nb As Long
With ListView_OCX.ListItems
If Count Then
.Clear
End If
do like following:
Code:
Private Sub Create_ListView_OCX()
Dim nb As Long
With ListView_OCX.ListItems
If .Count Then
.Clear
End If
thank you
But if I write
Code:
Private Sub Create_ListView_VB6()
Dim nb As Long
With ListView_VB6.ListItems
.Clear
.....
and
Code:
Private Sub Create_ListView_OCX()
Dim nb As Long
With ListView_OCX.ListItems
.Clear
....
Only Create_ListView_OCX() Crash
Why?
And it's the same with The Treview TreeView...
Attachment 115661
The "Clear" command does not support empty lists! otherwise crashes
otherwise With the test of "Count"
If I click a second time on the "Rnd List OCX " button
Attachment 115663
the "Rnd ListVB6" button works perfectly!
-
Re: CommonControls (Replacement of the MS common controls)
LOL, that seems to be a bug yeah, clear should always be able to work with an empty list.. haha.. but I guess that'll be an easy fix..
-
Re: CommonControls (Replacement of the MS common controls)
Update released. Fixed the bug with the 'Clear' method.
Just for information:
Here it crashed:
Code:
With ListView_OCX.ListItems
.Clear
....
And here not:
Code:
ListView_OCX.ListItems.Clear
....
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Update released. Fixed the bug with the 'Clear' method.
Just for information:
Here it crashed:
Code:
With ListView_OCX.ListItems
.Clear
....
And here not:
Code:
ListView_OCX.ListItems.Clear
....
Ohw.. those can be annoying bugs to track down... As you wouldn't expect a [b]with[b] statement to produce any different working as using it directly.. good job..
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Anyone have any good links to information on how to create the VB6.EXE manifest linking to the comctl32.dll version 6.0 or higher?
I would like to test the newer controls in the IDE.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Ramses800
Anyone have any good links to information on how to create the VB6.EXE manifest linking to the comctl32.dll version 6.0 or higher?
I would like to test the newer controls in the IDE.
VB6 IDE Visual Style
-
Re: CommonControls (Replacement of the MS common controls)
Significant update released.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Please help , i was done download ocx file and registered it wit regsvr32 and then i use resource hacker to add res file to vb6.exe it work fine showing your custom controls but when drag to the form it show without style. still in the old button item, etc :(
Attachment 116095
Quote:
Originally Posted by
Krool
This is the 1.0 ActiveX Control version. (Revision 45)
Download VBCCR10.OCX
This binary is
not compatible to any previous version as the library is renamed from "VBCCRLib" to "VBCCR10".
I hope that this release is now stable and then in the future only a big change will result in a version increment.
Any bugfixes in future will be compatible to this binary and only the revision number will be incremented.
Advantageous compared to the Std-EXE version is that all
property pages support
Unicode.
Also everything is 100% IDE-Safe.
I do intentionally not publish the source code for this to avoid redundancies.
Here is a solution to use the VBCCR10.OCX Registration-Free. (Side-by-side)
Keep in mind that this technology needs at minimum Windows XP SP2 or Windows Server 2003.
Tutorial:
The "Development" machine needs to register VBCCR10.OCX as usual and use the components for e.g. in a Std-EXE project.
The source project needs to include the Side-by-side resources. (see below)
Then on the "End user" machine you only need the VBCCR10.OCX and the .exe (Std-EXE project) on the same folder.
It will work then without any registration.
The source code of "VBCCR10SideBySide.res" is:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<file name="VBCCR10.OCX">
<typelib tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" version="1.0" flags="control" helpdir="" />
<comClass clsid="{8601688A-5AE4-4E72-A048-5B98B803FC8C}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.CommonDialog" />
<comClass clsid="{5B319054-D9B4-4983-8C19-58335FAC0296}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{E0788311-759B-407C-A929-91B42E90E616}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.UpDown" />
<comClass clsid="{2B5F079B-5CAD-4CFE-B1E4-0063AED55A1F}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{41BA8A4F-52EA-437C-AE89-C576D2BE37C9}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.TreeView" />
<comClass clsid="{6F605BD6-03A1-4BF3-AB55-138C0C71F039}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ToolTip" />
<comClass clsid="{7DF3862A-0CA7-4AF8-87DA-14BB5318086E}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{14E704AD-ADCC-4E76-9A2E-83CA38A87071}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ToolBar" />
<comClass clsid="{F655539D-290C-488B-A471-7A7477FD610C}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{6CDFC3B6-16C1-49CA-9A38-B8D0191CF4E5}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.TextBoxW" />
<comClass clsid="{BF54A588-7D1D-45DE-A48E-0761D4F0CDFE}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{B3BCDCAB-AE3B-4899-A2FE-FE82C3E3AD33}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{121486A6-1B27-4FA2-9D8C-E42E4F0E0FC7}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.TabStrip" />
<comClass clsid="{92AAD9D1-5900-4731-91D7-E705BA287B9F}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{A773E4A9-C2B5-4979-89EB-F402F747ECE2}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.SysInfo" />
<comClass clsid="{C20F53B2-057C-42C9-8A2E-D3CCA7D03F0C}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{98722513-DE25-405F-AC64-9E22C0BC92C7}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{4DD49DF3-BE23-412C-A66B-220FFF0E07CE}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.StatusBar" />
<comClass clsid="{33EC5301-1481-4F3B-91C7-4CC86583669B}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.SpinBox" />
<comClass clsid="{8855093C-AA41-4896-A397-4A501B2342FF}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{9B2C0845-B5C2-42D4-8896-4DF5F6126C43}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{7A606FF5-E223-4DDD-B10C-0A463F7FF34D}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.Slider" />
<comClass clsid="{F3467CCA-E75C-4EC5-BE6A-40E486588111}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{00F78EA7-39A3-454C-8766-DC0877EAB3FD}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{1E9AC570-5A92-43CB-B0AC-BB25D1E071AD}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.RichTextBox" />
<comClass clsid="{5462ED0C-09AA-4BAC-AC89-209C3BC135A5}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ProgressBar" />
<comClass clsid="{E47F59C0-DB10-4FEA-8479-014543A1592A}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{84220344-EC4D-46FA-B93D-5D91A71EEBBF}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.Pager" />
<comClass clsid="{E1D2F892-E2AB-434D-8848-7988DB01D1D7}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{78C7ACA3-1296-4B30-B0F4-C9BEF8189CF3}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.OptionButtonW" />
<comClass clsid="{1426112E-FC90-443C-926A-A14EE3153C6A}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{EBC1EBF3-5BB7-44FA-99A0-E9B394BEEE79}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.MonthView" />
<comClass clsid="{5A48F961-8784-49B4-A33D-EB791FF03C29}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.MCIWnd" />
<comClass clsid="{450F0581-ED76-4FD0-80A6-EBF9C2BEED28}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{144F607D-E50F-457E-80C8-AF8FCEEBEF97}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ListView" />
<comClass clsid="{9E3840CE-655C-4750-9B91-659DB66236C2}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{D0209DF7-7E21-4F16-9AAC-04569170D8A6}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{6715850E-C5A1-4402-834F-876B58364BFB}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ListBoxW" />
<comClass clsid="{86457A21-B800-4093-A5F5-19B6642597CA}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.LabelW" />
<comClass clsid="{9E7DB98B-8F1E-4FA0-9CC9-CF0CF10BAD02}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.IPAddress" />
<comClass clsid="{4EFAA401-3A2D-49CB-AEA2-C3646D308191}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{E0FF485A-B64B-4A09-BD06-FFA31B8B86A8}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ImageList" />
<comClass clsid="{67A86DAB-5588-4848-B07E-ECF9C3345F4E}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{9B8F26EB-0E78-4CF1-8A3F-DF14C182B7DD}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ImageCombo" />
<comClass clsid="{ECC8AD11-6EF4-4879-BB4D-8DA679891A79}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{46CFA4F3-32FA-4748-B626-C58F419D52A0}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.HotKey" />
<comClass clsid="{8B8D0C2A-E6F2-48F7-B906-508AE305FAB0}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.FrameW" />
<comClass clsid="{C2DBF8B6-D42E-4D00-A649-CD8CF26D5D67}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{EA330ADD-7A77-4BBC-831A-4A026437F1CA}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.DTPicker" />
<comClass clsid="{1B36B5A7-1155-4CCA-BF93-85E46CF3C03B}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.CoolBar" />
<comClass clsid="{BD3F1035-9250-4D15-B110-A6054B3A9B7D}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{5AD3A4E3-C85F-4EC3-BE37-69B306BED1F6}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{6A70B990-3D4E-411A-8FE6-B6C8CC020018}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.CommandButtonW" />
<comClass clsid="{78DBE8D4-B938-44DE-B514-B4B3558C79CE}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.ComboBoxW" />
<comClass clsid="{76BCBCAE-6822-48E4-B6CC-50DF6128F2F0}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.CheckBoxW" />
<comClass clsid="{5B432C6C-DF42-4370-A98A-14E82AB2EEFE}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" />
<comClass clsid="{C59E1C4C-F305-42F8-AD0F-03F8022A171D}" tlbid="{CE08B9D4-381D-4D40-B699-E8352BA50128}" threadingModel="Apartment" progid="VBCCR10.Animation" />
</file>
</assembly>
In the attachment I have added the same as a compiled resource.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
putuoka
Please help , i was done download ocx file and registered it wit regsvr32 and then i use resource hacker to add res file to vb6.exe it work fine showing your custom controls but when drag to the form it show without style. still in the old button item, etc :(
Attachment 116095
Are the VB intrinsic controls showing the visual styles?
-
Re: CommonControls (Replacement of the MS common controls)
Hello,
With the object "ComboBoxW" mode "DropDown List" (2) mode , change the value "Text" do not update the "ListIndex" list. The ComboBox VB6 yes.
Why?
-
Re: CommonControls (Replacement of the MS common controls)
Hello (again)
In the "TabStrip" object, how to know the background color of the client area.
Why the selected tab is called "SelectedTab" and not "SelectedItem" as in VB6?
best regards
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
public
In the "TabStrip" object, how to know the background color of the client area.
The background color of the TabStrip control (respectively "SysTabControl32") is hardcoded in comctl32.dll.
When VisualStyles are False it is always vbButtonFace color.
If VisualStyle are True you need to look at the "GetThemeColor" function of uxtheme.dll.
Quote:
Originally Posted by
public
With the object "ComboBoxW" mode "DropDown List" (2) mode , change the value "Text" do not update the "ListIndex" list. The ComboBox VB6 yes.
Why the selected tab is called "SelectedTab" and not "SelectedItem" as in VB6?
Thanks for this information!
I will check your points soon.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Is it possible to have the property "BackgroundColorArea"?
This would "perhaps" easier to know the inside of your OCX
or better
Have an object "TabStripContainer"
Otherwise VERY good job
There should be some "On error goto" in places.
Example: Add an invalid image in the "ListImage" the control plant.
In "PPImageListImages"
Code:
Private Sub CommandInsert_Click()
Dim Path As String, FileNames() As String
Dim OpenFileDialog As CommonDialog
Set OpenFileDialog = New CommonDialog
With OpenFileDialog
.Flags = CdlOFNExplorer Or CdlOFNPathMustExist Or CdlOFNFileMustExist Or CdlOFNAllowMultiSelect
.MaxFileSize = .MaxFileSize * 5000
.Filter = "All Picture Files|*.ICO;*.CUR;*.BMP;*.GIF;*.JPG|Icons & Cursors (*.ICO;*.CUR)|*.ICO;*.CUR|Bitmaps (*.BMP;*.DIB)|*.BMP;*.DIB|GIF Images (*.GIF)|*.GIF|JPEG Images (*.JPG)|*.JPG|All Files (*.*)|*.*"
.DialogTitle = "Select Picture"
End With
If OpenFileDialog.ShowOpen = True Then
With OpenFileDialog
If InStr(.FileName, vbNullChar) <> 0 Then
Path = Left$(.FileName, .FileOffset - 1)
If Not Right$(Path, 1) = "\" Then Path = Path & "\"
FileNames() = Split(Mid$(.FileName, .FileOffset + 1), vbNullChar)
Else
Path = Left$(.FileName, .FileOffset)
ReDim FileNames(0) As String
FileNames(0) = .FileTitle
End If
End With
On Error Resume Next
If Not Path = vbNullString Then
If PropertyPage.Changed = True Then Call PropertyPage_ApplyChanges
Dim i As Long, Picture As IPictureDisp
For i = LBound(FileNames()) To UBound(FileNames())
Set Picture = PictureFromPath(Path & FileNames(i))
If Err.Number = 0 Then
With PropertyPage.SelectedControls(0)
Dim PictureWidth As Long, PictureHeight As Long
PictureWidth = PropertyPage.ScaleX(Picture.Width, vbHimetric, vbPixels)
PictureHeight = PropertyPage.ScaleY(Picture.Height, vbHimetric, vbPixels)
If PictureWidth = .ImageWidth And PictureHeight = .ImageHeight Then
CurrIndex = CurrIndex + 1
.ListImages.Add CurrIndex, , Picture
Call ApplyControlStates
Call FillShadowListImages
Call DrawImages
PropertyPage.Changed = True
Else
Dim Text As String
Text = "The size of the selected picture '" & FileNames(i) & "' is not compatible"
If PictureHeight <> .ImageHeight Then Text = Text & vbNewLine & "- Height is not " & .ImageHeight & " pixels"
If PictureWidth <> .ImageWidth Then Text = Text & vbNewLine & "- Width is not " & .ImageWidth & " pixels"
MsgBox Text, vbExclamation + vbOKOnly
Exit For
End If
End With
Else
Err.Clear
End If
Next i
End If
End If
On Error GoTo 0
End Sub
When you right-click to have the property of an object in the IDE, here is what happens.
Often, the property "PropertyPage.SelectedControls (0).ControlsEnum" does not exist
Attachment 116157
Well, that's all. (for the moment)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
public
With the object "ComboBoxW" mode "DropDown List" (2) mode , change the value "Text" do not update the "ListIndex" list. The ComboBox VB6 yes.
Why the selected tab is called "SelectedTab" and not "SelectedItem" as in VB6?
Done. And some other improvements.
Quote:
Originally Posted by
public
There should be some "On error goto" in places.
Example: Add an invalid image in the "ListImage" the control plant.
In "PPImageListImages"
Done. I inserted a check whether the outcome Picture object is 'Nothing' or not. If it is Nothing it will result in a error MsgBox and the procedure is stopped. Thus IDE is not crashing anymore.
Quote:
Originally Posted by
public
Have an object "TabStripContainer"
Could you please describe the goal of such an object? Whats the purpose?
Quote:
Originally Posted by
public
When you right-click to have the property of an object in the IDE, here is what happens.
Often, the property "PropertyPage.SelectedControls (0).ControlsEnum" does not exist
Hmm. That should exist. You can check in the control whether there is a "Property Get ControlsEnum". It's a hidden property.
When is this happening exactly? Only on the TreeView control? Only in the OCX?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Are the VB intrinsic controls showing the visual styles?
what did u mean? sorry my english not good.
like the pic as i post show, it's showing visual styles in VB intrinsic controls but when dragged on the form it hasn't a style same as if i run it
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
putuoka
what did u mean? sorry my english not good.
like the pic as i post show, it's showing visual styles in VB intrinsic controls but when dragged on the form it hasn't a style same as if i run it
Intrinsic controls are those controls who are always available, even on a blank project. If they also do not show the visual styles then something is wrong with your VB6.exe resource.
-
3 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hello
Here is a screen copy this happens when the demand for property stops.
Attachment 116197
In the IDE, all routines using "ControlsEnum" have this problem.
The OCX works correctly.
I attached an example to find the background color of the "TabStrip" and why I wanted to know
A test with and without theme.
Attachment 116199
VBA Version
Attachment 116201
VB6.EXE 6.0.81.76
VB6IDE.DLL 6.0.97.82
VB6.DLL 6.0.0.9782
-
Re: CommonControls (Replacement of the MS common controls)
Yeah
Changing "ParentControls" with "Parent.Controls" seems to work better.
I have no error on "ControlsEnum" at the request of the properties in the IDE!! :)
Code:
Public Property Get ControlsEnum() As Object
' Set ControlsEnum = UserControl.ParentControls
Set ControlsEnum = UserControl.Parent.Controls
End Property
And it works for all controls, I tried.
I'm happy