Results for "Category: Custom Controls/ Forms/ Menus"
Make fast calculations in the same place and keep the history of the value u got in the tooltip.
We were trying to create an application in a COM enabled programming envoriment, and needed the weeks shown in a calendar. We came across a bug in ALL of Microsoft's calendars (including Outlook) that will list the wrong week number on certain years. E.G. December 2003/2004. We made a custom VB OCX that does the trick, even thou it's not as pretty as the Microsoft one.
This code is the simplest form of Scrolling Text. It uses a Timer controle to make a label scroll. No consideration is required for screen cordinates or size or any other thing. Have a look at this simple scroll text application and Please do rate it :) I am watching from [email protected]
Recently a person calling himself Dustin Tinsley submitted source code for a UserControl to emulate the vertical graphical menu style popularised by MS Outlook. When I pointed out to him the amazing similarities between his code and one which had been written by one Robert L. Kubelka, and made available on other sites about three years ago - the similarities extended to such things as identically worded comments, spelling mistakes and even typos - he immediately removed my comments and any other subsequent postings. Ian Ippolito has since then deleted the code and I offered to upload the original. Should you feel this code is worthy of a vote, please do not vote for me - it is not my code (either!) - I'm sure the original author would appreciate a note of thanks. Thanks also to Ian Ippolito for keeping PSC honest.
I had always found it frustrating when I needed to convert a bitmap into an icon because popular software such as MSPaint or paint shop pro does not do it. Here is a small VB program that converts a bitmap to icon. Alessandro wanted to know if he can display the image before converting it. (Done)
menu system
This project contains some nice ways to unload and load forms with some nice effects. The main functions are in subs so you can easily transfer it to your app and use it if you like it. I suspect it might look a bit fast because i have a slow processor and it seemed to look ok for me so you may need to adjust it. Otherways it is pretty simple and is eyecatching. I saw the same thing in another app and i liked the idea so here it is.. Please vote and leave a comment
This is the XP Command Button recreated by me. There are 7 custom borderstyles and of course the original windows xp borderstyle. Like the original button it responds to the mouse entering and leaving. This button has the Default and Cancel Button property so it can be the default button. It also reacts very similarly to the original buttons. It has accesskeys set up so that any alt combo can make the control click (like standard buttons) You can choose gradient background or solid background (solid is fast, while gradient is slower) The great thing about this control is that I have seen other Xp controls and i have spent so much time making my one fast aswell as good. It can redraw at 2000 times a second (with gradient background) on my Pentium III 866 MHz. Similar controls I have tried redraw at 20 times a second. Please vote. I have spent a long time on this and I bope that you all like it.
This is the XP Command Button recreated by me. There are 7 custom borderstyles and of course the original windows xp borderstyle. Like the original button it responds to the mouse entering and leaving. This button has the Default and Cancel Button property so it can be the default button. It also reacts very similarly to the original buttons. It has accesskeys set up so that any alt combo can make the control click (like standard buttons) You can choose gradient background or solid background (solid is fast, while gradient is slower) The great thing about this control is that I have seen other Xp controls and i have spent so much time making my one fast aswell as good. It can redraw at 2000 times a second (with gradient background) on my Pentium III 866 MHz. Similar controls I have tried redraw at 20 times a second. There are transparent corner pixels now and a few other things I changed which I don't remember.
While looking at somebody else's code, I noticed he was doing all sorts of stuff with the MouseDown and MouseMove events. Here's a better way, it captures the WM_NCHITTEST message which Windows sends to make Windows think the user is clicking on the titlebar, thus moving the form...
An example of ownerdrawing a menu. But, in contrast to most samples, this one also paints the border of the menu... Next on my list is painting bitmaps on the menu for full customization, but this is a little more complicated if the borders are more than 3 pixels wide... Hope this helps :) (btw, had people test it on Windows XP, worked fine too)
This code creates a horizontal or vertical line with a 3D look. You can see it almost in any Windows Application. This is dead simple code to understand. I saw the other 3d Line OCX in a code of the day, and it didn'y include source code. I hate including OCX's so I made my own. If you like this code, vote for me!
When this OCX is dropped onto the form, it makes it EXTREMELY easy to set the WHOLE FROM Transparent (well everything except the controls). It can also just set the container transparent (everthing except the controls and the title bar). Please give this a go and give m some feedback as i'm new to this stuff. NB: The original code is not mine i've just downloaded it from somewhere and made it alot better (well, i thinks so anyway). This zip comes with an example app and a compiled OCX.
This code example will append a separator and a new MenuItem 'Always on Top' to the system menu of any form. The menu is affected weather left clicked from the control box on the form or right clicked from the taskbar. Subclassing is used to trap when the 'Always on Top' item is clicked. The custom message handler uses the SetWindowPos function to keep window on top or reset it to normal. Also on a lark I traped out the close menu item to prompt before closing. If you say yes then the close message it passed otherwise the close message is traped out and the form stays open.
It allows you to skin forms. It wierd with the way i have done it but it works. Thanks for the people who put the code planet source code as it come sin very handy.
Quit your application with animation
An example for beginners, showing how to use the MoveToEx and LineTo API calls. Gets the current time, converts it into (x,y) coordinates and draw the "clock"...DON'T FORGET: DON'T EVEN THINK ABOUT VOTING FOR ME!!!
UPDATE(2002-12-26): Version 1.3.2 Fixes incorrect painting and adds absolute positioning for tiled bitmaps. __________________________________________________ UPDATE(2002-11-12): Version 1.3.1 Fixes gradient fills under legacy OSes (NT 4.0 and Win 95). __________________________________________________ UPDATE(2002-11-05): Version 1.3 Label edit fully implemented! Brand new subclasser working ok in MS Office and VS.NET so this one should fix the problems. Out-of-focus mouse wheel support (Outlook style). OLE Drag&Drop of groups implemented. cButton.Key property synced with parent collection. New properties: LabelEdit, AllowGroupDrag, GroupHilightIdx. Additional background style: ucsGrdTileBitmap. Bugfixes (including cMemDC). Help file updated. __________________________________________________ UPDATE(2002-08-09): Version 1.2 Automatic OLE Drag&Drop fully implemented!!! New properties: UseSystemFont, FlatScrollArrows, WrapText. Additional background styles: ucsGrdAlphaBlend, ucsGrdStretchBitmap. Bugfixes and new samples. Help file updated. __________________________________________________ UPDATE(2002-07-24): Version 1.1 Help file included. Additional background options. cMemDC bugfixes. VB bugfixes: now icons can also be 256 colors and truecolor. __________________________________________________ This is a fairly complete emulation of outlook bar. This control is fully customizable and can emulate both outlook xp and 2000 button bar (see "more samples") and then goes beyond. Control customization is accessible through couple of property pages. Featured is a hierarchical model (much like CSS) for defining formats of control elements (including hover/pressed/selected formats on group/items) which can be persisted (an .obf file) and a polymorphic object model for representation of group and item buttons data. Multi-line captions, multi-line tooltips (API), large&small icon styles, single/double/fixed bordes, horizontal/vertical gradients. Help is to be done (generated:-)) shortly. OLEDrag&Drop is in its infancy but still workable. Also, here you have it: the *realtime* color picker re-submitted as part of the outlook bar property pages -- check it out it's fast! Also, check out the error handler (robust one) and the DebugMode object leak info system. Has been checked on win2k for GDI leaks (win9x to be done, anyone?). This is in response to recent submissions of "commercial quality" and "industrial strength" software to this site. Although not complete the project could easily become commercial one. Greetings go to: Ariad Software (now www.cyotek.com), vbAccelerator.com (great inspiration), and Carles P.V. (for his controls submissions:-)). Read readme.txt for the build procedure. Please report bugs and problems and leave your votes!
This is a UserControl i did for a recent project. It almost fully emulates Windows taskbar functionality. Written from scratch, uses heavy advanced API and subclassing. Code greatly inspired by submissions to this site and vbAccelerator.com. Everything is done the hard way, the way a VC++ programer would do it. And btw, lots of lame code here. Don't know why people upload so much rubbish. I'm a professional VB coder and maybe my judgement is too harsh :-)) Anyway, don't bother to vote but do comment here. Enjoy,
UPDATE(2003-12-06): Off-by-one error when using large font sizes fixed. _________________________________________________ This is a class that extends standard VB.ListBox control when its style is set to 1 - Checkbox. In addition to the standard checked/unchecked states listbox items can be marked as unknown (greyed) too. Also, mouse clicks/dbl-clicks anywhere on the item are interpreted as selection requests. This behaviour closely emulates the listbox control implementation in the Outlook Categories dialog. Enjoy!