Results for "Category: Custom Controls/ Forms/ Menus"
To create an "Office-style menu" (or owner-draw menu) you must register that menu item with Windows as MF_OWNERDRAW and then process the WM_MEASUREITEM and WM_DRAWITEM messages sent to the menu's parent window. The attached project file simplifies this process by encapsulating all menu drawing operations in a class called "COwnMenu" and hiding the details of working with Windows in a code module entitled "OMenu_h." With this mini-system in place, all you have to do to get owner-drawn menus in your program is call SetSubclass on the menu's owner form and RegisterMenu to set a menu item as owner drawn. The provided example project contains complete documentation.
It's a single function, without API's, that loads an image and puts it in a destination PictureBox. If the source image is bigger that the destination PictureBox, then it will resized to fit in (mantaining the ratio). In other words, the image loaded will nicely fit the destination, but will not be deformed. If the source is smaller, then it will remain that size... This function is an upgrade (in speed, error trapping and results) of Jason Monroe original post. Thanks Janson.
Here is a Calendar Class that can be used as a replacement for the Microsoft one. No additional files have to be attached to your project, simply put calendar.cls(+two more support classes) in your project, stick a picture box on your form, write 3 lines of code, and you have a fully functioning CALENDAR with multiselect, dropdown and etc.
Among other things, this code demonstrates how to make 2 forms work together as if they were a single form. Make a form "hide" behind another and scroll down smoothly to reveal itself later. Also demonstrates how to make a custom title bar, the correct way to minimize an application, how to respond to the System Menu, and much more. It's hard to describe but it's well worth the download. Heavily commented code makes it very easy to follow what's happening. Votes and comments are appreciated!
When your form is resized, some of the controls contained there will be clipped (partially seen). This code tries to eliminate that by resizing all the controls in relation to the forms resized extent. The main routine will just have to be added at the FORM_RESIZE. Also supports MDI Forms. Enjoy!
Make the backcolor property of a form acts like a VB-Setup Program
Here you have it the source code for adding a progress bar to a listview control, similar to Napster and iMesh. I have brought the problems down to one and that is the Horizontal Scrollbar so if anyone figures this one lemme know. The code now refreshes of of the WM_PAINT message so it's super effiecient. Happy Coding!
This simple control simplifys the hotline tracker protocol so that just a few lines of code can list a tracker.
Shows how to fill an Image Combo (part of Microsoft Common Controls) with each of the 16 standard colors to be used as a color picker such as in a word proccessor on the toolbar. All the images are created by code for ease of modification (As opposed to using 16 Bitmaps).
The HC Draglist is a listbox that adds the ability for the user to drag the items to a new location. When the user starts dragging an item, an arrow will appear next to the listbox and as the user moves the mouse up and down, the arrow follows. When the user stops dragging, if the arrow is not where the item came from, that item is moved to the location of the arrow. You can also set the tabstops. This is a good example of a subclassed control. Should be simple to understand. It is VERY similar to the ccrp Draglist, but with this one you get the source code, and it is more than 50% smaller when compiled.
Ever wanted to see a picture behind flexgrid text (not a single cellpicture!)? This project is a little part of my custom grid control. Picture idea was given by a questioner Experts-Exchange site. Please let me know your ideas and let me know if you want to have a more flexible FlexGrid control code. Enjoy. Suat Ozgur
This is just a short example of how to create and use control arrays
It just pops down a bar when you put the mouse at the top of the screen. it then detrects whether the mouse is still on the form, if it is not it hides the little bar.
The purpose of the code is to determine the height of the taskbar so that you can display a form at the bottom right hand corner of the screen everytime.
This code causes the form's TitleBar and the form's TaskBar Window to Flash.
Add Wav Files To Your App. This sample is in .zip formatYou need a versio of Winzip to open it. You can download it @winzip.com
Changes the Ugly Standerd Look of the Form
Custom Button with resizable images. Styles: Flat,OfficeXP,WindowsXP, NoBorder Properties:Transparency,URL,Bevel,LongCaption Wrap,MaskColor... and more
Major Updates...Now, Picture shadow on OfficeXP buttons, easier button setup...etc.
This is a splitter control with 2 panes. I found the initial code out on the web somewhere, but it had a few bugs and was missing a few features I wanted, so I added the ability to colorize the splitter bar and the code now fires an event when the splitter is resized to allow for controls within controls to handle a resize. I also cleaned up the code and fixed a few bugs. BTW : You can add splitters within splitters to create more than just 2 panes.