Results for "Category: Custom Controls/ Forms/ Menus"
To automatically resize an image control in a frame control to view at an acceptable size. The full image is on screen even if the image is bigger than the screen.
Displays a basic analog clock on a form. CREDIT FOR THE ORIGINAL CODE GOES TO: Boriza I enjoyed his code so much I had to add a couple of quick improvements. Incrementally uncomment the code lines in the Form_Load event for different clock positions on the form.
This code gives the "enter" key the same functionality as the "tab" key in a vb form. When the user presses the "enter" key, it moves the focus to the next control, based on the tab index order. Don't forget to set the KeyPreview property of the form to True. (My thanks to Pennington. His TabToEnter2 code laid the foundation for this code.)
Demonstrates basic fuctions such as Add, Remove & Clear; but also some advanced funtions that use API tricks to find the index value for a string (or partial string); change an item in the list without knowing the index value in advance; and display a tooltip containing the complete name for items too wide to fit in the visible box (and only those items! Even checks for the existence of a scrollbar on the listbox). The comments in Instructions.bas will walk you though all the functions, and the code is heavily commented for the novice.
Centers a form in the part of your desktop not taken up by the taskbar or other system toolbars. If toolbars take up half the screen, no problem. If they are on the sides or the top, no problem.
Routines to convert between Hue-Saturation-Luminescence values an Red-Green-Blue color values (Converted from C++). Also several unique routines using these functions to manipulate color such as Brighten, Invert, PhotoNegative, Blend, Tint, etc. ***NOTE: I have reposted this with the original sorce (now complete). I am working on and will soon submit this in class form, once comments are added to the source.***
Access-like AutoComplete of a dropdown combobox or a simple combo box based on what's already in the list. Simple code but can handle backspace and delete and will finish the 'complete' on Enter keystroke or lost focus. Could easily be converted to a user control.
A circular progress bar/meter usercontrol with the following features: -- Solid color, fading colid color, or gradient blend -- One-, two- or three-color options -- Full-circle or arc of any size from 45 to 359 degrees -- Display value as a colored arc, a 'needle', or both -- Five styles of 'ticks' around edge, spaced however you want -- Display value as number or percentage--any font, color, and position! -- Customizable text shadow, too! -- Change background colors or use AutoMask to make background transparent -- Use custom picture backgrounds and mask pictures for transparency -- Show/hide border, change width -- Show/hide start line when value is zero -- Start at any angle (offset) -- Clockwise or Counter-Clockwise movement -- Change min/max values -- Fully scalable Also demonstrates various API graphics calls, getting the true color of a system color, use of mask color, using custom Enums for user control properties, scaling pictures and masks, and more. See screenshot: -- Large circle ('78') demonstrates a tricolor gradient, text with shadow, and dot-style ticks -- Wide control at top ('64') demonstrates tri-color fade, a 180-degree arc, hollow-dot ticks, needle, inset control border, and the flexibility of text positioning -- Large PSI gauge at right demonstrates custom picture & mask picture -- 'Fuel Gauge' demonstrates custom picture and value as percent -- Quarter circle ('53') at lower-left demonstrates 90 degree arc, box ticks, a bi-color fade, counter-clockwise motion, automask (it doesn't overlap the large meter) and custom shadow placement -- 'Wooden' meter near bottom demonstrates a 140-degree arc, offset angle, and custom picture as full background -- Black meter near bottom demonstrates border and line-style ticks with no background, and the effect of a tri-color fade where the start- and midcolors are the same (white) and the end color is different (red) -- Pink meter ('42') in center demonstrates the Automask by overlapping it's neighbors, and a tricolor fade where the start and end colors are the same but the midcolor differs. -- The reddish meter near the bottom ('65') demonstrates blends using system colors (in this case from ButtonFace to Highlight with ActiveTitleBar color as needle) -- Tiny meter inside PSI gauge demonstrates another use of Automask Enjoy! I welcome all comments, and please vote if you liked it or learned from it! Thanks! (UPDATED 3/24/2004: Fixed 'gap' on very small meters at some resolutions, Removed bug that caused crash when properties do not reload properly in IDE)
Alphanumeric LCD Control with multiple foreground and background colors, fast or slow printing, option to pad lines with 'spaces'. Regular & Bold 'font', 2 levels of brightness. 13 pre-defined background colors (or 240 custom) and 7 background colors. Inspired by Peter Wilson's "Vacuum Fluorescent Display Simulator" (In fact I based the 'regular' graphics on his graphics.) Some characters added/redone and new 'bold' font. Colors tinted at runtime, not pre-made (for size and flexibility). Also adapted a bit of code by Kamilche (Load picture from byte array) to load JPGs directly from the resource file. Enjoy the code, and please comment/vote.
This all started when I noticed that I was constantly adding in code for when a textbox got focus, lost focus, etc. I decided that this would be a great chance to try my hand at making my own control. Fortunately, I spared PSC users the pain of some of the early versions of the control. I'm pretty happy with the latest version, so let me know what you think (and if you like it, vote for me! :-). Oh, I guess I should mention what it can do. It has several customized properties, such as "AutoSelect," which when True causes the text to be automatically selected when the box receives focus. Then there's "AutoUpperCase," which makes all entered text to be in upper case as it is typed. Then you've got "BackColor_Normal" and "BackColor_OnGotFocus." That's right, you can have it change to a different color when it receives focus (great for highlighting the current textbox when a user has a lot of fields to fill in). There's also "DefaultText" and "UseDefaultText." These are for having the text in the textbox revert to the default text after escape is pressed twice (the first esc is like an undo when you've started typing over something in the box). The latest feature is "TextType," which causes the textbox to only accept certain keystrokes, depending upon the property value. For example, there's AlphaNumeric, which allows everything, and then there's one for allowing only positive integers, and one for negative integers, pos/neg reals, alpha only, etc. This isn't like normal validation which checks the text after it's entered. This checks each keystroke and throws out the ones that aren't to be accepted. To run the tester .exe you'll need to register the cTextBox.ocx, or you can open the cTextbox.vbg file and run it from there. Let me know if you have any comments/suggestions/bug reports. Thanks! (and don't forget to vote :-) Oh! I just remembered, there's another property (two actually), "EntryTimerEnabled" and "MaxEntryTime." These are used to keep track of how much time it takes for a user to enter text in the textbox. If the maxentrytime is exceeded then the "EntryTimedOut" event is fired. This was added because my company often wants users to login to shop floor systems by scanning there badge ID and we needed to prevent the user from typing in an ID. Since barcode readers (or whatever type of scan device you use) are generally faster at generating characters than most typists, you can prevent typing in an ID by experimenting with the MaxEntryTime value.
After putting a picture on your form, run this code and whatever background color you choose will be subtracted from the form leaving a very custom form shape.
This code produces a snap to effect exactly like Winamp. Uses POINTAPI type and GetCursorPos API. It gets the current x and y does a few calculations and snaps-to the screen edge. It does take into account for the taskbar but that may need some tweaking.
This proggy will set the text in your label box on fire! =)
This ActiveX allow you to use animated gifs in your applications. I saw examples of modules before but not ActiveX.You can make OCX file from this and use it in other applications.
This code resizes a form and its controls according to the screen resolution. It also takes into account the size of the screen fonts (although this is untested!).
This code resizes a form and it's controls (and fonts) according to the users resolution.
This is a "Time Textbox". Kinda like the 'Windows > Control Panels > Date and Time' one... It has a separate input for hour, mins, am\pm. use the "up and down" arrows to chnage the time"..please try it out, and vote if ya like it. Provide some feedback too...
Scrolls an image across a picturebox and randomly chooses a new height to place the image
A VB control that, when placed on a form, causes it to act like the Taskbar (minus the Start Menu).
LED and SWITCH user control for technical applications. Just add led.ctl to your project as user control. Read readme.txt for properties.