Results for "Author: vlad vissoultchev"
Before starting the project register the oleguids3.tlb from the zip. ______________________________________________________ This is an example of a usercontrol that intercepts vbKeyTab, vbKeyEnter and vbKeyEsc keys WITHOUT using windows hooks. The idea is to place a custom implementation on the IOleInPlaceActiveObject interface of the usercontrol and to implement custom handling in TranslateAccelerator method. The idea is by Mike Gainer, Matt Curland and Bill Storage and the implementation can be found on vbAccelerator.com. Another interesting idea shown is how to "simulate" pressing tab key on the form as to be able to tab out of the control with ctrl+tab for instance. Greetings go to ORSHEE (for his grid control) and to José Pablo Ramírez Vargas (for not believing this is possible)! Enjoy, and check out my other controls submissions!
UPDATE(2002-12-13): Sample HookMenu 1.4 introduces RightToLeft forms support. __________________________________________________ UPDATE(2002-11-27): Sample HookMenu 1.3.5 fixes problems with MDI forms. Separators are reduced to 3 pixels to match Office XP ones. You can use DontHookMenu=1 when debugging and the control is part of your project. __________________________________________________ UPDATE(2002-11-23): Sample HookMenu 1.3.4 fixes troubles in NT 4.0, menubar background color in Win XP classic appearance and sub-menu arrow forecolor if menu text is not black. __________________________________________________ UPDATE(2002-11-21): Sample HookMenu 1.3.3 fixes an XP redraw bug, an accelerator (underlined) symbols bug and keyboard navigation in Win9x. Sample HookMenu 1.3.2 adds custom drawing of sub-menus arrows and fixes unicode strings support. Various fixes for Win95 support. __________________________________________________ UPDATE(2002-11-20): Sample HookMenu 1.3.1 fixes issues with WindowList menus and 3rd level sub-menus positioning. __________________________________________________ UPDATE(2002-11-18): Sample HookMenu 1.3 fixes issues with the subclasser (both in Win 9x and NT/2K/XP) so no more GPFs. Closer Office XP experience: menu colors are closer to Office values in 8bit color depth and in high contrast color scheme; menu shadow simplified as in Office in 8bit color depth; popup menus are positioned manually two pixels down; seamless shadow if popup is above the menubar. __________________________________________________ UPDATE(2002-11-12): Sample HookMenu 1.2 fixes the issue with TextBox popup menus (finally!). Some design time issues and menubar background color problems spotted by Ovidiu Boldea. Also, the property page is working more fluently now. I'm sick of win9x and so these are not supported from now on (ok, promise to do my best:-)). __________________________________________________ UPDATE(2002-11-10): Sample HookMenu 1.1 fixes issues in NT 4.0 and MDI child forms. Can anyone test the control under win95? __________________________________________________ This is a second attempt on moduleless window subclasser featuring "run-time dynamically generated machine code". The original was submitted by Paul Caton a couple of months ago. The present version is safer and is based on a completely rewritten assembly thunk. Also I have changed the name of the subclasser to reflect more closely what in fact it's doing. In addition to this you get the hooking thunk which (you guessed it) hooks windows hooks in a convenient and safe way. Both of the thunks' source files (assembly) are included. Both thunks are designed to be and have shown to be exceptionally safe in the IDE, they seem immune to both the end button and End statement - try to crash them and let me know what your results are. The screenshot is from a sample project (included in the zip) which subclasses a form's menus and turns them into Office XP clones - now it's not necessary to include 13000 lines of "supercode" to get the Office XP style menus under win 98/2000/XP/.Net Server (not tested on 95/NT btw). Enjoy and leave your votes!
This sample project enumerate all active SQL servers in LAN using ODBC function SQLBrowseConnect. This method is working both for NT and 9x based OSes. The behaviour of this ODBC function is changed in MDAC 2.6 to include all SQL Server instances found on each machine. In MDAC prios 2.6 it's enumerating servers listening on named pipes while after this release its using NetBIOS broadcasts over TCP/IP to receive response from the active servers. The code is compactly written in decoupled module and a form. The module is easy to be recycled in projects of yours and the form can be studied as a sample GUI to it. Enjoy!
UPDATE(2006.06.26): Multi-threading issues solved. Now various OS dialogs don't crash app (common dialogs, browse for folder, browse for printers, etc.). Need Compact In-Process Multi-threading: A FolderWatcher with sample UI (http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=36373&lngWId=1) registered to load sample Project2. _________________________________________________ UPDATE(2006.02.08): Now supports Uniscribe Unicode script processor for complex script and right-to-left languages. Couple of bugfixes and performance optimizations. _________________________________________________ UPDATE(2005.12.09): Now vbButtonFace colored backgrounds of Edits/TextBoxes are painted "transparent" -- for emulating selectable labels with locked borderless textboxes. More API hooking involved :-)) __________________________________________________ REUPLOAD(2005.12.03): This is a sample project that shows how to paint tabstrip panes using current theme background (see screenshot). Also, contained controls background is taken care of (CheckBox, OptionButton, CommandButton). uxtheme exports EnableThemeDialogTexture function which unfortunately is not working with VB6 containers (PictureBox, Frame, etc.) Also, there is a problem with windowless controls in its implementation -- these paint directly on the container DC. The presented solution subclasses the container and responds to WM_CTLCOLORBTN and WM_CTLCOLORSTATIC notifications by painting contained control background using current theme and returning NULL_BRUSH. This resolves contained controls requests for integration with parent background. For the container background FillRect API is hooked just before forwarding WM_PAINT and requests for vbButtonFace solid brush are replaced with themed background -- pretty cool and working!! Enjoy and don't forget to vote!
This is a general purpose media player implemented as a VB Add-in which is "directly" using DirectShow interfaces. Capable of playing avi/mpeg-1/mpeg-2 videos and wav/mp3 audio files. You'll need the codecs of course :-)) http://www.divx.com and http://www.elecard.com are couple of addresses to start. VbAmp Player supports BSPlayer playlist files, drag and drop of files from explorer. Please report bugs and problems and don't forget to leave your votes! P.S. also, check out the new version 1.2 of Outlook Bar control at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=36529&lngWId=1 - everyone consider yourself notified :-))
Well, here you have it: multi-threaded component using FindFirstChangeNotification API, compactly implemented in 386 lines of code and a 285 lines of sample UI:-))) And most of these are VB codelines which are not overly commented, be warned, this is not for the faintest of heart! Greatly inspired by http://www.relisoft.com/Win32/watcher.html. Attempted an implementation after a short conversation with NovaSoft about Walter Brebels' Directory Monitor. It can successfully monitor for recursive changes in the sub-folders, too. Hope you find a useful use for this component. Please, read [1st readme.txt] first! Enjoy, and leave your votes!
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 code is based on an originally code found in a MSDN's Bugslayer article written by John Robbins. Of course i had to 'just' translate it to VB which in fact turned out quite nicely and secondly had to find some usage for the such written code. Well, the problem of customizing VB DTPicker in MS Windows Common Controls 2 has bugged me for years now and viola, totally hacked GetLocaleInfo is my answer. Probably these two events happened in reverse order but nevermind;-)) Speaking of purpose, another cool thing will be to intercept DrawFrameControl api function and for instance swap the arrows of every scrollbar in your application ;-)) Now, for the serious stuff -- try as an excercise to get those arrows on the DTPicker work correctly under win 2k -- they tend to draw incorrectly when depressed, anyone else noticed this problem? And while on the DrawFrameControl topic someone might try to fix the freaking Microsoft Windowless Controls .ocx. It has all sort of drawing problems -- most noteably scrollbars and dropdown arrows.
This is in response to a yesterday's submission. No timer. No Set/Release capture (almost). The trick is that windowless controls ARE capturing mouse events upon mousedown BY DESIGN. So every label, image, or custom windowless control has the capture ability build-in. Thank you VB, I just figured out how to use this. Purely as an excercise you can encapsulate this code in a windowless usercontrol. Anyway, this implementation has at least two flaws. Can you find them? :-)) UPDATED: By popular demand now supports right click context menu, OLE drag&drop (good enough), "hand" mouse cursor (with shadow on win2k!), WM_CANCELMODE (pretty decently). More API's used but still under 160 lines of code. 10x for the 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!
UPDATE(2005.12.23): Problems w/ classic style solved and a bug on mouse move (flickering) resolved. _________________________________________________ Microsoft is not planning on releasing a new service pack for VB6 and we all know that the intrinsic built-in control are behaving badly when used in themed applications. This submission is an attempt to fix some issues with the VB.Frame control and provides custom themed drawing for graphical buttons: CommandButton, OptionButton and CheckBox controls. This, together with the old common controls from VB5, is enough to provide slick XP user-interface to your users. ___________________________________________________________ It's been a long time since my last submission to this site, so cheers to everyone! Report issues with the code here and enjoy!
VB Gif Library includes a set of classes for reading GIF images (both 87a and 89a variations) and rendering them through bitmaps or icons. The library features a native LZW decoder implemented in pure VB so there is no need anymore to rely on LoadPicture hacks for those animated GIFs. The decoder class is ~650 lines of code so it's really simple and easy to understand. The classes are designed with ease of integration with image processing applications in mind. Sample viewers are includes as to illustrate the usage of the renderer classes. Please, try test with various (animated) GIFs as much as possible and in case of problems comment here. Greetings go to Carles P. V. for his image processing submissions. Enjoy and leave your votes! Check out my other submissions too!
Before starting the project register the oleguids3.tlb from the zip. ______________________________________________________ This is an example of a usercontrol that intercepts vbKeyTab, vbKeyEnter and vbKeyEsc keys WITHOUT using windows hooks. The idea is to place a custom implementation on the IOleInPlaceActiveObject interface of the usercontrol and to implement custom handling in TranslateAccelerator method. The idea is by Mike Gainer, Matt Curland and Bill Storage and the implementation can be found on vbAccelerator.com. Another interesting idea shown is how to "simulate" pressing tab key on the form as to be able to tab out of the control with ctrl+tab for instance. Greetings go to ORSHEE (for his grid control) and to José Pablo Ramírez Vargas (for not believing this is possible)! Enjoy, and check out my other controls submissions!
UPDATE(2002-12-13): Sample HookMenu 1.4 introduces RightToLeft forms support. __________________________________________________ UPDATE(2002-11-27): Sample HookMenu 1.3.5 fixes problems with MDI forms. Separators are reduced to 3 pixels to match Office XP ones. You can use DontHookMenu=1 when debugging and the control is part of your project. __________________________________________________ UPDATE(2002-11-23): Sample HookMenu 1.3.4 fixes troubles in NT 4.0, menubar background color in Win XP classic appearance and sub-menu arrow forecolor if menu text is not black. __________________________________________________ UPDATE(2002-11-21): Sample HookMenu 1.3.3 fixes an XP redraw bug, an accelerator (underlined) symbols bug and keyboard navigation in Win9x. Sample HookMenu 1.3.2 adds custom drawing of sub-menus arrows and fixes unicode strings support. Various fixes for Win95 support. __________________________________________________ UPDATE(2002-11-20): Sample HookMenu 1.3.1 fixes issues with WindowList menus and 3rd level sub-menus positioning. __________________________________________________ UPDATE(2002-11-18): Sample HookMenu 1.3 fixes issues with the subclasser (both in Win 9x and NT/2K/XP) so no more GPFs. Closer Office XP experience: menu colors are closer to Office values in 8bit color depth and in high contrast color scheme; menu shadow simplified as in Office in 8bit color depth; popup menus are positioned manually two pixels down; seamless shadow if popup is above the menubar. __________________________________________________ UPDATE(2002-11-12): Sample HookMenu 1.2 fixes the issue with TextBox popup menus (finally!). Some design time issues and menubar background color problems spotted by Ovidiu Boldea. Also, the property page is working more fluently now. I'm sick of win9x and so these are not supported from now on (ok, promise to do my best:-)). __________________________________________________ UPDATE(2002-11-10): Sample HookMenu 1.1 fixes issues in NT 4.0 and MDI child forms. Can anyone test the control under win95? __________________________________________________ This is a second attempt on moduleless window subclasser featuring "run-time dynamically generated machine code". The original was submitted by Paul Caton a couple of months ago. The present version is safer and is based on a completely rewritten assembly thunk. Also I have changed the name of the subclasser to reflect more closely what in fact it's doing. In addition to this you get the hooking thunk which (you guessed it) hooks windows hooks in a convenient and safe way. Both of the thunks' source files (assembly) are included. Both thunks are designed to be and have shown to be exceptionally safe in the IDE, they seem immune to both the end button and End statement - try to crash them and let me know what your results are. The screenshot is from a sample project (included in the zip) which subclasses a form's menus and turns them into Office XP clones - now it's not necessary to include 13000 lines of "supercode" to get the Office XP style menus under win 98/2000/XP/.Net Server (not tested on 95/NT btw). Enjoy and leave your votes!
This sample project enumerate all active SQL servers in LAN using ODBC function SQLBrowseConnect. This method is working both for NT and 9x based OSes. The behaviour of this ODBC function is changed in MDAC 2.6 to include all SQL Server instances found on each machine. In MDAC prios 2.6 it's enumerating servers listening on named pipes while after this release its using NetBIOS broadcasts over TCP/IP to receive response from the active servers. The code is compactly written in decoupled module and a form. The module is easy to be recycled in projects of yours and the form can be studied as a sample GUI to it. Enjoy!
UPDATE(2006.06.26): Multi-threading issues solved. Now various OS dialogs don't crash app (common dialogs, browse for folder, browse for printers, etc.). Need Compact In-Process Multi-threading: A FolderWatcher with sample UI (http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=36373&lngWId=1) registered to load sample Project2. _________________________________________________ UPDATE(2006.02.08): Now supports Uniscribe Unicode script processor for complex script and right-to-left languages. Couple of bugfixes and performance optimizations. _________________________________________________ UPDATE(2005.12.09): Now vbButtonFace colored backgrounds of Edits/TextBoxes are painted "transparent" -- for emulating selectable labels with locked borderless textboxes. More API hooking involved :-)) __________________________________________________ REUPLOAD(2005.12.03): This is a sample project that shows how to paint tabstrip panes using current theme background (see screenshot). Also, contained controls background is taken care of (CheckBox, OptionButton, CommandButton). uxtheme exports EnableThemeDialogTexture function which unfortunately is not working with VB6 containers (PictureBox, Frame, etc.) Also, there is a problem with windowless controls in its implementation -- these paint directly on the container DC. The presented solution subclasses the container and responds to WM_CTLCOLORBTN and WM_CTLCOLORSTATIC notifications by painting contained control background using current theme and returning NULL_BRUSH. This resolves contained controls requests for integration with parent background. For the container background FillRect API is hooked just before forwarding WM_PAINT and requests for vbButtonFace solid brush are replaced with themed background -- pretty cool and working!! Enjoy and don't forget to vote!