Advertisement

Results for "Author: roger gilchrist"

ASP_Volume2 #25843
FRX FILES WHY YOU SHOULD UPLOAD THEM (updated)

Frx files are a vital part of almost any VB code but many people forget to upload them. This article explains how they work and why you should include them in your uploads. Article also in a zip file for reading off-line.

ASP_Volume2 #26092
Colour Percentage Fader

Colour Percentage Fader Inspired by 'ColorFade' upload. Code lets you choose the start and end colours for a simple colour percentage bar. Screenshot added as requested

ASP_Volume2 #26158
Singing Reindeer Mk 2

merry new year and a happy christmas to all at PSC. Inspired by 'Singing Reindeer' by Chris Seelbach at xtCodeId=57776; any votes go to him. No Screen shot (it's a surprise but check Chris's version for a hint) I decided to developed a christmas tree using the ideas (and the graphic) in the original. In the process I realised there were some problems in the original (artifacts around the animated bits cleverly hidden by careful backgrounding). I thought I'd try to make a single super deer UserControl but couldn't extract the images from the original controls, so developed mouth and eye UserControls (using the images that I could extract and some screen captures) that are designed to be placed on the main usercontrols. ----------- Time presses so not much commentry but will develop it into a tutorial over the break as there is some quite trick stuff going on here. ---------------- Thanks Tom Law for catching that I left out the sound files, check the file times, it was laaaaate.

ASP_Volume2 #26438
Cls_FormMarquee

Inspired by 'An old-fashioned Billboard Marquee' txtCodeId=51571 which is good looking but not very portable I built this class. I have always felt that if you need a large number of controls you should use the 'Load' command not painstakingly apply over a hundred controls. If you change resolution this can be very painful to upgrade. This class simple creates (and deletes) controls on the fly using just one indexed Image control as a seed. If you make a large change in the size of the marquee there is a slight delay. The screenshot doesn't really tell you much (no movement) just imagine all the little disks (yellow dots) moving

ASP_Volume2 #26463
Extended Find Ver 2.2.1

This is a VB6 only Add-In that is a substitute for VB's own Find & Replace tool. It allows you to search your code and to see at a glance all occurrences of a search phrase in a list. You can also do pattern searching (including an ASCII Search Macro to find high ASCII characters like copyright). You can search and replace at 3 levels (all code, current code or current routine). You can also limit searching to just comments or strings or block comments and strings from searches. The Tool docks with VB's IDE and can be set to display during VB's start up sequence. There is a simple Help window (or read the rtf file in the Zip.) and a Properties window that gives you greater control of how the tool looks and behaves. To use: Compile the code, placing the dll in VB's own folder or whereever you keep your Add-Ins. Close VB and reopen it (WARNING VB may crash on exit; this is a problem with compiling Add-Ins, it should not happen later). Select the Add-in Manager and find the add-in called 'ExFind_D' check the 'Loaded/UnLoaded' and 'Load on Startup' checkboxes. This will add the Extended Find to the Add-ins menu. Click the menu item and read the help window for further settings. Because this tool uses a UserDocument it automatically remembers its size and location between runs. Please inform me if you wish to create VB5 (should be easy) or even VB4 (may not be so easy) versions and include acknowlegment in code/help/comments. If you wonder about the F> button on my toolbar in the screenshot use the 'Other Submissions' link and find my article on 'Full Compile' Thanks to users of earlier versions especially Dream and Sub-Zero for all their help in debugging. Comments, votes and bug reports welcome. -----------------------------------------Version 2.2.1 Pattern Search button disables Whole Word and Case Sensitivity buttons(If you could turn them on Pattern search would fail) To remove a single item from the Search History make sure the whole text is selected then press BackSpace. Fixed bug that caused eternal loop if search phrase occurred in last line of code. Removed Punctuation Aware; it is not needed for the program to opeate. Cancel button displays properly. Added macros to allow you to insert a NewLine or Tab character to the Replace combo. Added Auto Pattern search Off if Search phrase does not contain any Pattern search characters. Fixed Selected Range test can now cope with selection starting/ending properly. (was ignoring start/end of all lines in selection if Start/End were not at minimium/maximum values for whole range.) Changed Filter Warning message to make it easier to read at a glance. ver 2.2 Added Component and Procedure Line columns to Found Grid. Added Selected Text Range; don't know that anyone ever uses this but it is part of VB's Find and Replace so here it is. Rearranged Properties window Ver 2.1 See Additional Notes in help: Not fixes but stuff that's in the code but not previously explained. Added User selection of colours for Combos and Grid. History is now saved in correct order. Whole Word Filter automatically sets Punctuation Filter. Fixed bug Found List working properly Improved the way Found Grid copes with editing changing the hidden line number that Extended Find uses to speed finding. --------------------------------------------

