Results for "Author: mrbobo"
If you've ever tried to use the standard Toolbar customise feature then you will know it doesn't work. This is a documented bug - visit MS and do a search. They offer some solutions, but these only partially rectify the problems. The problems involve an inabilty to reliably save the configuration of the Toolbar and a failure to display unused items in the left hand selection Listview. My fix Scrap the feature entirely - uncheck AllowCustimize checkbox in properties Replace the dialog with a clone form Power the function with a simple class
A reasonably complete clone of Regedit.exe with a few added extras. All coders should be familiar with the layout and usage of the Registry If you're not then here it is on a plate !
A scientific calculator. Written as Usercontrol, very lightweight, very easy to call. Demonstrates trigonometrical and logarithmic functions, each with just a line or 2 of code. Great to learn from.
If your sick of typing in the same old menus over and over then try this out. Extracts menu data from VB Forms and Usercontrols and allows inserting these menus into other VB Forms/Usercontrols or saving as a template for later use. Whilst its a useful little programming tool in itself, it was written to demonstrate string parsing and filetype creation and association including, Explorer context menus.
The name says it all. No need to vote. This is in response to a question in the "Ask A Pro" section. Added Hide/Show as requested.
Mixer API demo. A clone of the Windows Mixer(sndvol32.exe). Volume/Balance/Mute controls fully responsive to external changes via callbacks from winmm.dll. The Mixer API causes problems for VB coders everywhere. The tangled web Microsoft created turns what should be simple into a nightmare. In this demo I try to untangle some of this mess by cloning the Windows Mixer(sndvol32.exe) as an example of how to write your own Volume/Balance/Mute controls. As an App it's pretty useless as sndvol32.exe exists on all Windows platforms, but for all those Audio/MP3 coders out there, it should make life a little easier. Update: As requested an "Administrator" version(Included as a separate zip) Added: 1. The ability to lock Volume,Balance and Mute for each control 2. Save settings as presets 3. Run hidden - simple code - not 100% hidden, but good enough to keep the average user out. The save settings demonstrates writing settings to a binary file, something not often seen here on PSC. What it will do: If a control is locked, not even sndvol32.exe can make changes. The given control cannot be altered. Security is low - I'll leave it up to you to bump up the security level. What it wont do: If a 3rd party App communicates directly with the soundcard(WinAmp for example) it can effect changes. Screenshot shows "Administrator" version
This is a simple demo of using the API to manage files. It demonstrates the use of SHFileOperation. It is by no means a 'File Manager'. It was put together in order to answer questions from many coders new to 'VB in the Discussion Forum. I hope it is of some help to those folks.
Demonstrates how to get the selected text from another application - Notepad for example. Yet another submission in response to questions in the Discussion Forum. Hope you find this useful.
Demonstrates how to link the scrolling of 2 RichTextBoxes, so they scroll simultaneously without any lag time. This is in response to a question in the discussion forum.
File Association can be tricky and there are some rather blunt instruments being applied in some examples of Association both on this site and elsewhere on the web. This demo shows how to Associate your App to a file extension and safely return Association to the previously Associated program if desired. Lots of comments, easy to call, with the absolute minimum of code required to do the job. Prompted by more than one question in the Discussion Forum.
This is in response to many requests for "removing duplicates in a listbox" in the discussion forum. Using the API is almost always faster than using VB. I'm unaware of any examples here on PSC of using the API for removing dupes - I may be wrong. Either way this is a very efficient way of accomplishing this task. No need to vote - code couldn't be much simpler than this! Feel free to improve upon the code yourself. As usual all bugs come entirely free of charge.
This is a quick demo of thievery. It demonstrates how to steal the Treeview from the BrowseForFolder dialog for use by us poor VB coders.
This tiny app will inform you of new submissions on PSC and demonstrates how to implement ownerdrawn menus to add icons and change the font/color of your menus in the simplest way possible. Years ago I posted a submission to monitor for new submissions on PSC. That submission did much more than check for new postings and as such it broke one of codings' golden rules - never hardcode addresses/strings. For that app it was neccessary, but as is inevitable, things changed at PSC and elements of that app have become inoperative accordingly. I've simplified this app to only check for new submissions and the only hard coded address used is one that is unlikely to change until a complete revamp of PSC occurs.
Adding items to the system menu can make your application look more professional. This is a very simple example of how to do it and be able to respond to clicks on that menu. No need to vote - this is in response to a question in the discussion forum.
A PlugIn is a dll/exe/script that is installed separately from an application that can perform tasks within that application. It should be able to pass objects freely between the application and the plugin. This is in response to a number of questions in the Discussion Forums - you know, the place no-one ever goes and questions never get answered !!
Handling File Paths. The VB programmer should try to use the API wherever possible. It is usually faster and more memory efficient than most VB methods. We should also make use of .RES files rather than hard coding to reduce the amount of memory consumed by our applications. This little demo attempts to illustrate these concepts in the simplest possible way.
The use of Templates can dramatically reduce development time and time spent debugging. The repeated use of the same code means that over time, that code gets tested in many environments, and gets further refinement to produce robust code and bug free applications. This submission contains two small simple "Templates" that you are free to use. Using "ModCmnDlg.bas" means that you do not have to use MS Common Dialog Control (comdlg32.ocx) for the simple task of opening and saving files. Using "ModMRU.bas" enables the easy addition of recently used files to menus in a form. This can make your application easier for the user to use and gives a more professional feel to the application To those coders that have requested my Templates in the past - I am in the process of moving over to .NET and will release the more advanced ones over time, stay tuned !
Syntax coloring, advanced selection routines and Highlighting. Highlighting using the Richtextbox control is awkward. Whilst there are a host of Selection properties there is no Highlight property we can access from VB. We just have to parse the RTF code.
A practical demonstration of using classes to optimise your applications. Correctly written classes make your code re-usable, faster, more reliable and memory efficient. They also speed devolopment time, make debugging easier and can be placed in DLL's making them accessable from multiple applications simultaneously As time goes by they become even better because each time you use the same class in different apps, any bugs that do show up get removed for future apps as well.
There are quite a few submissions on PSC demonstrating the use of ownerdrawn menus. Most are very good, I voted for them ! However, for some folks they were a bit complex and hard to understand. I hope this helps clarify the process for less experienced coders. Most professional VB programmers have been doing this for years. This submission seeks to simplify, as much as possible, the process of converting VB menus to ownerdrawn menus. No side panels, crazy fonts/colors - just the default menu with a true color icon. This small module is a cut-down version of a template I wrote a long, long time ago. I hope I haven't introduced too many bugs in the process of simplifying it, but if I have they shouldn't be too major and the concepts involved are still well demonstrated. The tasks : 1. Locate all VBmenus on a form and determine thier actual handle according to Windows 2. Change the type of each menu to 'Ownerdrawn' 3. Subclass the form so we can respond to the messages 'WM_MEASUREITEM' and 'WM_DRAWITEM' 4. Use the API to print a caption and paint an icon, either Enabled/Disabled or Checked, in response to those messages.