dcsimg
Page 3 of 61 FirstFirst 1234561353 ... LastLast
Results 81 to 120 of 2424

Thread: CommonControls (Replacement of the MS common controls)

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

    Re: CommonControls (Replacement of the MS common controls)

    A Transparent property can be added to CheckboxW and OptionboxW? And to complete the set, not enough of the control LabelW, also with options wrap and transparent
    At the moment I use similar control from the user Truong Van Hieu site PlanetSourceCode.

    Thank you, your set can now replace many of the old well-known sets of controls.

  2. #82
    New Member
    Join Date
    Mar 2013
    Posts
    3

    Re: CommonControls (Replacement of the MS common controls)

    Compiling the VBP project ends up with an error (343): object is no array (translated from german error description).
    in module: Common.bas
    in line 128: Index = Control.Index

    Any idea?

    Regards,
    ZZap

  3. #83

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by zzap View Post
    Compiling the VBP project ends up with an error (343): object is no array (translated from german error description).
    in module: Common.bas
    in line 128: Index = Control.Index

    Any idea?

    Regards,
    ZZap
    It is correct that the "Index = Control.Index" will make a error, whenever the control is not an array.
    But that is no problem as there is a "On Error Resume Next" line before the "Index = Control.Index" to prevent that the error will be raised.

  4. #84

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Updated released.

    All controls should be now truly unicode.

  5. #85
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    Anyway to fix the password in the textbox to reflect the later style password text with dots instead of asterisks?

  6. #86
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,057

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by brandoncampbell View Post
    Anyway to fix the password in the textbox to reflect the later style password text with dots instead of asterisks?
    Have you embedded a visual styles manifest to your exe? Is your IDE also visual styles enabled?
    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)

  7. #87
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Bonnie West View Post
    Have you embedded a visual styles manifest to your exe? Is your IDE also visual styles enabled?
    Yeah it has everything in to make the ellipses but it doesn't.

  8. #88

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by brandoncampbell View Post
    Anyway to fix the password in the textbox to reflect the later style password text with dots instead of asterisks?
    That will do it: (to be done at run-time, e.g. Form_Load event)
    Code:
    TextBoxW1.PasswordChar = ChrW(&H25CF)

  9. #89
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    So I did notice that some of the settings don't save when you compile. For instance if you change the password char to whatever and you click build it will not have a password char in the exe. If it is set through the form like you stated above it works ok.

  10. #90

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    This demo is showing of how to make the ToolBar accessible per shortcut key when it is placed on a MDIForm.
    It is a little bit more work as the MDIForm does not have a KeyDown event.
    Attached Files Attached Files
    Last edited by Krool; Oct 13th, 2019 at 12:25 PM.

  11. #91
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    This demo is showing of how to make the ToolBar accessible per shortcut key when it is placed on a MDIForm.
    It is a little bit more work as the MDIForm does not have a KeyDown event.
    Very useful code. Thanks.

    SetupVisualStyles Me doesn't work in MDIForm?
    Last edited by Jonney; Aug 16th, 2013 at 12:31 AM.

  12. #92

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Jonney View Post
    SetupVisualStyles Me doesn't work in MDIForm?
    I forgot to include the .res file in the demo that the visual styles will work.
    I have updated the demo. ToolBar control also updated with some improvements concerning the ImageList handling.
    Last edited by Krool; Aug 17th, 2013 at 11:45 AM.

  13. #93

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by brandoncampbell View Post
    For instance if you change the password char to whatever and you click build it will not have a password char in the exe. If it is set through the form like you stated above it works ok.
    The password char for dots "ChrW(&H25CF)" cannot be set at design time. (only at run time as stated above)
    I have therefore now included a "UseSystemPasswordChar" property to the TextBoxW control. When set to true then the control will be created with the style bit ES_PASSWORD and thus display asterisks or dots as password text automatically (depending on the comctl32 version) .

  14. #94
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    The password char for dots "ChrW(&H25CF)" cannot be set at design time. (only at run time as stated above)
    I have therefore now included a "UseSystemPasswordChar" property to the TextBoxW control. When set to true then the control will be created with the style bit ES_PASSWORD and thus display asterisks or dots as password text automatically (depending on the comctl32 version) .
    Awesome work as always! I still have an issue when compiling where it does not save the changed settings. If I open the project. Change the textbox at the bottom via properties to systempasschar and click compile. The progress bar goes as if it is compiling but once it reaches the end it refreshes the project and the settings don't stick. The exe does not reflect the change and the project in the ide changes back to default text.

  15. #95

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by brandoncampbell View Post
    Change the textbox at the bottom via properties to systempasschar and click compile.
    Did you try to close the Form first (WriteProperties will then run) before you compile?

  16. #96
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    Did you try to close the Form first (WriteProperties will then run) before you compile?
    Didn't know that.. it worked.. Thanks! Why does it need to be closed?

  17. #97
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Dear Krool, could you add to its control (OptionButtonW and CheckBoxW, CommandButtonW) parameter Transparent, to the BackColor property itself became equal to the parent. But it is also possible for the elements of a ProgressBar and CommandButtonW fix the appearance of unpainted parts, or as a backcolor, or add an option RoundCorner, to be able to make a rectangular controls, thereby remove the unfilled elements.
    Name:  ZU0L5KOh.png