ASP_Volume2 #26577
Testing 'For' Structures Variables

I have noticed a few uploads where the code was just a bit off because of incorrect handling of the counter variable of a 'For' structure,so conducted some experiments. This is the result, nothing great but might help someone. It's a bit long so I zipped it as well, so you can read off-line. Additional input welcome.

ASP_Volume2 #26649
Extended Find ver 1.1

Ver1.1.03 general tightening of code. Help file now has details of pattern searching and added optional gridlines for found box. Ver1.1.02 Now has pattern searching! Screen shot slightly out of date, have added better button graphics(on/off states), also fixed the bug in ver1.1.1 where first line of found overwrote the headings. Ver 1.1.1 Lots of new stuff (see Ver data at end of description) ver 1.1 uses grid tool instead of listbox to display finds. This is a re-write of my earlier Find Add-in using a UserDocument. Mostly just an experiment for a conversion of my Code Fixer. You can search for whole words, parts of words, case sensitive or insensitve, punctuation aware, ignore comments and strings or only find strings and restrict to current code page of code. Once launched you can also search for new items simple by selecting the word in code and pressing a button. Added settings screen which allows you to launch Tool on VB startup, save previous searches and filter settings between runs, set limits (20-400) on search history. For add-in programmers check the code around PasteFace command for a solution to the problem of destroying the clipboard contents when using this command and just below it the disgustingly simple way to make add-ins appear during VB startup sequence. To use Open project in VB, compile(placing dll in VB folder or where ever you normally store add-ins), close and re-start VB, in Add-ins menu select 'Add-in Manager..' look for 'ExFind_D' set 'Loaded/Unloaded' and 'Load on Startup' (NOTE this is NOT same as the 'Launch On Startup' setting within the program.) Version 1.1.01 The Status label has been removed; report on activity now appears in the Code column heading. Added a 'Clear History' button to Properties page. (also changed layout of form) Rearranged the toolbar buttons for more clarity Changed All/Current Code page button to toggle mode. Improved the shut down process to properly remove all forms/objects. Changed the way settings are stored to overcome problem with Registry storing boolean data on non-Engish Systems. Moved all Property load/save code into just 2 routines. (NOTE Property and Help form positions are saved separately by each form) Adjusted the Column width calculation to keep location data as small as possible. See 'Sub Show' on DocFind if you don't like the grid heading or selection colours. You can hard code what you want there.

ASP_Volume2 #26869
International Date Issues

If you wander away from VB's built-in date handling (and even if you stick fairly close to it) eventually you will have trouble if users can input a date. While MS and the WWW have made most computer literate people used to the the USA format M/D/Y there are many others. MS recognises 3 MDY, DMY and YMD. There are also lots of date dividers '/-\,.'. If you don't provide a calander or listbox system to control date input then you have to program for end-users using their local format. The following article is a at least part of a quick and dirty answer to the problem. (article is also in zip for easier downloading in English and Indonesian)

ASP_Volume2 #26872
clsPlanet: Class to Draw a Solar System (updated)

A single class capable of drawing the solar system from Sun to Pluto (including 500 asteroids and 9 moons). You can easily add more or design your own solar system. At present the orbits are circular and the comments a bit thin on ground but should be enough to get you going. Thanks for inspiration, assistance and support to Peter Wilson whose upload 'A Simple Solar System Simulator, v1.0' http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=47973&lngWId=1 inspired this. -------------NOTE--------------------------------- If it runs too slowly reduce the number of asteroids at Private Const AsteroidNumber As Long = 500 . I have run it with up to 5000 but the graphic is not that much different and very slow. ---------UPDATED-------------------------------------------Thanks to Peter Wilson who imporved his zooming code and kindly sent it to me. Have added a new solar equator view, labels for planets and moons, improved collection based functionality, Asteroids do not display orbits (un-comment piece of code if you like that). All orbits are now ellipical and Pluto has its eccentric orbit (not accurate will get almanac from library to fix that). Planets have extra properties (oblate= Flat). ------------ CODERS this class automatically produces the labels it needs to operate without a seed control. Cute Trick extended on article in Computer Shopper Jun 2003.

