Advertisement

Results for "Author: option explicit"

5_2007-2008 #190948
OmniGradient v1.00 - Gradient generation and display module

Almost all the code in this module was written by one of the VB gurus on PSC, Carles P.V. His original submission can be found on PSC at txtCodeId=60580. In that submission he has two modules. One is for linear gradients that can be displayed at any angle, and the other is for circular gradients. My meager contributions to his excellence: - The linear and circular gradient generating routines have been merged into one routine that handles both gradient styles. - Linear gradients can be generated in a "middle-out" fashion - that is, from Color1 to Color2 back to Color1. Makes a nice 3D effect. - The code that actually displays the gradient has been removed from Carles' gradient generating routines and placed in a separate procedure. The reason for that is simple - speed. If you need to refresh the gradient background of a usercontrol often, why recalculate the background gradient information every time? Calculate it ONCE, cache it, and redraw it as needed with a simple PaintGradient call. A demo showing the module's capabilities is included. Feedback is welcome but if you wish to vote, please vote not for this but for Carles' submission at txtCodeId=60580. Thanks.

5_2007-2008 #190949
MorphRangeRoamer v1.02 - Hybrid UpDown/Slider Usercontrol

(03 Mar 2007 - Added .UD_SwapDirections property; see code for explanation) MorphRangeRoamer is a different type of VB6 usercontrol that attempts to overcome the range-handling limitations of the UpDown and Slider controls by seamlessly integrating them into one small-footprint control. The idea is to provide the large range-traversing capability of the Slider as well as the precision of the UpDown in one easy-to-use graphical component. That's the theory, anyway. :) If you have any bug reports or other constructive suggestions, feel free to leave feedback, and votes are always appreciated! Enjoy.

5_2007-2008 #190950
MorphBorder v1.00 - Gradient Border UserControl AND Class

(Added MorphBorder *Class* 09 Mar 2006) MorphBorder is a simple usercontrol that allows you to frame other controls with an attractive gradient border. Just drop it on the form, and point it to any control (intrinsic or usercontrol) that has the following exposed properties: .hDC, ScaleMode, ScaleHeight, ScaleWidth, and AutoRedraw. Also contains a class that does the same thing. I recommend the class although they should both work fine. See demo project for usage particulars. As always, constructive feedback welcome, votes appreciated.

5_2007-2008 #190951
MorphDisplay v1.11 - LED / LCD Digital Display Control

(29 Apr 2007 - Minor tweaks; removed MatrixDisplay control for later repost) An ownerdrawn digital display usercontrol that uses shaped regions to form hexagonal, trapezoidal or rectangular LED/LCD digit segments. Control can be used for calculator displays, displaying time, or as a simple counter. Just about every conceivable aspect of this control can be customized via a multitude of properties. Main and exponent digits are separately configurable. Properties for segment height and width, intersegment gap, and interdigit gap allow you to size, position and space digits exactly the way you want. Support for thousands and decimal separators. Thousands and decimal separators can be defined as a comma or period so that international standards can be maintained. Thousands grouping can also be adjusted according to international preference. Background can be gradient or bitmap. Background bitmap can be tiled or stretched. All colors are also fully user-definable. Negative numbers can be displayed in a different color than positive. Digit segments can have a 3D gradient added to them if desired. Corners can be individually rounded for a different look. A simulated digit burn-in display mode is also available if desired. A Filament option allows digits to be displayed as wireframed, rather than solid. Exponent display can be disabled if you wish to use this as a simple counter. Six basic themes are included that show various display styles. Since there's ~40 properties that make up one theme, it is a very good idea to make a theme out of a combination of properties that works well in a particular application. Inspired by LaVolpe's "Shaped Regions" project at txtCodeId=58562. As always, constructive feedback is welcome, and votes are always appreciated.

5_2007-2008 #190952
MorphListBox 1.21 - Graphical Listbox UserControl

