Page 17 of 94 FirstFirst ... 7141516171819202767 ... LastLast
Results 641 to 680 of 3726

Thread: CommonControls (Replacement of the MS common controls)

  1. #641
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    20

    Re: CommonControls (Replacement of the MS common controls)

    Thanks!

  2. #642
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    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.

    Quote Originally Posted by Krool View Post
    List of revisions:
    11-Feb-2015
    ...
    - Removed the ToolTip control.

  3. #643
    Junior Member
    Join Date
    Jan 2014
    Location
    Oregon
    Posts
    20

    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.

  4. #644

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

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

  5. #645
    Addicted Member
    Join Date
    Sep 2008
    Posts
    141

    Re: CommonControls (Replacement of the MS common controls)

    Krool, any plans to replace the winsock control?

  6. #646
    Addicted Member
    Join Date
    Jun 2009
    Location
    C:\Windows\SysWOW64\
    Posts
    227

    Re: CommonControls (Replacement of the MS common controls)

    @brandoncampbell
    Not really necessary.
    See here, here and here.

  7. #647
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    Just came across The commandButtonW SplitButton Property, it looks very interesting how do I add items and/or check what is selected?

  8. #648
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    ... 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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  9. #649
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    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?

  10. #650
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  11. #651
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    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)

  12. #652
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  13. #653
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    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.
    pre-multiplied ARGB BMP ? never heard of it (in vb6), could you elaborate please , or at least point me to the right direction.

    tested it, and I am getting invalid picture.
    Last edited by ishalom; Mar 11th, 2015 at 08:28 PM.

  14. #654

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

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

  15. #655
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    how do I set RightToLeft Property to the controls?

  16. #656

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    how do I set RightToLeft Property to the controls?
    You can't. The controls are same as the ambient RighToLeft property.

  17. #657
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by ishalom View Post
    pre-multiplied ARGB BMP ? never heard of it (in vb6), could you elaborate please , or at least point me to the right direction.
    Sure. Check out the links in this Google search.

    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.

    Name:  CommandButtonW Demo.png
Views: 1415
Size:  5.3 KB

    Oh, BTW, I created the pARGB BMPs with Pixelformer.
    Attached Files Attached Files
    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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  18. #658
    New Member
    Join Date
    Mar 2015
    Posts
    1

    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

  19. #659
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    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.
    Attached Images Attached Images   
    Last edited by Jonney; Apr 12th, 2015 at 07:10 PM. Reason: Add Screenshot

  20. #660
    New Member
    Join Date
    Mar 2015
    Posts
    4

    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:
    Name:  untitled.jpg
Views: 1122
Size:  7.3 KB
    Thank you in advance for considering this problem.

    Gigirex

  21. #661
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by gigirex View Post
    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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  22. #662
    New Member
    Join Date
    Mar 2015
    Posts
    4

    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

  23. #663
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    36

    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

  24. #664

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by gigirex View Post
    The error is precisely on the With instruction.
    I cannot confirm this error. By me its working. Anyone else problem on this?

    Quote Originally Posted by lrd_VB6 View Post
    I just found by chance a bug in "CommonDialog.ShowOpen"
    It is not possible to use "FileName" as the default file.
    Thank you. Will fix this issue. However, the save dialog did not had this bug.
    Last edited by Krool; Apr 30th, 2015 at 11:52 AM.

  25. #665
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    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
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  26. #666
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Refer to #659

    Code:
    NewPrinterName = Mid$(DNAMES.wExtra, _
                              DNAMES.wDeviceOffset - DNAMES.wDriverOffset + 1)
    NewPrinterName = VBA.Left$(NewPrinterName, _
                              InStr(NewPrinterName, Chr$(0)) - 1)

  27. #667
    Member lrd_VB6's Avatar
    Join Date
    Jul 2014
    Location
    FRANCE
    Posts
    36

    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
    while the following code does the same thing?
    Code:
        Buffer = String(PropMaxFileSize, vbNullChar)
        Mid$(Buffer, 1) = PropFileName
    VB guaranteed that the replacement string will never exceed the original chain.
    (that is what is written in Help)

    For proof:
    Code:
    a$="123456789"
    ?lenb(a$)
     18 
    mid$(a$,1)="09876543210"
    ?a$
    098765432
    ?lenb(a$)
     18
    c$=vbnullstring
    mid$(a$,1)=c$
    ?a$
    098765432
    ?lenb(a$)
     18
    Finally, in VBCCR11.ocx, "CommonDialog" does not have the event "InitDialog".
    It is normal?


    cordially
    Last edited by lrd_VB6; May 2nd, 2015 at 05:57 AM.

  28. #668

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by lrd_VB6 View Post
    in VBCCR11.ocx, "CommonDialog" does not have the event "InitDialog".
    It is normal?
    Yes. The event "InitDialog" will be on VBCCR12.OCX. (not yet released)

  29. #669
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    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

  30. #670
    Junior Member
    Join Date
    Sep 2014
    Posts
    31

    Re: CommonControls (Replacement of the MS common controls)

    Yes. The event "InitDialog" will be on VBCCR12.OCX. (not yet released)
    will projects using VBCCR11.OCX automatically update to VBCCR12.OCX?

  31. #671

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

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

  32. #672

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

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

  33. #673

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

  34. #674

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    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.

  35. #675
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,647

    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.

  36. #676
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    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.

    Again, thanks... Paul

  37. #677

    Thread Starter
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,373

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Paul@QMC.net View Post
    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

    Quote Originally Posted by Paul@QMC.net View Post
    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?

    Quote Originally Posted by fafalone View Post
    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.
    Is this also happening in the Demo project?
    Last edited by Krool; Jun 2nd, 2015 at 02:43 PM.

  38. #678
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    What are the events for TreeView (such a Node Click)? When Ending the program, all crashes, any fix. Thanks, Paul

  39. #679
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

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

    Thanks, Paul

  40. #680
    Junior Member
    Join Date
    Mar 2012
    Posts
    21

    Re: CommonControls (Replacement of the MS common controls)

    This article seems to provide the reasons for the crash when closing the program...

    http://www.vbaccelerator.com/home/VB...wn/article.asp

    But I don't like the sol'n... Paul

Page 17 of 94 FirstFirst ... 7141516171819202767 ... 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