ASP_Volume2 #27095
Extended Find ver 3.1.4

Update of my Extended Find add-in. It is a more friendly interface than VB's own Find and Replace tool. Now has a basic indented formatter. Indent code at project, module, procedure or selected text level. Couple of options for treatment of blank lines. Bug in Replace fixed. -------------------------- If the formatter fails it inserts an error message( 'Indent Error ). This means either that your code is missing some vital line, OR you have used a legal but rare layout that I didn't know, OR as the formatter is a 'rewrite from ground up experiment', it has a bug. If you think your error is one of the last two please let me know and send copy of procedure that produced error. --------------------------- ver 3.1.4 Lots more Formatting/Fixes. Added Button-menu to allow quick access to common sub-sets of formatting. NOTE: Indent/Format now powerful enough to be dangerous. Will add backup protection next. ver 3.1.1 small bug with line continuation and Declare fixed. ver 3.1 Fixed bug with line continuation in procedure heads. Added more formatting options.

ASP_Volume2 #27157
cls_TextAnalysis(updated)

a class that performs basic text analysis using the Split command. Count characters, words, punctuation and layout characters. Thanks to merlin who found a bug in the basic countChar routine (answered 1 if there was no text in serch string) and 'Word counter *Excellent' who inspired me to attempt it. ----------------------------Thanks to Min Thant Sin for finding two bugs. Fixed the bug for blank text. Corrected the word count to give correct count. Also extended the class by adding the ability to set acceptable punctuation to allow hyphanated or underscore connected words to be counted as one. Included a bas module that contains the same concepts but designed to be used without the full class being impelmented, just take the bits you want, this bas module uses Paramaters rather than Properties to operate. (NOTE the bas file is not used by the demo).

ASP_Volume2 #27379
CODE FIXER 2.9.9

NEW VERSION 3 NOW AT http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=59247&lngWId=1 Will leave this here as a safety for a couple of weeks. This is a VB6 ( SP5 or SP6 required for ListView to work properly , Thanks Ariel) Add-In which allows you to indent code, find and repair/improve code for greater efficiency and readability and includes a user friendly replacement for VB's Find And Replace Tool. ------v2.9.9 several small tweaks mostly rare conditions or recent stuffups (See history.txt for details). --------------------------------------------- Quick search for 'CODE FIXER HELP FILE' to get the help file (You will need it!) The Find Tool component is designed to be permanently docked with the VB IDE(See Launch on Startup button on Settings screen). While this takes screen real estate, unlike VB's own find tool, it doesn't hide the code. I find it easiest to use if docked at top of the IDE under the VB toolbars. --------------------------------------------- WARNING All care; No responsibility. Some of the fixes the Add-In performs are capable of damaging code. Please use on copies of your code or use the built-in backup systems. --------------------------------------------- See readmeCodeFixer.txt in zip for installation instructions. -------------------------------------------- All bug reports gratefully recieved. If you have sent me one previously please check if I have patched it and let me know if not. -------------------------------------------- Thanks to Ulli for original inspiration and to the many who have assisted me with bug reports (you should find your name somewhere in the code, the thanks.rtf has been removed to keep the zip size down). --------------------- NEW NEW NEW NEW New item on CF menu 'Fix & Format (Ctrl Def Prop)': Because of the way it works the Default Property fix can be very slow, is unlikely to be needed more than once per project but it requires data gathered during the normal fix cycle. I know its an ugly menu item but until I think of a different, way to present this will do.

ASP_Volume2 #27387
clsPlanet: Class to Draw a Solar System ver 2