(Added .Sort method) A purely graphical replacement/enhancement for the VB single-column listbox control. Standard vertical listbox behavior is consistently emulated, with the exception of a couple intricacies of list item selection in .MultiSelect = Extended mode. Control features an integrated graphical vertical scrollbar. Custom .FindIndex and .MouseOverIndex methods. Background can be a gradient or bitmap. Small bitmaps can be tiled or stretched to fit the display area. Each listitem can have an associated icon displayed next to it. Eight gradient color schemes can be selected via the .Theme property. Unicode display supported. Drag and drop capability incorporated. Numeric list sorting option. .DisplayFrom method allows you to display any part of the list through code. .RightToLeft allows smooth, natural operation for those whose written language goes from right to left. Loads lists several times faster than traditional VB listbox, depending on your system. Due to size of control, this is best used as a compiled .OCX. As always, constructive feedback welcome, votes appreciated.

5_2007-2008 #190953
Pixel Code Generator

This small, almost totally useless project scans all the pixels in a bitmap stored in a picturebox and generates SetPixelV code to replicate that bitmap. Automatically generates For loop code if enough consecutive pixels are identical to exceed a FORLOOP_THRESHOLD value. Generated code is written to the clipboard for pasting into other projects. Why did I do something so useless, you ask? Well, as many of you know, my hobby at PSC is inflicting usercontrols on you. I prefer things like checkmarks for checkboxes drawn by code as opposed to being stored in imagelists or the like. I don't like dependencies of any kind in controls. So, I draw them using LineTo or SetPixelV. The problem is, I can't even draw a stick figure. I see these nice custom checkmarks in web sites and I couldn't replicate them, so I wrote this. As far as I know checkmarks aren't copyrighted, so hopefully this wouldn't be considered stealing! To use, just use your favorite screen grabber to grab the checkmark or whatever, then MS Paint or whatever to save just the area you want to disk. (You may want to edit colors, or resize, or some such.) Place this bitmap in Picture1 and run the program. Stop the program, and paste the newly generated code into the "Redraw" sub. Run again and click the button under Picture2. Voila! You can tweak the code to take out parts you don't want fairly easily. Only try this with SMALL (32x32 size or less) bitmaps. I tried with larger bitmaps and while the code generates properly, the code for even a smaller photgraph can easily exceed 10,000 lines. A VB procedure can't be larger than 64K. I included a small calculator icon example with the code already loaded into the Redraw routine to get you started. I wouldn't even use this for something the size of the calculator icon but did it just to give you the idea. I'm sure this could be optimized (especially the string concatenation) but it runs great on small bitmaps and I'm not going to endlessly tweak this. Let the flames begin :-)

5_2007-2008 #190954
MorphPicViewer v1.01 - Large Image Navigation Usercontrol

(24 Mar 2007 - Added .ColorAtCursor property) I've seen a lot of projects on PSC for scrolling large images and with the exception of Carles P.V.'s excellent submission at txtCodeId=30414, they all seem to involve slapping a couple of scrollbars on a VB PictureBox. Navigating large images by fumbling with scrollbars is very awkward, for me anyway. So just for fun (I have no use for this) I cooked up this little beastie. Its ClickNavigation feature provides a much faster [is 'instantly' fast enough for you? ;)], more natural way to navigate large images than anything I've seen so far on PSC. Features include: - Image display in either Normal or Stretched (display-to-fit) modes. - Aspect ratio may be optionally maintained in Stretched viewing mode. - Two image navigation modes are available for viewing large images - ClickNavigation and DragNavigation. ClickNavigation is a unique feature that displays entire image when the Ctrl key is held down, maintaining aspect ratio if mandated by the .KeepAspectRatio property. A rectangle outlines the portion of the image that's currently being displayed in Normal mode. Clicking on the image moves the rectangle, and when Normal view is reestablished by releasing Ctrl, the view is changed to the new coordinates. DragNavigation (which Carles features in his submission also) allows user to simply drag the image around in Normal mode until the desired area is in view. - Any portion of image can also be displayed via code using the .DisplayImage method, supplying the X and Y coordinates of the upper left hand corner of the image portion you wish to display. - Control can be used as a simple PictureBox replacement; image navigation can be disabled for straightforward image display (although image stretching and aspect ratio features are always available). Control is also a container as is the standard VB PictureBox. As always, constructive feedback is always welcome, and votes are always appreciated.

6_2008-2009 #213464
MorphTextBox (UNICODE BETA) - Ownerdrawn Single Line TextBox Control

