-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Use the 'ColumnWidth' property and set it to a higher value.
I tried, not help. No response to parameter change. Win XP, but met this and Win7
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
I tried, not help. No response to parameter change. Win XP, but met this and Win7
I have tried to replicate and I was only able to replicate it when setting the 'ColumnWidth' in Form_Load, but I could resolve it by placing a 'DoEvents' before setting the 'ColumnWidth'. I am not sure why this is necessary.
But please confirm that this solves your issue - for the moment.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
I have tried to replicate and I was only able to replicate it when setting the 'ColumnWidth' in Form_Load, but I could resolve it by placing a 'DoEvents' before setting the 'ColumnWidth'. I am not sure why this is necessary.
But please confirm that this solves your issue - for the moment.
On both my machines problem exist in the IDE, but no in compiled-exe. In IDE doevents not help.
Tomorrow check on other computers, as I remember that the problems encountered in the project compiled, but something I doubt
***********
If I use the ColumnWidth property to compile the project, on the contrary it leads to any machine to the problem of reducing the text to the same species, regardless of the ColumnWidth.
If the property is not used, it appears not all machines
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
On both my machines problem exist in the IDE, but no in compiled-exe. In IDE doevents not help.
Tomorrow check on other computers, as I remember that the problems encountered in the project compiled, but something I doubt
***********
If I use the ColumnWidth property to compile the project, on the contrary it leads to any machine to the problem of reducing the text to the same species, regardless of the ColumnWidth.
If the property is not used, it appears not all machines
Does it work when setting the ColumnWidth not in the Form_Load event? For instance in a CommandButton_Click event instead?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Does it work when setting the ColumnWidth not in the Form_Load event? For instance in a CommandButton_Click event instead?
If property ColumnWidth is used in the event CommandButton_Click it works correctly
-
Re: CommonControls (Replacement of the MS common controls)
Very nice project.
Bug: When you click on the Icons property of the ListView control, VB crashes. Same result in both sample project and new project. VB6/SP6 Win7 x64.
I was looking into ImageLists for the ListView. I noticed that I cannot use the system image list by setting the .Icons and .SmallIcons property to the system image list handle (no errors, but no icons). Not sure if that's a bug or just not possible with the design. I tried assigning it with LVM_SETIMAGELIST, however that tripped several breaks on Debug.Assert CBool(OldPointer <> NewPointer) in VTableSubclass.cls followed by complete lockup, had to ctrl+alt+del the ide. No indication of the problem was otherwise given.
It's obviously critical to be able to use the system image list, hopefully it's something simple I'm overlooking.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
fafalone
Bug: When you click on the Icons property of the ListView control, VB crashes. Same result in both sample project and new project. VB6/SP6 Win7 x64.
I am not able to replicate it.
Is your IDE crashing when clicking in the property browser or on the property page? Or both?
Quote:
Originally Posted by
fafalone
I was looking into ImageLists for the ListView. I noticed that I cannot use the system image list by setting the .Icons and .SmallIcons property to the system image list handle (no errors, but no icons). Not sure if that's a bug or just not possible with the design. I tried assigning it with LVM_SETIMAGELIST, however that tripped several breaks on Debug.Assert CBool(OldPointer <> NewPointer) in VTableSubclass.cls followed by complete lockup, had to ctrl+alt+del the ide. No indication of the problem was otherwise given.
It's obviously critical to be able to use the system image list, hopefully it's something simple I'm overlooking.
The .Icons, .SmallIcons and .ColumnHeaderIcons does not handle a 'Long' value.
-
Re: CommonControls (Replacement of the MS common controls)
good work, pls keep it up
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
Using listview on some computers I have an incomprehensible situation. Text element is reduced to a certain size, and placed at the end ...
Attachment 111939
How can I fix this?
I use a view=2 'viewlist
Elements add the following code
Update released.
Text element is now not getting reduced anymore when setting the 'SmallIcon' property. So the behavior is now the same as the original ListView control from MS.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
hello Krool
i found a bug in date and time picker:
Attachment 112461
when you click on UpDown Button, it changes so fast, i think it should have a delay before rapid change..
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
quicken
hello Krool
i found a bug in date and time picker:
Attachment 112461
when you click on UpDown Button, it changes so fast, i think it should have a delay before rapid change..
what do you mean by rapid change?
By me, when I click, it increments or decrements by 1. But when you hold down the mouse button then it will speed up. I do not think that this is a bug.
-
Re: CommonControls (Replacement of the MS common controls)
Krool,
Thank for the CommonControls (Replacement of the MS common controls) project., a valuable project.
Do you have a user control developed for Explorer-style Folder/File Treeview?, If you can create such a tool which works without any dependency, it will be great to the VB6 community.
The only known solution to me in VB6 is Folder Treeview control I found at the following location.
http://ccrp.mvps.org/
But, it is released as an OCX.
Do you have any idea please?
Thanks once again.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Bandula Prasanna
Krool,
Thank for the CommonControls (Replacement of the MS common controls) project., a valuable project.
Do you have a user control developed for Explorer-style Folder/File Treeview?, If you can create such a tool which works without any dependency, it will be great to the VB6 community.
The only known solution to me in VB6 is Folder Treeview control I found at the following location.
http://ccrp.mvps.org/
But, it is released as an OCX.
Do you have any idea please?
Thanks once again.
I remembered PSC had the kind of Folderview codes using own-drawn treeview. You can search for it.
-
Re: CommonControls (Replacement of the MS common controls)
sorry krool
i figured that the problem is from my Windows, even Date and Time picker of windows not changing correctly, I don't know where the problem came from and how to fix it...
thank you krool and sorry for wrong bug report..
-
Re: CommonControls (Replacement of the MS common controls)
Update released.
This is quite important when using the ListView control.
-
Re: CommonControls (Replacement of the MS common controls)
Update released.
For info:
This update breaks the compatibility with the VBCCR10.OCX.
I will not create a new OCX now, as I want to wait to collect more such "break compatibility" updates.
But if there will be a critical bug (that does not break the compatibility) then I will adopt this also to the VBCCR10.OCX. ;)
-
Re: CommonControls (Replacement of the MS common controls)
Update released.
VBCCR10.OCX cannot be updated with the new features as it breaks compatibility.
I still wait for more such updates before I will release VBCCR11.OCX.
-
Re: CommonControls (Replacement of the MS common controls)
treeview bug? when set treeview's propety HideSelection=False, treeview not draw selected cell when lost focus,
i found must comment some code in following, it seem about drag and drop, but i think these code not work right
Private Function WindowProcUserControl(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
...
...
Case NM_CUSTOMDRAW
Dim NMTVCD As NMTVCUSTOMDRAW
CopyMemory NMTVCD, ByVal lParam, LenB(NMTVCD)
Select Case NMTVCD.NMCD.dwDrawStage
Case CDDS_PREPAINT
WindowProcUserControl = CDRF_NOTIFYITEMDRAW
Exit Function
Case CDDS_ITEMPREPAINT
If NMTVCD.NMCD.lItemlParam <> 0 Then
Set Node = PtrToObj(NMTVCD.NMCD.lItemlParam)
With Node
'If Not NMTVCD.NMCD.uItemState = (CDIS_FOCUS Or CDIS_SELECTED) Then
'If SendMessage(TreeViewHandle, TVM_GETNEXTITEM, TVGN_DROPHILITE, ByVal TVI_ROOT) <> NMTVCD.NMCD.dwItemSpec Then
'NMTVCD.ClrText = WinColor(.ForeColor)
'NMTVCD.ClrTextBk = WinColor(.BackColor)
'CopyMemory ByVal lParam, NMTVCD, LenB(NMTVCD)
'End If
End If
-
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
Update released. Thanks for your bug report.
-
Re: CommonControls (Replacement of the MS common controls)
thanks for your nice work, first.
you add following code to skip problem:
If NMTVCD.ClrTextBk <> WinColor(vbButtonFace) Then
but i think your custom draw code with drag and drop seems no usage, comment it can increase custom draw speed and resolve this problem.
btw, hope ImageList can support 32bit color icon with alpha channel(XP ICON)
thanks a lot:)
-
Re: CommonControls (Replacement of the MS common controls)
Is it possible to use these controls in a VBA project? I have an existing VBA project that I've run into issues using the mscomctl.ocx library so I'm trying to find a replacement for it.
Thanks
Ron
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
rgregory
Is it possible to use these controls in a VBA project? I have an existing VBA project that I've run into issues using the mscomctl.ocx library so I'm trying to find a replacement for it.
Thanks
Ron
Not possible to use in VBA. :-(
-
Re: CommonControls (Replacement of the MS common controls)
Well, the pre-compiled (and normally registered) OCX-version should do fine in VBA(UserForms).
Olaf
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Hi, Only found this a couple of days ago. Fantastic!
Still exploring but I note that there is no HelpContextID for the toolbar control although it's there for the other controls I've looked at. Pity as I use this on the project I was thinking of using replacing the controls on.
Also the toolbar has a BackColor property which doesn't seem to do anything. (But as there is no BackColor property for the MSToolbar I can't complain!)
Keep up the great work
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jim Naylor
Also the toolbar has a BackColor property which doesn't seem to do anything. (But as there is no BackColor property for the MSToolbar I can't complain!)
The BackColor property is ignored when control paints via double-buffering. (DoubleBuffer property)
So in order to use a custom BackColor you need to set the DoubleBuffer property to False.
Quote:
Originally Posted by
Jim Naylor
Still exploring but I note that there is no HelpContextID for the toolbar control although it's there for the other controls I've looked at. Pity as I use this on the project I was thinking of using replacing the controls on.
Hmm. Thats true. The reason seems to be because the control cannot get the focus. As soon as I set the ToolBar to CanGetFocus = True the HelpContextID is available...
-
Re: CommonControls (Replacement of the MS common controls)
Thanks for that.
I've modified the CanGetFocus in the control and yes I can get the HelpContextID and with DoubleBuffer off the color is all OK. But that makes me ask, what does DoubleBuffer do? as nothing else seems to change.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jim Naylor
Thanks for that.
I've modified the CanGetFocus in the control and yes I can get the HelpContextID and with DoubleBuffer off the color is all OK. But that makes me ask, what does DoubleBuffer do? as nothing else seems to change.
Double buffering is reducing some flickering. Especially in the ListView control you can see the difference.
-
Re: CommonControls (Replacement of the MS common controls)
Thanks for the explaination. I doubt if flicker will be a problem on a toolbar, so I'll keep it off.
-
Re: CommonControls (Replacement of the MS common controls)
Krool,
Fantastic project, I have been following it for a while and tested several of the versions(the previous I downloaded was 2013-03-19) without any trouble.
I just tried the latest(2014-05-08) and got a new error from the Listview control at startup followed by IDE-crash.
Quote:
"To use this functionality, you must provide a manifest specifying comctl32.dll version 6.0 or higher"
Code:
Public Property Get Groups() As LvwGroups
If PropGroups Is Nothing Then
If ComCtlsSupportLevel() >= 1 Then
Set PropGroups = New LvwGroups
PropGroups.FInit Me
Else
Err.Raise Number:=91, Description:="To use this functionality, you must provide a manifest specifying comctl32.dll version 6.0 or higher"
End If
End If
Set Groups = PropGroups
End Property
I checked my system and my COMCTL32.DLL is File version 5.82.7601.18201 but Product version 6.1.7601.181201
The previous one(2014-03-19) I have works but not the newer one(2014-05-08)
Any suggestions?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Ramses800
Krool,
Fantastic project, I have been following it for a while and tested several of the versions(the previous I downloaded was 2013-03-19) without any trouble.
I just tried the latest(2014-05-08) and got a new error from the Listview control at startup followed by IDE-crash.
Code:
Public Property Get Groups() As LvwGroups
If PropGroups Is Nothing Then
If ComCtlsSupportLevel() >= 1 Then
Set PropGroups = New LvwGroups
PropGroups.FInit Me
Else
Err.Raise Number:=91, Description:="To use this functionality, you must provide a manifest specifying comctl32.dll version 6.0 or higher"
End If
End If
Set Groups = PropGroups
End Property
I checked my system and my COMCTL32.DLL is File version 5.82.7601.18201 but Product version 6.1.7601.181201
The previous one(2014-03-19) I have works but not the newer one(2014-05-08)
Any suggestions?
The demo is using the 'Groups' functionality, which requires a manifest linking to the comctl32.dll version 6.0 or higher. The compiled .exe is linked to version 6.0. But the IDE itself is most likely linked to version 5.x. Thus the Error happens in the IDE only.
However, whenever the functionality is called it will raise an error. (most likely in the IDE because this links to version 5.x)
In the demo I put a "On Error Resume Next" befor to the 'Groups' call to avoid this.
But this ("On Error Resume Next") will be only working when you configure the IDE like following:
Quote:
In order to trap error raises via "On Error Goto ..." or "On Error Resume Next" it is necessary to have "Break on Unhandled Errors" selected instead of "Break in Class Module" on Tools -> Options... -> General -> Error Trapping.
-
Re: CommonControls (Replacement of the MS common controls)
Excellent, that did the trick!
Again, fantastic work!
-
Re: CommonControls (Replacement of the MS common controls)
Couple of minor issues with the toolbar
The MSToolbar is a container but the replacement isn't, fixed by changing the ControlContainer property of the control to True.
If you set the whole toolbar to Enabled = False, then later set Enabled = True, the disabled shaddows still partly show.
I fixed this by putting UserControl.Refresh after
If ToolBarHandle <> 0 Then EnableWindow ToolBarHandle, IIf(Value = True, 1, 0)
in the Enabled property of the control.
Everything else so far working great.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jim Naylor
Couple of minor issues with the toolbar
The MSToolbar is a container but the replacement isn't, fixed by changing the ControlContainer property of the control to True.
If you set the whole toolbar to Enabled = False, then later set Enabled = True, the disabled shaddows still partly show.
I fixed this by putting UserControl.Refresh after
If ToolBarHandle <> 0 Then EnableWindow ToolBarHandle, IIf(Value = True, 1, 0)
in the Enabled property of the control.
Everything else so far working great.
Thanks for your help. Appreciated.
Update released. :)
-
Re: CommonControls (Replacement of the MS common controls)
Re the DateTime Picker.
1) I click on the Day part to highlight it. Then I scroll the mousewheel:
a) If I am at 30-Apr-2014 and I scroll up,
instead forward to 1-May-2014, it goes backward to 1-April-2014.
b) If I am at 1-Apr-2014 and scroll down,
instead backward to 31-Mar-2014, it jumps forward to 30-Apr-2014.
2) Similarly for the Month part, then use mousewheel to scroll:
a) At Dec-2013 and scroll up, instead of Jan-2014, it goes backward to Jan-2013.
b) At Jan-2014 and scroll down, instead of Dec-2013, it goes forward to Dec-2014
3) When click to open and show the calendar view:
a) If I am at 15-April-2014, click on the < to go to previous month,
instead of 15-Mar-2014, it goes to the 1-Mar-2014.
b) If I am at 15-April-2014, click on the > to go to next month,
instead of 15-May-2014, it goes to 1-May-2014.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
chosk
Re the DateTime Picker.
1) I click on the Day part to highlight it. Then I scroll the mousewheel:
a) If I am at 30-Apr-2014 and I scroll up,
instead forward to 1-May-2014, it goes backward to 1-April-2014.
b) If I am at 1-Apr-2014 and scroll down,
instead backward to 31-Mar-2014, it jumps forward to 30-Apr-2014.
2) Similarly for the Month part, then use mousewheel to scroll:
a) At Dec-2013 and scroll up, instead of Jan-2014, it goes backward to Jan-2013.
b) At Jan-2014 and scroll down, instead of Dec-2013, it goes forward to Dec-2014
3) When click to open and show the calendar view:
a) If I am at 15-April-2014, click on the < to go to previous month,
instead of 15-Mar-2014, it goes to the 1-Mar-2014.
b) If I am at 15-April-2014, click on the > to go to next month,
instead of 15-May-2014, it goes to 1-May-2014.
I assume this is the comctl32 v6.1 version?
At this version I did not do any "custom procedures" for mousewheel or so as there is a default procedure for that.
Thus all that behavior you encounter are default procedures.
-
Re: CommonControls (Replacement of the MS common controls)
Important update released when using the MonthView control.
-
Re: CommonControls (Replacement of the MS common controls)
This is fantastic! I've been beating my head against the wall on an vb6 app trying to get it to load in the ide under windows 8.1 .... mscomctrl.ocx fails to load and though I''ve searched for a working solution I can't get any of them to work for more than a day or so. This looks pretty promising.
I'm hopeful this OCX help me get back on track. For any of you considering moving from xp to Windows 8.1 ... save yourself the frustration and stay on or upgrade to Win 7. It was a huge mistake for me to even try.
-
Re: CommonControls (Replacement of the MS common controls)
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).
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
I loaded in Vb5, ersed some lines in cls files as usual (vb5 can't regognize that, was vb6 flags), no missing of the reference to tlb, so press F5 and that happen:
Attachment 114289
why???