Views: 4558
Size:  128.6 KB

  18. #98
    Addicted Member
    Join Date
    Sep 2008
    Posts
    136

    Re: CommonControls (Replacement of the MS common controls)

    Can someone tell me how to auto size columns based on items in listview?

  19. #99

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    could you add to its control (OptionButtonW and CheckBoxW, CommandButtonW) parameter Transparent, to the BackColor property itself became equal to the parent.
    You can set the BackColor property manually, so that it matches to the Parent's BackColor.
    For example in Form_Load event:

    Code:
    Private Sub Form_Load()
    CommandButtonW1.BackColor = Me.BackColor
    CheckBoxW1.BackColor = Me.BackColor
    OptionButtonW1.BackColor = Me.BackColor
    End Sub
    Quote Originally Posted by brandoncampbell View Post
    Can someone tell me how to auto size columns based on items in listview?
    Do following: (where Index is the column you want to auto size)

    Code:
    ListView1.ColumnHeaders(Index).AutoSize LvwColumnHeaderAutoSizeToItems
    Last edited by Krool; Sep 6th, 2013 at 03:22 PM.

  20. #100

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    could you add to its control (OptionButtonW and CheckBoxW, CommandButtonW) parameter Transparent
    Update released.

    Transparent property included to CheckBoxW, OptionButtonW and CommandButtonW.
    But it is not a real transparency. Each time when the underlying background may change you need to call .Refresh.
    In the new release there is also a demonstration of how to make the transparency work when a control (for e.g. CheckBoxW) is placed on a TabStrip control.

  21. #101

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

    Remake of the FrameW control. There should be no bugs anymore.

  22. #102
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    I use the control jcFrames from site planet-source-code.com (http://www.planet-source-code.com/vb...64261&lngWId=1), when I add your control LabelW, and after change property BackStyle = 0 (Transpapent), I see a small graphic bug on the element jcFrames. Tell me why this might be, and you can somehow fix it?
    I attach a test project where I showed this nuance
    Attached Files Attached Files

  23. #103
    New Member
    Join Date
    Oct 2013
    Posts
    1

    Re: CommonControls (Replacement of the MS common controls)

    Do you have plans on recreating the File Open/Save dialogs?

    [edit]

    Also, do you have plans on releasing a DLL version of the controls?
    Last edited by posfan12; Oct 10th, 2013 at 08:45 PM.

  24. #104

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    I use the control jcFrames from site planet-source-code.com (http://www.planet-source-code.com/vb...64261&lngWId=1), when I add your control LabelW, and after change property BackStyle = 0 (Transpapent), I see a small graphic bug on the element jcFrames. Tell me why this might be, and you can somehow fix it?
    I attach a test project where I showed this nuance
    You can fix that small graphic bug by including following at the end of the "PaintFrame" sub in the jcFrame control:
    Code:
    Private Sub PaintFrame()
    ' [...]
    Set UserControl.Picture = UserControl.Image
    End Sub
    Quote Originally Posted by posfan12 View Post
    Do you have plans on recreating the File Open/Save dialogs?
    I don't think that I will make a "CommonDialog" control as it can be replaced easily by some API calls. There are enough examples out there.

    Quote Originally Posted by posfan12 View Post
    Also, do you have plans on releasing a DLL version of the controls?
    Maybe I will provide some day such a converted project, as there are really some big advantages.
    However, you can convert this project to an ActiveX Control for yourself.
    Just ensure that you start a new ActiveX Control project from scratch instead of directly converting the CommonControls project. The classes need to be public and the enums located in the ComCtlsBase.bas need to be shifted to a public class. I have tested it and by this way I did not encounter any problems.
    Last edited by Krool; Oct 12th, 2013 at 12:23 PM.

  25. #105
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    You can fix that small graphic bug by including following at the end of the "PaintFrame" sub in the jcFrame control:
    Krool, Thanks for the tip

  26. #106
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,346

    Re: CommonControls (Replacement of the MS common controls)

    Is it possible to do the same thing with the Microsoft Hierarchical FlexGrid and the normal FlexGrid control?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  27. #107
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Control ComboBoxW for events, substitutes the previous value. For example, when you select an item from the list (Event Click), the value of the Text, is not for the selected item, and the previous item in the list.
    In native controller from the MS is not

  28. #108

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Nightwalker83 View Post
    Is it possible to do the same thing with the Microsoft Hierarchical FlexGrid and the normal FlexGrid control?
    I don't think that the FlexGrid control is a "common" control located in any Windows DLL. Therefore such a control need to be created from scratch.

    Quote Originally Posted by Romeo91 View Post
    Control ComboBoxW for events, substitutes the previous value. For example, when you select an item from the list (Event Click), the value of the Text, is not for the selected item, and the previous item in the list.
    In native controller from the MS is not
    Fixed. Thanks!

  29. #109
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Krool, you have in your kit use for string operation some slow Variant functions - Chr, ChrW, String, Mid, Left, Right, Format, Ucase, Replace, Dir and e.t.c . To increase the speed, i think it is necessary to replace them with their string equivalents function (Chr$, ChrW$, String$, Mid$, Left$, Right$, Format$, Ucase$, Replace$, Dir$). This has a positive impact on the speed of some of the elements.

  30. #110
    Addicted Member
    Join Date
    Jul 2006
    Posts
    148

    Re: CommonControls (Replacement of the MS common controls)

    Is there any way to get your demo running in VB5 ?

    Name:  vbforum.jpg
Views: 3965
Size:  38.0 KB

  31. #111

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by JohnTurnbull View Post
    Is there any way to get your demo running in VB5 ?
    I think it is not possible. For example in VB5 you cannot instantiate "new" property bags whereas this is possible in VB6 and I used that in some controls.

  32. #112
    Addicted Member
    Join Date
    Jul 2006
    Posts
    148

    Re: CommonControls (Replacement of the MS common controls)

    OK - Guess I'll start looking for a second hand VB6 (again!)

  33. #113

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Update released.

  34. #114
    Lively Member
    Join Date
    Mar 2012
    Posts
    68

    Re: CommonControls (Replacement of the MS common controls)

    Krool, please tell me how to handle the event RichTExtBox clicking the link above.
    Event found LinkEvent, but for some reason it does not work

    Also, In the example RTF, there is a small error
    Private Const MFS_DISABLED As Long = &H3
    Last edited by Romeo91; Nov 15th, 2013 at 02:01 AM.

  35. #115
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?

  36. #116

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,303

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Romeo91 View Post
    Event found LinkEvent, but for some reason it does not work
    Are you saying the LinkEvent never fires? Ensure that the AutoURLDetect property is set to true.

    Quote Originally Posted by Romeo91 View Post
    Also, In the example RTF, there is a small error
    Private Const MFS_DISABLED As Long = &H3
    What do you mean with small error? The Const value is correctly set to &H2.

    Quote Originally Posted by Jonney View Post
    Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?
    Do you mean "Insert/Resize/Delete/Positioning" by code?
    Last edited by Krool; Nov 15th, 2013 at 11:19 AM.

  37. #117
    Addicted Member
    Join Date
    Mar 2009
    Posts
    195

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    What do you mean with small error? The Const value is correctly set to &H2.
    Actually according to the MSDN site it should be &H3.. http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

  38. #118
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: CommonControls (Replacement of the MS common controls)

    Originally Posted by Jonney View Post
    Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?
    Do you mean "Insert/Resize/Delete/Positioning" by code?
    Yes,sir. How to manipulate pictures and tables in Richedit is a difficult part for ordinate VB programmer. I know my request is beyond the topic, but if you have something on hand, please make a simple demo. Thanks.

  39. #119
    Addicted Member
    Join Date
    Jul 2006
    Posts
    148

    Re: CommonControls (Replacement of the MS common controls)

    Got Myself a copy of VB6...

    Just wanted to say "Thank you soooooo much" - I've been wanting to add unicode support for years and never could!

  40. #120
    Frenzied Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    1,356

    Re: CommonControls (Replacement of the MS common controls)

    @Krool

    First off - great work, thanks for such a comprehensive project!

    Second - I have a need for a Unicode RichTextBox control, so I thought I give yours a try. Everything seems to be working pretty well except that if I host your RichTextBox control on another UserControl then the cursor keys don't seem to work any longer. Is there anything special I need to do to get them working on a UserControl, or is there a bug?

    Thanks again!

Page 3 of 61 FirstFirst 1234561353 ... 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