(14 Apr 2007 - Added Unicode Beta code from Pietro Cecchi) A totally owner-drawn usercontrol that provides most of the functionality of VB's single-line textbox. It allows you to set the background as a gradient or a picture. Text color and selection color are also customizable. All the usual stuff is here - PasswordChar, Locked, etc. I have tried to emulate standard textbox keyboard and mouse control as closely as possible, but have not gone bonkers trying to exactly emulate everything. My point was to make a suitable replacement, one that can be used in place of the boring VB textbox. This is version 1, so I'm expecting that you'll find things that need fixed or improved. Known issues listed in source. Comments and votes welcome.

6_2008-2009 #213465
MorphOptionCheck 2.22 - Combo OptionButton/CheckBox UserControl

MorphOptionCheck is a subclassed, ownerdrawn usercontrol that combines the functionality of VB's OptionButton and CheckBox controls. Uses version 2.1 of Paul Caton's self-sub usercontrol code. Unicode supported. Background and border of control may be rendered transparent. A much-improved version of a control I had posted on PSC for a short time about a year ago. As always, constructive comments welcome, votes appreciated. ----------------------11 April 2006 - Added icon display capability, you can now use icons in place of standard checkboxes. Rearranged and tightened up code, added property to allow you to not display focus rectangle, and added code to allow you to see changes as you are making them in design mode. Added property descriptions in IDE property window.

6_2008-2009 #213466
OmniGradient v1.00 - Gradient generation and display module

Almost all the code in this module was written by one of the VB gurus on PSC, Carles P.V. His original submission can be found on PSC at txtCodeId=60580. In that submission he has two modules. One is for linear gradients that can be displayed at any angle, and the other is for circular gradients. My meager contributions to his excellence: - The linear and circular gradient generating routines have been merged into one routine that handles both gradient styles. - Linear gradients can be generated in a "middle-out" fashion - that is, from Color1 to Color2 back to Color1. Makes a nice 3D effect. - The code that actually displays the gradient has been removed from Carles' gradient generating routines and placed in a separate procedure. The reason for that is simple - speed. If you need to refresh the gradient background of a usercontrol often, why recalculate the background gradient information every time? Calculate it ONCE, cache it, and redraw it as needed with a simple PaintGradient call. A demo showing the module's capabilities is included. Feedback is welcome but if you wish to vote, please vote not for this but for Carles' submission at txtCodeId=60580. Thanks.

6_2008-2009 #213467
MorphRangeRoamer v1.02 - Hybrid UpDown/Slider Usercontrol

(03 Mar 2007 - Added .UD_SwapDirections property; see code for explanation) MorphRangeRoamer is a different type of VB6 usercontrol that attempts to overcome the range-handling limitations of the UpDown and Slider controls by seamlessly integrating them into one small-footprint control. The idea is to provide the large range-traversing capability of the Slider as well as the precision of the UpDown in one easy-to-use graphical component. That's the theory, anyway. :) If you have any bug reports or other constructive suggestions, feel free to leave feedback, and votes are always appreciated! Enjoy.

6_2008-2009 #213468
MorphBorder v1.00 - Gradient Border UserControl AND Class

(Added MorphBorder *Class* 09 Mar 2006) MorphBorder is a simple usercontrol that allows you to frame other controls with an attractive gradient border. Just drop it on the form, and point it to any control (intrinsic or usercontrol) that has the following exposed properties: .hDC, ScaleMode, ScaleHeight, ScaleWidth, and AutoRedraw. Also contains a class that does the same thing. I recommend the class although they should both work fine. See demo project for usage particulars. As always, constructive feedback welcome, votes appreciated.

6_2008-2009 #213469
MorphDisplay v1.11 - LED / LCD Digital Display Control

