Here are 16 VERY customizable graphical usercontrols (XP style by default). NO dependencies needed !! Each usercontrol is self-subclassed using ASM code !! Unicod support. Include vkCommand (the same that the XP one + icon, 6 different styles by default !), vkListBox (it is a very fast (4 seconds to add 100000 items !) "one-column-listview" with checkboxes, icons, different style for EACH item !, FileList, FolderList and DriveList options...), vkVScroll & vkHScroll (very customizable scroll with a high range : +- 4.10^14 !!), vkUpDown, vkToggleButton (vkCommand with the Value property), vkFrame (high customizable Frame with gradients, icon...), vkProgressBar (high number of properties !!), vkCheck (with transparency), vkOption (with transparency and auto-Group option wich automatically manage groups in different containers), vkLabel (border), vkScrollContainer (a vkFrame-like container with scrolls) and vkTextBox (a usercontrol based on a vbTextBox, but with new Scrolls, Legend zone, line numbers, new methods and properties... There are still some bugs concerning TextBox'HScroll). The three last controls are not really graphical usercontrols : vkTimer (new timer with APIs), vkMouseKeyEvents (wich allows to use ALL MISSING EVENTS (MouseLeave, MouseEnter, MiddleClick...) to ALL OF YOUR OWN usercontrols wich have hWnd properties !) and vkSysTray (allows to easily add multiples icons to the SysTray, manage to re-display the icons if explore.exe crashes by hooking 'TaskbarCreated' message !). There are still some little bugs in scrolls of vkListBox and vkTextBox, but sure you will enjoy this code !! Please vote for me ! (and sorry for my english : I'm french ^^).---------------UPDATE 5 JUNE : Now there is a clean package (just launch *.vbg project), high optimisations (when controls are loaded), lots of bugs fixed, new example...etc.---------------UPDATE 11 JUNE : Added two news controls (vkTextBox, vkSysTray), fixed bugs (black controls on W2K), new properties and methods.---------------UPDATE 17 JUNE : Added one new contol (vkScrollContainer), new properties (Pattern for ListBox, 6 default styles for vkCommand and vkToggleButton and some more), fixed some bugs, new example.---------------UPDATE 19 June : Fixed a LOT of bugs + added new properties (MouseHoverIcon...) + added Unicode support + now you can use shortcuts (with '&') + performance optimizations. There are still 2 major bugs : HScroll in vkTextBox and a blank area on the bottom of a vkListBox when VScroll.Value=VScroll.Max. I hope I'll fix it in the next update ;)
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
Re-scan downloaded files using your personal virus checker before using it.
NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
Terms of Agreement:
By using this code, you agree to the following terms...
You may use
this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this code from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
How to test the project : 1) Launch vkUserControlsXP.vbp AND ADD clsFile.cls (ctrl+D) wich is located in OCX directory (clsFile.cls won't be loaded when you open the project, sorry for that) and compile the ocx 2) registrer the ocx 3) You can test it ! I will update regularely the code to fix bugs. Next update I will upload a package wich is easiest to test and without any bad reference. Thx ;) (If this comment was disrespectful, please report it.)
Salut Alain! Looks all very good, but your file "clsFile.cls" in ..\..\..\..\..\Documents and Settings\Admin\Bureau\12 OCX stylés XP\OCX is missing. Plz check your vbp files before uploading ;-) Regards LiTe (If this comment was disrespectful, please report it.)
@enmity : 1) yeah, I know, sorry for that... 2) next update the package will be clean ;) 3) yeah, vkBar is not the best one (it uses 5 pictureboxes, I'll change it soon) but other controls do not use labels or other contols (except an Image, a light control, which contain bitmap). Timers are only used in Scroll/UpDown when you let your mouse down. But you're right, I should not use it. Thx for the comments, I'll update it soon ;) (If this comment was disrespectful, please report it.)
I'm using W2K and half the controls didn't paint, were just black, till I moved the mouse over them.
- More importantly - you've assumed everyone uses small fonts. If you go to your dispay properties dialogue / advanced button and you'll see a drop down saying small fonts/large fonts other. Try your controls in large fonts. (If this comment was disrespectful, please report it.)
command button, vkhscroll, vktogglebutton, vkvscroll, vkupdown don't paint till the mouse is moved over. commented out that line for the command button and it didnt' make any difference. You're vkbar doesn't paint at all.
They are all black in the IDE as well. (If this comment was disrespectful, please report it.)
Nice work! I have tried it in WinXP SP2 and it works good. No bugs find. So far so good, and five globes from me for your big effort. Keep up the good work, especially with another control (StatusBar, ListView, TreeView, etc). ;-) (If this comment was disrespectful, please report it.)
Couldn't run previous downloads = not impressed. The Launch ME worked perfectly = Happy AND much impressed by what I've seen. End result as well as the clear and well commented code. Thanks for this pearl. 5/5
(If this comment was disrespectful, please report it.)
I think the scrollbar in listbox work not well due to: - the thumb wont change size when number of item increase/decrease - When you drag the thumb down to the last item, the listbox is blank (it should be the last page appear)
If possible, you can add Unicode enabled feature to all this control (refer to other unicode controls here in PSC).
And, please change all comments in to english so anyone can understand the code.
Thanks for great stuff! (If this comment was disrespectful, please report it.)
Every control seems to be 100% accurate technically.Since some problems remaining black can be easily removed so you should't be blamed for that. I think this is one of the best submission on PSC. GREAT JOB DONE! Thanks for sharing....... (If this comment was disrespectful, please report it.)
There is some problem with CheckBox. It's not only when it's used as CheckBox, I faced it for CheckBox in List, too. When the Checkbox (and Radio button, too) placed on Form and it does not have focus, then if I click on the Caption text of these controls, control does not toggle its state. Moreover, I observed that control even does not get focus when I click on the Caption text of these control in not-in-focus state. In case of Checkbox in List, if I double click the List item, I expected the Check box to toggle its state, it didn't happen that way. Am I missing something? If no then please consider these issues as Bugs. Let me know if you fail to reproduce the issues I mentioned above at your end. I haven't seen the code yet, I will try my best to locate the cause of these issues, too. Thanks for sharing your quality code. (If this comment was disrespectful, please report it.)
FYI: The compiled control size (1.5MB) was reduced to just 255KB by UPX without any compromise on performance. For using this control in redistributable applications, I think it's better to pass it to UPX before preparing Production stage version of application! ;-) (If this comment was disrespectful, please report it.)
you're right, the Checkbox in vkListBox should toggle its state if you double click on an item. I'll fix it in the new version.
Concerning ChekBoxes and OptionButtons, in fact it is not really a bug, but I know it. The controls can take focus if you click on the caption, but there is a condition : if the BackStyle is not transparent, then there isn't any problem. But if the BackStyle is transparent, you have to click exactly on the caption (not between the letters, but exactly on a colored pixel of the caption). I know it's a problem, but as the area between the letters are not part of the control (it is because of the transparent BackStyle), if you click on it, it is not the control wich take focus.
Thanks. (If this comment was disrespectful, please report it.)
Here is a new update : I've fixed some bugs, I've added some functions and now you can write Unicode chars in all vkControls (except .Text property of vkTextBox) ^^ (If this comment was disrespectful, please report it.)
Very nice, especially like the flexibility of the vkListBox control, but found one small problem, if you add items and use the bar to scroll down (instead of arrow) you can go past the end of the list and looks empty.
Keep up the great work!!! (If this comment was disrespectful, please report it.)
Ed Wilk ==> Yes I know, and I've managed to fix this bug just after I updated this source, so it will be OK in the next update !
Daniel S ==> Yes, the scolls' gestion in vkTextBox isn't perfect, there are still some bugs and I'll try do fix it as soon as possible. Thanks for reporting.
hai2hai ==> Thanks !
Heriberto Mantilla Santamaria ==> - "run slow" : yes, but if you compile the vkUserControlsXP.vbp project and use my controls with a compiled OCX, it won't be so slow. And the test form contains a lot of controls... - "some bugs still" : please tell me wich one if you want I fix it ! ;)
Thanks to all ^^ (If this comment was disrespectful, please report it.)
Your controls seems to be good but I have problem with VB6 - Win 98 An unexpected error raise on line Set Me.Picture = .ReadProperty("Picture", Nothing) in vkFrame ctl.
Salut VIOLENT KEN je te lis également sur VB FRANCE. Je te posais la question car j'ai un problème sur vkFrame.ctl j'ai une erreur 50003 "erreur inattendue" sur la ligne ci-dessus lorsque je veux exécuter ton prog. je suis sur Win 98 merci
(If this comment was disrespectful, please report it.)
Ken, thanks for the reply. What I mean is to automatically use the current theme in windows. It is nice to have the ability to skin your app to what you want it to, but a lot of users like to have the applications use the theme used by the operating system. So my comment is really not to do the style of XP but to use whatever XP is using for themes. (If this comment was disrespectful, please report it.)
Hi there, Tanks for your great effort - looks very impresive. I can not get the class module cPrinTvw to work properly, was it possible for you to mail me a short example using this module ? Thanks in advance. Jorgen (If this comment was disrespectful, please report it.)
Thanks for the code..but when i install my application (designed using this control)on Windows Vista, it shows that the VkUSercontrolsXP.ocx is not correctly registered or a file is missing...can you describe it? Is it not supported to Vista?
please help me i want to run my appliaction on VISTA also..!
mail me at firstname.lastname@example.org Thakns & Regards! (If this comment was disrespectful, please report it.)
I wanted to use just chekbox and optionbutton seperately in a single custom control, adjusted the code for this and it was seem that was workking well, but when i closed the running application on close button the VB IDE is crashed, why is this happining? (If this comment was disrespectful, please report it.)
5 from me too, excellent code. By the way, I have found a bug with the vkCommand. I noticed it when a I used a vkCommand as an open button (call a CommonDialog.ShowOpen method). If it happens and your mouse falls over the vkCommand after you selected the file the Click event is called a second time. (If this comment was disrespectful, please report it.)
Some really nice looking controls. I'm very impressed.
I'm wanting to add some side bar functionallity to the text box with the logo on the left side, such that when you click on the logo the text box slides out and when you click the logo the text box slides in again. 9/10 score from me. Fantastic. (If this comment was disrespectful, please report it.)
Hi, This piece of work is under GNU LGPL (Lesser General Public License) 2.0. So you can use it as you wish if you respect the terms of the GNU LGPL 2.0 (see license.txt for details). (If this comment was disrespectful, please report it.)
Great component,Thank you very much. How can I combine vkDown and vkTxet to create a new control like NumericUpdown ,I try to use many mothod but alway fail (If this comment was disrespectful, please report it.)
awesome code, although i get the feeling that most people are here to copy code, not learn from it.. c'mon guys, ctrl+f is "find" , so find what you're looking for in the code and trace it back to your problem. at least figure out what line is giving you trouble.. (If this comment was disrespectful, please report it.)
it is very good control and highly appreciated the work , but I have small request for the frame and container back style,one more option has to be added transparent without control transparent (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular code, please
click here instead.)