Page 9 of 94 FirstFirst ... 67891011121959 ... LastLast
Results 321 to 360 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #321
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    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

  2. #322

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    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.

  3. #323
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    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
    Last edited by Romeo91; Mar 23rd, 2014 at 11:05 PM.

  4. #324

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    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?

  5. #325
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    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

  6. #326
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,651

    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.

  7. #327

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by fafalone View Post
    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 View Post
    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.
    Last edited by Krool; Mar 27th, 2014 at 02:58 PM.

  8. #328
    Fanatic Member coolcurrent4u's Avatar
    Join Date
    Apr 2008
    Location
    *****
    Posts
    993

    Re: CommonControls (Replacement of the MS common controls)

    good work, pls keep it up
    Programming is all about good logic. Spend more time here


    (Generate pronounceable password) (Generate random number c#) (Filter array with another array)

  9. #329

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    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.
    Last edited by Krool; Apr 1st, 2014 at 03:59 PM.

  10. #330
    New Member
    Join Date
    Dec 2013
    Posts
    9

    Re: CommonControls (Replacement of the MS common controls)

    hello Krool
    i found a bug in date and time picker:


    Name:  Untitled.jpg
Views: 1768
Size:  3.5 KB

    when you click on UpDown Button, it changes so fast, i think it should have a delay before rapid change..

  11. #331

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by quicken View Post
    hello Krool
    i found a bug in date and time picker:


    Name:  Untitled.jpg
Views: 1768
Size:  3.5 KB

    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.

  12. #332
    Registered User
    Join Date
    Jan 2014
    Posts
    1

    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.

  13. #333
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bandula Prasanna View Post
    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.
    Last edited by Jonney; Apr 6th, 2014 at 07:33 AM.

  14. #334
    New Member
    Join Date
    Dec 2013
    Posts
    9

    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..

  15. #335

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    This is quite important when using the ListView control.

  16. #336

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    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.
    Last edited by Krool; Apr 7th, 2014 at 04:20 PM.

  17. #337

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    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.

  18. #338
    Registered User
    Join Date
    Apr 2014
    Posts
    2

    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

  19. #339

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by netkiller View Post
    treeview bug? when set treeview's propety HideSelection=False, treeview not draw selected cell when lost focus
    Update released. Thanks for your bug report.

  20. #340
    Registered User
    Join Date
    Apr 2014
    Posts
    2

    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

  21. #341
    New Member
    Join Date
    Apr 2014
    Posts
    1

    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

  22. #342

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by rgregory View Post
    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. :-(

  23. #343
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: CommonControls (Replacement of the MS common controls)

    Well, the pre-compiled (and normally registered) OCX-version should do fine in VBA(UserForms).

    Olaf

  24. #344

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

  25. #345
    New Member
    Join Date
    May 2014
    Posts
    5

    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

  26. #346

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jim Naylor View Post
    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 View Post
    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...

  27. #347
    New Member
    Join Date
    May 2014
    Posts
    5

    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.

  28. #348

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jim Naylor View Post
    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.

  29. #349
    New Member
    Join Date
    May 2014
    Posts
    5

    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.

  30. #350
    New Member
    Join Date
    Feb 2014
    Posts
    3

    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.

    "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?

  31. #351

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Ramses800 View Post
    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:
    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.
    Last edited by Krool; May 9th, 2014 at 02:55 PM.

  32. #352
    New Member
    Join Date
    Feb 2014
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Excellent, that did the trick!
    Again, fantastic work!

  33. #353
    New Member
    Join Date
    May 2014
    Posts
    5

    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.

  34. #354

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jim Naylor View Post
    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.

  35. #355
    Hyperactive Member
    Join Date
    Feb 2014
    Posts
    278

    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.
    Last edited by chosk; May 15th, 2014 at 02:31 AM.

  36. #356

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by chosk View Post
    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.

  37. #357

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,374

    Re: CommonControls (Replacement of the MS common controls)

    Important update released when using the MonthView control.

  38. #358
    New Member
    Join Date
    May 2014
    Posts
    4

    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.

  39. #359
    New Member
    Join Date
    May 2014
    Posts
    7

    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).

  40. #360
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    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:

    Name:  problem.jpg
Views: 1364
Size:  54.4 KB

    why???

Page 9 of 94 FirstFirst ... 67891011121959 ... 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