(29 Apr 2007 - Minor tweaks; removed MatrixDisplay control for later repost) An ownerdrawn digital display usercontrol that uses shaped regions to form hexagonal, trapezoidal or rectangular LED/LCD digit segments. Control can be used for calculator displays, displaying time, or as a simple counter. Just about every conceivable aspect of this control can be customized via a multitude of properties. Main and exponent digits are separately configurable. Properties for segment height and width, intersegment gap, and interdigit gap allow you to size, position and space digits exactly the way you want. Support for thousands and decimal separators. Thousands and decimal separators can be defined as a comma or period so that international standards can be maintained. Thousands grouping can also be adjusted according to international preference. Background can be gradient or bitmap. Background bitmap can be tiled or stretched. All colors are also fully user-definable. Negative numbers can be displayed in a different color than positive. Digit segments can have a 3D gradient added to them if desired. Corners can be individually rounded for a different look. A simulated digit burn-in display mode is also available if desired. A Filament option allows digits to be displayed as wireframed, rather than solid. Exponent display can be disabled if you wish to use this as a simple counter. Six basic themes are included that show various display styles. Since there's ~40 properties that make up one theme, it is a very good idea to make a theme out of a combination of properties that works well in a particular application. Inspired by LaVolpe's "Shaped Regions" project at txtCodeId=58562. As always, constructive feedback is welcome, and votes are always appreciated.

6_2008-2009 #213470
MorphListBox 1.21 - Graphical Listbox UserControl

(Added .Sort method) A purely graphical replacement/enhancement for the VB single-column listbox control. Standard vertical listbox behavior is consistently emulated, with the exception of a couple intricacies of list item selection in .MultiSelect = Extended mode. Control features an integrated graphical vertical scrollbar. Custom .FindIndex and .MouseOverIndex methods. Background can be a gradient or bitmap. Small bitmaps can be tiled or stretched to fit the display area. Each listitem can have an associated icon displayed next to it. Eight gradient color schemes can be selected via the .Theme property. Unicode display supported. Drag and drop capability incorporated. Numeric list sorting option. .DisplayFrom method allows you to display any part of the list through code. .RightToLeft allows smooth, natural operation for those whose written language goes from right to left. Loads lists several times faster than traditional VB listbox, depending on your system. Due to size of control, this is best used as a compiled .OCX. As always, constructive feedback welcome, votes appreciated.

6_2008-2009 #213471
Pixel Code Generator

This small, almost totally useless project scans all the pixels in a bitmap stored in a picturebox and generates SetPixelV code to replicate that bitmap. Automatically generates For loop code if enough consecutive pixels are identical to exceed a FORLOOP_THRESHOLD value. Generated code is written to the clipboard for pasting into other projects. Why did I do something so useless, you ask? Well, as many of you know, my hobby at PSC is inflicting usercontrols on you. I prefer things like checkmarks for checkboxes drawn by code as opposed to being stored in imagelists or the like. I don't like dependencies of any kind in controls. So, I draw them using LineTo or SetPixelV. The problem is, I can't even draw a stick figure. I see these nice custom checkmarks in web sites and I couldn't replicate them, so I wrote this. As far as I know checkmarks aren't copyrighted, so hopefully this wouldn't be considered stealing! To use, just use your favorite screen grabber to grab the checkmark or whatever, then MS Paint or whatever to save just the area you want to disk. (You may want to edit colors, or resize, or some such.) Place this bitmap in Picture1 and run the program. Stop the program, and paste the newly generated code into the "Redraw" sub. Run again and click the button under Picture2. Voila! You can tweak the code to take out parts you don't want fairly easily. Only try this with SMALL (32x32 size or less) bitmaps. I tried with larger bitmaps and while the code generates properly, the code for even a smaller photgraph can easily exceed 10,000 lines. A VB procedure can't be larger than 64K. I included a small calculator icon example with the code already loaded into the Redraw routine to get you started. I wouldn't even use this for something the size of the calculator icon but did it just to give you the idea. I'm sure this could be optimized (especially the string concatenation) but it runs great on small bitmaps and I'm not going to endlessly tweak this. Let the flames begin :-)

6_2008-2009 #213472
MorphPicViewer v1.01 - Large Image Navigation Usercontrol