A single class capable of drawing the solar system from Sun to Pluto (including 1500 asteroids). NEW: Retrograde planets/moons now possible, coloured labels, more comments in code, more accurate numbers, more real moons. You can easily add more or design your own solar system. . Thanks for inspiration, assistance and support to Peter Wilson whose upload 'A Simple Solar System Simulator, v1.0' http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=47973&lngWId=1 inspired this. -------------NOTE--------------------------------- If it runs too slowly reduce the number of asteroids at Private Const AsteroidNumber As Long = 500 . I have run it with up to 5000 but the graphic is not that much different and very slow. ---------UPDATED-------------------------------------------Thanks to Peter Wilson who improved his zooming code and kindly sent it to me. Upgrade 1 notes: Added a new solar equator view, labels for planets and moons, improved collection based functionality, Asteroids do not display orbits (un-comment piece of code if you like that). All orbits are now eliptical and Pluto has its eccentric orbit . Planets have extra properties (oblate= Flat). ------------ CODERS this class automatically produces the labels it needs to operate without a seed control. Cute Trick extended on article in Computer Shopper Jun 2003.

ASP_Volume2 #27838
Polygon Screen Saver IV

Added a few new properties and tightened up the code. Inspired by 'Bouncing Polygon screensaver' by Brian Adriance at txtCodeId=52063. Converted to allow more variety of shapes. Collision detection and all basic ideas are thanks to Brian Adriance. I rebuilt some of his routines to allow faster or more various values to be used easily. Sub DrawPoly is mine designed to allow a random number of points to be drawn. The polygons change shape in an orderly way cycling for min to max points then reversing direction. While you can use it as a screen saver (with random setting of number, speed, points and fatness) you can also experiment with the appearance by Left-clicking on the screen to show a form which allows you to play with the settings or by Right-clicking you can randomize the settings again. To stop the screensaver hold down a mouse button and drag it or press any key. NOTE Small bug causes initial bad redraws when timer fires but the clear up on next collision.

ASP_Volume2 #28052
PictureFrame UserControl

This is a response to Ralnautikuus upload 'BackBorders' txtCodeId=55728. Still not perfect but cute. You can create a decorative form which conceals additional controls behind the decorations, by modifying the menu on the UserControl you can extend or limit the end-users ability to interact with the control. ----------------------------------------- Suggestions, bugs gratefully accepted.

ASP_Volume2 #28132
Quicksort Word Tricks

Inspired by Evan Toder's 'EvanSort' I pulled together some of my QuickSort Array manipulation stuff into a single module. Enjoy.

ASP_Volume2 #28196
Binary Finger Counting (User Control version)

Teach yourself to count in binary on your fingers. Includes a couple of simple finger games, let me know if you develop others and I'll add them. Converted earlier program to use a tidier UserControl. Fixed a logic error one of the games.

ASP_Volume2 #28235
clsRandomObject

This class simulates several common random objects (coins/dice/cards) and provides the ability to extract either a single member of a random range or an array containing a shuffled array of the full range of the object. Also supports random letters, vowels & consonents(standard English only), numerals(0-9), RndWords or user created ranges. Please let me know if you extend the letters to cope with other languages.

ASP_Volume2 #28259
What is 'Conflicting names were found....'? (update2)

An occasional irritation when downloading is this messagebox appearing while loading a project. This article and code demonstrate it and explain how to fix it. The program in the zip has had this bug inserted deliberately, just click a button and continue to load. The article is an html file so you can view it directly or read it from the demo program. If you haven't seen this before you are lucky, just stick the article away somewhere for the day when you do face it. ----------------------------------------------------------------------- The article also discusses some other ways to use NotePad to repair some other problems with VBP files. --------------------- Thanks Kevin Wigbels for finding another way to trigger this message and another place VB stores a FormName, I have updated the html file to include it and called this way of getting the msgbox Keven's bug in his honour ;).

ASP_Volume2 #28355
Another Assemble a Form on start-up (Update 1)

This is a modification/rewrite of Chris Seelbach's 'A$$emble a Form on start-up' . I have used a suggestion of Luke H in his comment on 'Dr. Fire Transparent Control' to make the effect more impressive if you use XP. (it will run in earlier versions but lacks transparency). I have also modified the code 'Capture Active Window The Inventive Way (without API calls)' to allow the my code to capture a live image of the form it is pretending to assemble. A couple of new Start and Build modes and better comments. --------------------------------------- Updated: Thanks to Raul Fragoso's 'Verify if a point is inside a polygon (convex and non-convex)' I have now included a version of Chris's original wedge drawing.

Languages
Top Categories
Global Discovery