CommonControls (Replacement of the MS common controls)-VBForums
Page 1 of 9 1234 ... LastLast
Results 1 to 40 of 343

Thread: CommonControls (Replacement of the MS common controls)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    CommonControls (Replacement of the MS common controls)

    This project is intended to replace the MS common controls for VB6.

    The "MSCOMCTL.OCX" (respectively "COMCTL32.OCX") can be replaced completly.
    The "MSCOMCT2.OCX" (respectively "COMCT232.OCX") can be replaced completly.
    The "RICHTX32.OCX" can be replaced completly.
    The "COMDLG32.OCX" can be replaced completly.
    The "COMCT332.OCX" can be replaced completly.
    The "MCIWNDX.OCX" (shipped with VB5) can be replaced completly.
    The "SYSINFO.OCX" can be replaced completly.

    Following controls are available at the moment:

    - Animation
    - CheckBoxW
    - ComboBoxW
    - CommandButtonW
    - CoolBar
    - CommonDialog (Class Module)
    - DTPicker
    - FrameW
    - HotKey
    - ImageCombo
    - ImageList
    - IPAddress
    - LabelW
    - ListBoxW
    - ListView
    - MCIWnd
    - MonthView
    - OptionButtonW
    - Pager
    - ProgressBar
    - RichTextBox
    - Slider
    - SpinBox
    - StatusBar
    - SysInfo
    - TabStrip
    - TextBoxW
    - ToolBar
    - ToolTip
    - TreeView
    - UpDown

    Unicode is supported for all the stated controls.

    At design time (IDE) there is only one dependency. (OLEGuids.tlb)
    This is a modified version of the original .tlb from the vbaccelerator website.
    But for the compiled .exe there are no dependencies, because the .tlb gets then compiled into the executable.

    Everything should be self explained, because all functions and properties have a description.

    This Demo shows of how to make the ToolBar control accessible per shortcut key on a MDIForm.

    ActiveX Control versions, together with a Registration-Free (Side-by-side) solution:
    Version 1.0

    Notes:
    - When using the SetParent API, then you should pass .hWndUserControl and not .hWnd to it.
    - When changing the "Project Name", then you should have all forms open, else all properties are lost. Reason is due to the fact that the library to which the controls are referring is the "Project Name" itself. Keeping all forms open will ensure that the .frx files will be updated with the new "Project Name".
    - 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.

    List of revisions:
    Code:
    14-Apr-2014
    - Bugfix in the drawing when the HideSelection property is False in the TreeView control.
    12-Apr-2014
    - Included the 'Groups' functionality in the ListView control. ('LvwGroup' and 'LvwGroups' classes)
      In order to use this the new property 'GroupView' must be set to True.
    - Included the 'Visible' property of a ListItem in the ListView control.
    - Bugfix in the Left/Top property of a ListItem (and not read-only anymore) in the ListView control.
    09-Apr-2014
    - Minor improvements.
    07-Apr-2014
    - The Text property of a ColumnHeader in the ListView control is now the 'Default' property. (Same as original from MS)
    06-Apr-2014
    - Fixed a bug in the Indentation property of a ListItem in the ListView control.
    - Fixed a bug that the UserControl_Terminate event did not fire in the ListView control.
      But the bug only appeared when the 'ColumnHeaders' property was used.
    01-Apr-2014
    - Bugfix in the ColumnWidth and SmallIcons property in the ListView control.
    22-Mar-2014
    - Fixed a critical bug in the Sorted property in the TreeView control. (it is recommended to replace all TreeView components)
    19-Mar-2014
    - Fixed the 'vertically stacked tabs' bug in the TabStrip control.
    16-Mar-2014
    - Bugfixes in the ToolBar control.
    12-Mar-2014
    - Fixed a GDI leak on all controls that have a Font property.
    10-Mar-2014
    - Minor bugfix in the TextBoxW control.
    - Some component modifications. (it is recommended to replace everything)
    06-Mar-2014
    - Fixed a bug (Applies to Win XP only) that the UserControl_Terminate event did not fire in the RichTextBox control.
    - Eliminated the exposed OLEGuids interfaces in the RichTextBox.
    21-Feb-2014
    - Fixed a bug in updating of the panels in the StatusBar control.
    12-Feb-2014
    - Improved the Picture property of the ListView control. (Passing the '.Image' of a PictureBox is now working properly)
    - The Visible property is now also available when setting to a shadow object. ('Set' command)
    - Fixed a bug in the MaxSelCount property of the MonthView control.
    - Fixed a bug in the MonthView control concerning the handling of the MCN_SELECT and MCN_SELCHANGE notification.
    10-Feb-2014
    - Included the ShowFind/ShowReplace function in the CommonDialog class.
    - Fixed a bug in the DTPicker control concerning the handling of the DTN_DATETIMECHANGE notification.
    - Minor bug fix in the Find function on the RichTextBox control.
    04-Feb-2014
    - Improved the bugfix concerning the UserControl_Terminate event in the RichTextBox control.
      Also solves the issue that 'IRichEditOleCallback' gets broken when repeatedly loading a RichTextBox control.
    31-Jan-2014
    - Finally, the printer dialogs in the CommonDialog class are now unicode aware.
    - Included the PrinterDefault property to the CommonDialog class.
    30-Jan-2014
    - Fixed a bug that the UserControl_Terminate event did not fire in the RichTextBox control.
    - The constant CdlPDReturnDefault is now working as expected in the ShowPrinter/ShowPrinterEx function in the CommonDialog class.
    - Fixed a bug in the ShowPrinter/ShowPrinterEx function in the CommonDialog class that the DM_DEFAULTSOURCE constant was not included into the DMFields.
    - Included the ShowPageSetup function in the CommonDialog class.
    27-Jan-2014
    - Splitted the ShowPrinter function into ShowPrinter and ShowPrinterEx in the CommonDialog class.
      Reason is due to the fact that they have both pros and cons.
      Some flags are only supported into one and not to the other and vice versa.
      Also the ShowPrinter is full compatible to the orginal ShowPrinter function from the CommonDialog from MS.
    - HelpButton constants are now supported in the CommonDialog class.
      When pressing a Help button the ShowHelp function will be fired by default, but only when the new 'Help' event was not handled.
    - Included the SysInfo control.
    20-Jan-2014
    - Included 'CdlHelpConstants' and the HelpKey/HelpContext (HelpData is removed) property to the CommonDialog class.
    - Centralized the MousePointer handling in the ComCtlsBase. (No recurring codes anymore)
    19-Jan-2014
    - Included the MCIWnd control.
    - The Left and Top properties are now also available when setting to a shadow object. ('Set' command)
    - Included the ShowHelp function to the CommonDialog class. (When using, WinHlp32 Update KB need to be installed post Windows XP)
    - Included the Object property in the CommonDialog class that returns the own instance.
    10-Jan-2014
    - Minor modifications/bug fixes on the RichTextBox control.
    09-Jan-2014
    - MultiLine property of the TextBoxW control can now be changed at run time.
    - The Text property (via property page "PPTextBoxWText") of the TextBoxW control is now unicode aware at design time.
    07-Jan-2014
    - Included the Resize event to the CoolBar control.
    - Minor modifications on the Animation control.
    03-Jan-2014
    - MouseUp event is now working properly for the left and right button in the ListView and TreeView control.
    - Included the WorkAreas property in the ListView control.
    - Fixed a bug in the TreeView control that NodeClick event is firing when clicking on the button of an item.
    28-Dec-2013
    - Changing the 'ListIndex' will fire now the Click event in the ListBoxW and ComboBoxW control as the intrinsic VB controls does it also.
    22-Dec-2013
    - Included the SplitButton property and DropDown event to the CommandButtonW control.
    - Removed the embedded VB Image control in the FrameW control as it is not necessary anymore.
    - Included the run time property 'DroppedWidth' to the ComboBoxW and ImageCombo control.
    - Included the GetIdealHorizontalExtent function to the ListBoxW and ComboBoxW control.
    19-Dec-2013
    - Fixed a bug that the WM_SETFOCUS handler was not included in the 'WindowProcEdit' of the ImageCombo control. (correct behavior now when pressing right mouse button)
    18-Dec-2013
    - Several bugfixes in the WM_MOUSEACTIVATE handler on almost all controls. (behavior errors)
    - Fixed a minor memory leak concerning to the accelerator table in the TabStrip, CheckBox and CommandButton control.
    16-Dec-2013
    - Enhanced the 'BuddyProperty' property of the UpDown control in the property page. (Drop down of all properties of the buddy control)
    14-Dec-2013
    - Optimized the editing of the Back- and ForeColor in the 'Bands' property page of the CoolBar control in the IDE.
      It uses now the StandardColor property page instead of the Color dialog of the CommonDialog. Thus it is easier to select a system color.
    - Optimized the serializing of the picture objects in the property bags. (Using the OleLoadPicturePath API)
      Thus the 'hidden' PictureByteStream properties are removed in the CoolBar, ImageList and StatusBar control.
    12-Dec-2013
    - Remake of the Style property of the ListBoxW control. (Bugfixes and instead of the ItemData it uses now the new ItemChecked property to determine if a item is checked or not)
    - Some other minor bugfixes in the ListBoxW and ComboBoxW control.
    11-Dec-2013
    - Included the Style property to the ListBoxW control. (0 - Standard, 1 - Checkbox)
    09-Dec-2013
    - Included the CoolBar control.
    - Renamed 'hWndOwner' to 'hWndUserControl' and the 'hWnd' of the ToolTip control to 'hToolTip'.
    - Fixed a bug in the ToolBar control that the CustomWidth and AutoSize property of the buttons are messed up when changing the TextAlignment property.
    - Optimized the UserControl_Resize handler and the GetIdealSize method of the ToolBar control.
    03-Dec-2013
    - Major improvement of controls that have a class object and use them in design mode. (ImageList, StatusBar, TabStrip, ToolBar)
      There was an issue that the UserControl_Terminate event still did not fire under certain circumstances, resulting in a unstable IDE.
      Another effect of this improvement is that there is no crash anymore when you compile the project with a opened form that contains a StatusBar and which is also subclassed. (DesignModeSubclass)
    02-Dec-2013
    - Optimized the StatusBar control. (SetParent issue and it does not cause a crash anymore when included in another UserControl)
    27-Nov-2013
    - Fixed a bug in the ToolBar control concerning the style property and optimized the resize event.
    25-Nov-2013
    - Fixed a bug in the FontChanged handler (freeze problem) and optimized the OLEFontToLogFont method.
    23-Nov-2013
    - Included a new CommonDialog.cls to have a reliable replace of the orginal CommonDialog from MS. (Thus the prior CommonDialog.bas have been discarded)
      Another advantage is that the new CommonDialog.cls is public when building an ActiveX control out of the project.
    - Fixed a bug in the FileName property of the RichTextBox control.
    - Other minor improvements.
    18-Nov-2013
    - Fixed a bug in the SelFontCharset property in the RichTextBox control.
    - Improved/Enhanced the ShowFont dialog to provide a proper Font feature in the RichTextBox Demo that works like in wordpad.
    17-Nov-2013
    - Included the SelFontCharset property in the RichTextBox control.
    - Improved the OLEFontToLogFont method. (Charset is now included)
    16-Nov-2013
    - Const MFS_DISABLED had an incorrect value and the Const BFFM_SETSELECTION value is changed to the Unicode version.
    13-Nov-2013
    - MinDate/MaxDate property of the DTPicker control does not cause a crash anymore at runtime and support now time values.
    12-Nov-2013
    - Modified the OLEGuids.tlb.
    - RichTextBox control is added.
    - Adopted the modified MousePointer property (see 10-Sep-2013) to all property pages.
    - LoadFile function supports now unicode path and file names.
    - Other minor improvements are done.
    28-Oct-2013
    - Included the GetLineFromChar function and fixed a bug in the GetLine function in the TextBoxW control.
    26-Oct-2013
    - Optimized the ContainerKeyDown method on the ToolBar control. (No beeps anymore when an intrinsic menu is present)
    25-Oct-2013
    - Fixed a behavior bug concerning the Text property in the TextBoxW and ImageCombo control.
    20-Oct-2013
    - Some enhancements to the TextBoxW control.
    - Fixed a bug on each Data.GetData(CF_UNICODETEXT) that the vbNullChar was not considered.
    18-Oct-2013
    - HotKey control is added.
    17-Oct-2013
    - Included a terminating vbNullChar on each Data.SetData(CF_UNICODETEXT). (is necessary)
    - Some other minor improvements are done.
    15-Oct-2013
    - Fixed a bug in the ListView control concerning the ColumnCheck event.
    14-Oct-2013
    - Included the OLEDragMode property to the ComboBoxW control.
    02-Oct-2013
    - Optimized the MousePointer handling in the FrameW control. (MousePointer works now on windowless controls when placed onto the FrameW control)
    - Included the Transparent property to the FrameW control.
    
    [...]
    
    11-Nov-2012
    - First release.
    Name:  ComCtlsDemoIDE.png
