-
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.
-
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
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
zzap
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.
-
Re: CommonControls (Replacement of the MS common controls)
Updated released.
All controls should be now truly unicode.
-
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?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
brandoncampbell
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?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Bonnie West
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
brandoncampbell
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)
-
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.
-
2 Attachment(s)
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Jonney
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
brandoncampbell
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) .
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
brandoncampbell
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?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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?
-
1 Attachment(s)
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.
Attachment 104331
-
Re: CommonControls (Replacement of the MS common controls)
Can someone tell me how to auto size columns based on items in listview?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
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
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
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
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.
-
Re: CommonControls (Replacement of the MS common controls)
Update released.
Remake of the FrameW control. There should be no bugs anymore.
-
1 Attachment(s)
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
-
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?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
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
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
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.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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
-
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?
-
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
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Nightwalker83
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
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!
-
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.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Is there any way to get your demo running in VB5 ?
Attachment 106707
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
JohnTurnbull
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.
-
Re: CommonControls (Replacement of the MS common controls)
OK - Guess I'll start looking for a second hand VB6 (again!)
-
Re: CommonControls (Replacement of the MS common controls)
-
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
-
Re: CommonControls (Replacement of the MS common controls)
Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Romeo91
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
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
Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?
Do you mean "Insert/Resize/Delete/Positioning" by code?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
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
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by Jonney View Post
Can you please enhance Richedit to support pictures (Insert/Resize/Delete/Positioning) and editable table?
Quote:
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.
-
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!
-
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!