Results for "Category: Custom Controls/ Forms/ Menus"
gridClass is a read-only grid comprised of text box arrays. I use it to display information from an Access database and it was developed after expriencing total frustration with the grid provided with VB6. It could be modified to be updatable and I may find time at a future date to do that.
This incredible program shows how to create totally realistic fire without using any palettes to create the right color effects! A simple bit of mathematical color manipulation creates a perfectly colored fire effect more realistic and faster then palettes, making for real-time fire animation. The included .exe demonstrates the current max speed of this program, and it will BLOW YOU AWAY! This code is guaranteed to be the FASTEST, EASIEST, and MOST REALISTIC algorithm-generated fire project at this site. If you don't believe me, try it out! This is definitely the best artificial fire program that has ever been built in VB, so don't miss out on this awesome code!
This killer code demonstrates the fastest and most efficient way to combine pictures transparently. Designed to be used in a paint program or game, this picture will combine 2 pictures at any percent transparency. I haven't seen code of this nature anywhere else on the site, so be sure to check this out. This code could also be used to fade pictures into eachother (like they do in MYST with transitions mode on), if you're interested. Includes picture loading and saving code as well.
This cool little program demonstrates a basic painting program as well as the hard-to-find dll call for filling a region of a picture. To use the program, all you have to do is draw a line with the left mouse button, then click with the right mouse button to fill the clicked-on area with a random color. Also, as far as I know, this may be the only VB project on the net that has the 'ExtFloodFill' dll call, so make sure to grab it!
Easy-to-use template for creating a non-rectangular form. So simple, even Homer Simpson could use it (if he had a computer).
I made some modifications from My previous entry. Fixed the output.txt problem. It was in the OCX file Source included = OCX,DLL and Sample .EXE DLL SOURCE INCLUDED!!!! FREE. FAST. Easy. This is a port from Chris Yates code (Awesome) Make Transparent Forms using pictures. SUPER FAST AND EFFICIENT. Now you can select the Transparent color. Example EXE to show how it is done. No DLL Calls. Use my TransRegion ActiveX to run the TransRegion.Dll REAL easy and it is Royalty free. Please vote for me.
Disable the shortcut ALT+F4 in a Form
This is the EASIEST way to have scrolling marquee text in a label. 'No long useless code.
I started this project nearly a year ago to provide printing and print-previewing in my applications. This project has a lot of room for improvement, so my hope is that you can take this project and run with it for I have limited time to develop it any further. The project has two dependencies: SSubtmr.dll and Win.tlb (large file). When you un-zip the file, please pay close attention to these dependencies in order to make the project work. Credit goes to Steve McMahon and Bruce McKinney for these libraries. Get them here: http://vbaccelerator.com/codelib/ssubtmr/ssubtmr.zip http://www.twocyclones.com/Files/Win.zip
This code was originally coded using 16-bit Win API function calls and I switched to 32-bit... looks like I missed some in the first release. If you discover any OVERFLOW problems, it's because of this fact. I think I got them all. Anyway, here's the intro... It would be ideal to have a generic print routine that could print to the printer or to the screen depending on what you pass it. This project shows you how to create printing routines that can print to the printer or to a picture box. This enables you to add print preview capabilities to your Visual Basic applications. Since there are several ways that you could implement print preview in your applications, this project describes one method that is easy to do in Visual Basic and works well.
THE PROBLEM: VB allows regular forms to be instantiated from an ActiveX DLL...but does not allow MDI child forms to be instantiated from an ActiveX DLL! THE SOLUTION: MDIChildMaker! Now you can put your forms in a seperate ActiveX DLL and use them as MDI children forms in your main application's MDI form! NOTE: This is not a trivial example, but uses native VB subclassing techniques. This is one code solution EVERY VB programmer MUST have! Check out www.cyberbiz.com
If you didn't see my previous form manipulation example then you gotta see this. This is some pretty good stuff, great for newbies. New Subs added! Don't miss out on this, you'll be happy you looked at it. Code all done in a professional way. Extremely nice routines for simple manipulation of any form. Cuts down your own coding. Heavily commented subs so that you can understand what's happening. If you have any trouble with this example(which you shouldn't) then email me and I'll make even more comments on the routines as I add new ones. Comments definitely welcome. Please, Constructive critism and praises only. 2/10/00, new routines combined and added. All subs tested and compiled! And yes, I did add a sample of the CustomMsg becasue I got a few emails about it. I sure hope it helps you all out. Check out the "StreakExit" routine. If anyone knows how to make that routine smoother, please email me with a fix. If anyone has anything to add, email it to me and I'll add it in and give you credit. Please remember, this is beginner level. I really hope that you find this example useful. Thanks for your comments and enjoy the code! Here is a small list of the subs: 1. BooleanRollup 2. CenterSnglFrame 3. CustomAbout 4. CustomMsg 5. frmCenterMe 6. frmKillExit 7. frmOnTop 8. frmPosition 9. frmShrink 10. LoadNextToMain 11. LogMyErrors 12. NoOffScreen 13. ProgCaption 14. ProgCaptionV2 15. ReSnapFrm 16. RestoreFrmDiminsions 17. SaveFrmDiminsions 18. SaveFrmPos 19. StreakExit 20. vEmailMe 21. WriteSettings I really hope this helps the newbies out. This may be my last update to this project.
Notice: THIS CODE HAS BEEN FIXED! PLEASE READ THE COMMENTS AT THE BOTTOM OF THE PAGE TO SEE WHAT WAS WRONG BEFORE. Create real C++ style command buttons with ONE line of code!!! You can use this code on any of your commands buttons. You will loose any images and the BackColor of the button, but that really doesn't matter because you can 'paint' images onto the button using the API. Make sure you set the style property to 'Graphical' or this will not work!. OK here is how it works. You see, by default Visual Basic's command buttons are drawn with the 'Default Push Button' style, which makes them flat and ugly when pushed. But when you set the style to 'Graphical' its really just a C++ button with a single pixel outline drawn around it. This code basically just stops the button from drawing that line to create a sunken style button. This code is not compatible with Visual Basic 4.0/32 because its buttons don't have the style property. However, in Visual Basic 4.0 you can apply the code to an option button and it will appear as a C++ push button (they both have the same basic events and properties: Click, MouseMove, etc...) which is a 'rigged' kind of way of getting it in to Visual Basic 4.0...hehe. I wrote this code because I got tired of all the people trying to create C++ style buttons with CreateWindowEx and Message Hooks, and all that other difficult stuff.
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!