(24 Mar 2007 - Added .ColorAtCursor property) I've seen a lot of projects on PSC for scrolling large images and with the exception of Carles P.V.'s excellent submission at txtCodeId=30414, they all seem to involve slapping a couple of scrollbars on a VB PictureBox. Navigating large images by fumbling with scrollbars is very awkward, for me anyway. So just for fun (I have no use for this) I cooked up this little beastie. Its ClickNavigation feature provides a much faster [is 'instantly' fast enough for you? ;)], more natural way to navigate large images than anything I've seen so far on PSC. Features include: - Image display in either Normal or Stretched (display-to-fit) modes. - Aspect ratio may be optionally maintained in Stretched viewing mode. - Two image navigation modes are available for viewing large images - ClickNavigation and DragNavigation. ClickNavigation is a unique feature that displays entire image when the Ctrl key is held down, maintaining aspect ratio if mandated by the .KeepAspectRatio property. A rectangle outlines the portion of the image that's currently being displayed in Normal mode. Clicking on the image moves the rectangle, and when Normal view is reestablished by releasing Ctrl, the view is changed to the new coordinates. DragNavigation (which Carles features in his submission also) allows user to simply drag the image around in Normal mode until the desired area is in view. - Any portion of image can also be displayed via code using the .DisplayImage method, supplying the X and Y coordinates of the upper left hand corner of the image portion you wish to display. - Control can be used as a simple PictureBox replacement; image navigation can be disabled for straightforward image display (although image stretching and aspect ratio features are always available). Control is also a container as is the standard VB PictureBox. As always, constructive feedback is always welcome, and votes are always appreciated.

7_2009-2012 #235982
MorphTextBox (UNICODE BETA) - Ownerdrawn Single Line TextBox Control

(14 Apr 2007 - Added Unicode Beta code from Pietro Cecchi) A totally owner-drawn usercontrol that provides most of the functionality of VB's single-line textbox. It allows you to set the background as a gradient or a picture. Text color and selection color are also customizable. All the usual stuff is here - PasswordChar, Locked, etc. I have tried to emulate standard textbox keyboard and mouse control as closely as possible, but have not gone bonkers trying to exactly emulate everything. My point was to make a suitable replacement, one that can be used in place of the boring VB textbox. This is version 1, so I'm expecting that you'll find things that need fixed or improved. Known issues listed in source. Comments and votes welcome.

7_2009-2012 #235983
MorphOptionCheck 2.22 - Combo OptionButton/CheckBox UserControl

MorphOptionCheck is a subclassed, ownerdrawn usercontrol that combines the functionality of VB's OptionButton and CheckBox controls. Uses version 2.1 of Paul Caton's self-sub usercontrol code. Unicode supported. Background and border of control may be rendered transparent. A much-improved version of a control I had posted on PSC for a short time about a year ago. As always, constructive comments welcome, votes appreciated. ----------------------11 April 2006 - Added icon display capability, you can now use icons in place of standard checkboxes. Rearranged and tightened up code, added property to allow you to not display focus rectangle, and added code to allow you to see changes as you are making them in design mode. Added property descriptions in IDE property window.

7_2009-2012 #235984
OmniGradient v1.00 - Gradient generation and display module

Almost all the code in this module was written by one of the VB gurus on PSC, Carles P.V. His original submission can be found on PSC at txtCodeId=60580. In that submission he has two modules. One is for linear gradients that can be displayed at any angle, and the other is for circular gradients. My meager contributions to his excellence: - The linear and circular gradient generating routines have been merged into one routine that handles both gradient styles. - Linear gradients can be generated in a "middle-out" fashion - that is, from Color1 to Color2 back to Color1. Makes a nice 3D effect. - The code that actually displays the gradient has been removed from Carles' gradient generating routines and placed in a separate procedure. The reason for that is simple - speed. If you need to refresh the gradient background of a usercontrol often, why recalculate the background gradient information every time? Calculate it ONCE, cache it, and redraw it as needed with a simple PaintGradient call. A demo showing the module's capabilities is included. Feedback is welcome but if you wish to vote, please vote not for this but for Carles' submission at txtCodeId=60580. Thanks.

7_2009-2012 #235985
MorphRangeRoamer v1.02 - Hybrid UpDown/Slider Usercontrol

(03 Mar 2007 - Added .UD_SwapDirections property; see code for explanation) MorphRangeRoamer is a different type of VB6 usercontrol that attempts to overcome the range-handling limitations of the UpDown and Slider controls by seamlessly integrating them into one small-footprint control. The idea is to provide the large range-traversing capability of the Slider as well as the precision of the UpDown in one easy-to-use graphical component. That's the theory, anyway. :) If you have any bug reports or other constructive suggestions, feel free to leave feedback, and votes are always appreciated! Enjoy.

Languages
Top Categories
Global Discovery