Views: 3019
Size:  52.2 KBName:  ComCtlsDemoEXE.png
Views: 2915
Size:  83.8 KB

    The attached file is a .rar file with a .zip extension so it could be uploaded.
    This is necessary as for a zip file there is a file limit of 500 KB.
    Attached Files Attached Files
    Last edited by Krool; Apr 14th, 2014 at 01:21 PM.

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,334

    Re: CommonControlsEx (Replacement of the MS common controls)

    What is the benefit of using these over the existing controls?

    Does each control have the same properties? Do they have new properties?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    The benefit is that these controls are linked to the comctl32.dll, that means they support the latest API calls, functions, properties and visual styles (themes).

    The existing common controls 6.0 from MS are not linked to the comctl32.dll, so they doesn't support the visual styles (themes).
    Reason why: The controls of the comct32.dll are compiled directly into the common controls 6.0 from MS, but as of state of a old version of comctl32.dll

    Only the common controls 5.0 from MS are linked to the comctl32.dll, but the COM hull is very old and so they have a leak of the latest functions and properties. Also controls like the DTPicker, MonthView or UpDown are not included.
    Last edited by Krool; Feb 28th, 2014 at 11:59 AM.

  4. #4
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The benefit is that these controls are linked to the comctl32.dll, that means they support the latest API calls, functions, properties and visual styles (themes).

    The existing common controls 6.0 from MS are not linked to the comctl32.dll, so they doesn't support the visual styles (themes).
    Reason why: The controls of the comct32.dll are compiled directly into the common controls 6.0 from MS, but as of state of a old version of comctl32.dll

    Only the common controls 5.0 from MS are linked to the comctl32.dll, but the COM hull is very old and so they have a leak of the latest functions and properties. Also controls like the DTPicker, MonthView or UpDown are not included.
    Can you please change the OLEGuids.tlb to a new name to avoid conflicts with my existing OLEGuids.tlb in system32 folder?

  5. #5
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    3,130

    Thumbs up Re: CommonControlsEx (Replacement of the MS common controls)

    Excellent work!

    Quote Originally Posted by Hack View Post
    What is the benefit of using these over the existing controls?

    Does each control have the same properties? Do they have new properties?
    In addition to what Krool stated, some folks, myself included, prefer that their apps have no dependencies whatsoever.

    The controls have most of the necessary (similarly named) properties and methods and many of them have some new ones as well (the VisualStyles property for instance).

    Quote Originally Posted by Jonney View Post
    Can you please change the OLEGuids.tlb to a new name to avoid conflicts with my existing OLEGuids.tlb in system32 folder?
    Open CommonControlsEx.vbp in any text editor and edit this line:

    Code:
    Reference=*\G{5B1EACE0-EDEB-11E1-AFF1-0800200C9A66}#1.0#0#..\..\..\..\WINDOWS\system32\OLEGuids.tlb#OLE Guid and interface definitions
    to:

    Code:
    Reference=*\G{5B1EACE0-EDEB-11E1-AFF1-0800200C9A66}#1.0#0#OLEGuids\OLEGuids.tlb#OLE Guid and interface definitions
    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)

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    Can you please change the OLEGuids.tlb to a new name to avoid conflicts with my existing OLEGuids.tlb in system32 folder?
    You can just rename the file "OLEGuids.tlb" at your own, for example to "OLEGuids2.tlb"
    That is no problem, because the uuid and library name differs from the original. They can co-exist without conflicts.
    You just need to re-register it in the IDE. (Project -> References... -> Browse for file)
    Last edited by Krool; Nov 12th, 2012 at 12:18 PM.

  7. #7
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You can just rename the file "OLEGuids.tlb" at your own, for example to "OLEGuids2.tlb"
    That is no problem, because the uuid and library name differs from the original. They can co-exist without conflicts.
    You just need to re-register it in the IDE. (Project -> References... -> Browse for file)
    Thanks. I understood.
    If you can add Unicode support, then those control can be used on PC with whatever locale setting.
    How about others control built by CreateWindowEx such as Listview/Treeview? Listview support more new features such as Grouping now.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:02 AM.

  9. #9
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    3,130

    Re: CommonControlsEx (Replacement of the MS common controls)

    Thanks for the update!
    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)

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.

    All controls support now Unicode and some other minor improvements are done.
    Last edited by Krool; Dec 15th, 2012 at 11:24 AM.

  11. #11
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released.

    All controls support now Unicode and some other minor improvements are done.
    Fairly support Unicode.
    But because of nature of MS BUTTON, it doesn't an unicode compatible control.
    Never mind, just leave this because it's hard to fully support Unicode for a Command button.

    DrawText hDC, StrPtr(Button.Caption), -1, RectText, DT_CALCRECT Or DT_WORDBREAK
    Button.Caption can never be held Unicode string, internal conversion has been done before you call DrawTextW.

  12. #12
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    3,130

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    Button.Caption can never be held Unicode string, internal conversion has been done before you call DrawTextW.
    This function will retrieve any button's caption, even if VB displays their Unicode captions as ?????.

    Code:
    Private Declare Function DefWindowProcW Lib "user32.dll" (ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Private Function GetCaption(ByRef oButton As Object) As String
        Const WM_GETTEXT = &HD&, WM_GETTEXTLENGTH = &HE&
        Dim Button_hWnd As Long
    
        On Error GoTo 1
        Button_hWnd = oButton.hWnd
        GetCaption = Space$(DefWindowProcW(Button_hWnd, WM_GETTEXTLENGTH, 0&, 0&))
        DefWindowProcW Button_hWnd, WM_GETTEXT, Len(GetCaption) + 1&, StrPtr(GetCaption)
    1   On Error GoTo 0
    End Function
    VB's Button controls (CommandButton, CheckBox or OptionButton) can actually contain Unicode captions (via DefWindowProcW + WM_SETTEXT). VB doesn't display them properly though.
    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. #13

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:04 AM.

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:06 AM.

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:09 AM.

  16. #16
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    3,130

    Re: CommonControlsEx (Replacement of the MS common controls)

    Thanks for including the StatusBar control!
    Last edited by Bonnie West; Mar 1st, 2013 at 03:52 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)

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:12 AM.

  18. #18

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Dec 15th, 2012 at 10:16 AM.

  19. #19

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.

  20. #20
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released.
    Thank you for consistent update.

  21. #21

  22. #22
    Lively Member
    Join Date
    Jun 2010
    Posts
    66

    Re: CommonControlsEx (Replacement of the MS common controls)

    its really an amazing work,god bless you.Bro can you add listview and treeview with displayable unicode support?
    it will great achievment if it possible

  23. #23
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Edited: Remove my Post regarding Balloon tooltips, Win8 has fixed the problem.
    Last edited by Jonney; Jan 26th, 2013 at 09:33 AM.

  24. #24
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Confirmed it is OS problem. The balloon tooltips works perfect on Win8.

    Edited: CommonControlsEx works On Win8.
    Last edited by Jonney; Jan 18th, 2013 at 01:32 AM.

  25. #25

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Update released.

    ListView control is added.

    Groups and 'Tile' View are for the moment not included.
    It can replace 100% the ListView from „MSCOMCTL.OCX". (Exception: ToolTipText of the ListSubItems)
    But it has also many properties, methods and events more than the original.
    Last edited by Krool; Feb 3rd, 2013 at 02:17 PM.

  26. #26
    Hyperactive Member
    Join Date
    Jan 2010
    Posts
    267

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Update released.

    ListView control is added.

    Groups and 'Tile' View are for the moment not included.
    It can replace 100% the ListView from „MSCOMCTL.OCX". (Exception: ToolTipText of the ListSubItems)
    But it has also many properties, methods and events more than the original.
    Thank you for additional Listview.
    From Vista/Win7,MS added lots of new features into Listview, such as enhanced grouping, Checkbox on Header,etc.
    Please consider adding checkbox and Text Edit for subitems.

  27. #27

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControlsEx (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    Please consider adding checkbox and Text Edit for subitems.
    The comctl32.dll does not provide the ability to edit the labels of the subitems.
    Last edited by Krool; Feb 6th, 2013 at 05:08 AM.

  28. #28

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    ImageList control is completly rewritten. (It is not compatible with the previous version)

    It works now like the original ImageList from MS but with some improvements, for example that the Style flag of the ListImages Draw method can be combined with multiples styles. (That was not possible in the original ImageList from MS) or that the Overlay function returns an icon instead of a bitmap or that the BackColor can be turned on or off (UseBackColor property).

  29. #29
    Lively Member
    Join Date
    Sep 2008
    Posts
    126

    Re: CommonControls (Replacement of the MS common controls)

    Awesome work! I am by far not knocking the work but asking a question.. Is the tab control text a little too far to the right?
    Last edited by brandoncampbell; Feb 26th, 2013 at 10:27 AM.

  30. #30

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by brandoncampbell View Post
    Is the tab control text a little too far to the right?
    I noticed that too. I think that is due to the new appearance of Windows 7.
    Last edited by Krool; Feb 27th, 2013 at 01:06 AM.

  31. #31
    Lively Member
    Join Date
    Sep 2008
    Posts
    126

    Re: CommonControls (Replacement of the MS common controls)

    I think it has something to do with Mnemonics if you don't put the _ before the text it looks fine.

  32. #32
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    4,627

    Re: CommonControls (Replacement of the MS common controls)

    I must say I'm truly impressed. Were I still using VB6, this would have been an incredible source of knowledge. I tended to write alot of my own controls(I still do in VB.Net) and I always want to learn as much as possible about creating them. I thought I had a good handle on it it but one glance at your source code, and even what you described about them being linked to ComCtl32.Dll showed me just how little I actually knew about control authoring in VB6. I tip my hat to you sir.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | Create Sortable BindingList(not mine) | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression


    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. -jmcilhinney

  33. #33

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    ImageCombo control is added.

    The biggest advantage is that you can set the style property. ('DropDownCombo', 'DropDownList' or 'SimpleCombo')
    That was not possible on the original ImageCombo control. (It was always as 'DropDownCombo')
    Also new is the 'ItemDrag' event, similar to the one used in the ListView control.

  34. #34
    Lively Member
    Join Date
    Sep 2008
    Posts
    126

    Re: CommonControls (Replacement of the MS common controls)

    Nice work dude
    Last edited by brandoncampbell; Mar 15th, 2013 at 02:01 PM.

  35. #35
    New Member
    Join Date
    Mar 2013
    Posts
    1

    Cool Re: CommonControls (Replacement of the MS common controls)

    Very, very good work. Many thanks to you. I do not like to link to Microsofts Ocx-files (Mscommctl.....). With your controls i don't need that. My exe work so without registrations on every PC. And: i can do more things. I can change the WM_PAINT - message to what i will. I can change the colors, i can add a picture, i can paint the control. I must only change your code a little bit. Awsome.
    Thank you very much!!!!!

  36. #36

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControls (Replacement of the MS common controls)

    Update released.
    Last edited by Krool; Apr 25th, 2013 at 03:02 PM.

  37. #37

    Thread Starter
    Addicted Member
    Join Date
    Jun 2012
    Posts
    179

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

  38. #38
    Member
    Join Date
    Mar 2012
    Posts
    45

    Re: CommonControls (Replacement of the MS common controls)

    Thank you for the work - it's a lovely change CommonControls.
    I have one problem, very often crashes when you compile an application (even an example), and the exe-file is created. And sometimes crashes when you press End in the course of the program.
    It would be nice if the progress bar for added display of progress on the taskbar. An example can be found here http://sourceforge.net/p/audica/code...skBarList3.cls

  39. #39
    Member
    Join Date
    Mar 2012
    Posts
    45

    Re: CommonControls (Replacement of the MS common controls)

    Also for the beautiful subsclassing commandbutton think it will be good to make changes if there is a caption and a picture, you have the image on the left and the caption to the left of the picture. So the picture will not be imposed on the text.

    Code:
    Private Sub DrawButton(ByVal hWnd As Long, ByVal hDC As Long, Button As Object)
    .....
    If Not Button.Caption = vbNullString Or Len(Button.Caption) > 0 Then
        Set ButtonFont = Button.Font
        FontOld = SelectObject(hDC, ButtonFont.hFont)
        RectText = RectClient
        DrawText hDC, StrPtr(Button.Caption), -1, RectText, DT_CALCRECT Or DT_WORDBREAK
        RectText.Right = RectClient.Right
        If ButtonPic Is Nothing Then
            RectText.Left = RectClient.Left
            RectText.Top = ((RectClient.Bottom - RectText.Bottom) / 2) + 3
            RectText.Bottom = RectText.Top + RectText.Bottom
        Else
            RectText.Left = CInt(Button.Parent.ScaleX(ButtonPic.Width, vbHimetric, vbPixels)) + 4
            'RectText.Top = RectClient.Top '(RectClient.Bottom - RectText.Bottom) + 1
            RectText.Top = (((RectClient.Bottom - RectClient.Top) - (RectText.Bottom - RectText.Top)) / 2) + RectClient.Top
            RectText.Bottom = RectClient.Bottom
        End If
        DrawThemeText Theme, hDC, 1, ButtonState, StrPtr(Button.Caption), -1, DT_CENTER Or DT_WORDBREAK, 0, RectText
        SelectObject hDC, FontOld
    End If
    CloseThemeData Theme
    If Not ButtonPic Is Nothing Then
        W = CInt(Button.Parent.ScaleX(ButtonPic.Width, vbHimetric, vbPixels))
        H = CInt(Button.Parent.ScaleY(ButtonPic.Height, vbHimetric, vbPixels))
        If Not Button.Caption = vbNullString Or Len(Button.Caption) > 0 Then
            X = RectClient.Left
            'Y = RectClient.Top ' + ((RectClient.Bottom - RectClient.Left - H) / 2)
            Y = (((RectClient.Bottom - RectClient.Top) - H) / 2) + RectClient.Top
        Else
            RectClient.Bottom = RectText.Top
            X = RectClient.Left + ((RectClient.Right - RectClient.Left - W) / 2)
            Y = RectClient.Top + ((RectClient.Bottom - RectClient.Left - H) / 2)
        End If
        If Enabled = True Then
            If Button.UseMaskColor = True Then
                Call DrawTransparentPicture(ButtonPic, hDC, X, Y, W, H, WinColor(Button.MaskColor))
            Else
                ButtonPic.Render hDC, X, Y + H, W, -H, 0, 0, ButtonPic.Width, ButtonPic.Height, ByVal 0
            End If
        Else
            Call DrawDisabledPicture(ButtonPic, hDC, X, Y, W, H, WinColor(Button.MaskColor))
        End If
    End If

  40. #40
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: CommonControls (Replacement of the MS common controls)

    sleeeeeeeeeeeeeek

Page 1 of 9 1234 ... 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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.