Results for "Author: roger gilchrist"
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.
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)
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.
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.
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).
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.
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.
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.
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.
Inspired by Evan Toder's 'EvanSort' I pulled together some of my QuickSort Array manipulation stuff into a single module. Enjoy.
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.
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.
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 ;).
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.
The VB binary files (frx, ctx, dox, drx & pax) are where VB stores the image data for graphics you load into the objects from the IDE Properties window (or a Property page). If you forget to include it in an upload then people get log files complaining about missing graphics. It doesn't matter if you supply the original graphic files, VB doesn't know what they are. When you include the VB binary files in a zip there is no need to supply the graphics saving bandwidth and disk space. ---------------------------------------------------- However end-users have a problem; they are stuck with your graphics. With this program you can extract graphics (bmp, gif, ico, jpg, wmf (some loadable image classes extract as a different (legitimate) type; cur as ico, dib as bmp, jpeg & Tiff as jpg) from the binary files. The image may need editing or you might just want it to use in your own purposes (Ask first;)). Perhaps you want to reuse an image you included in your own code but can't remember where you stored the original? Another use is to extract large Bitmap graphics, convert them to Jpg (or other small files types) in almost any modern (that rules out MSPaint then;)) paint program and reloading them into the project. This will shrink the code considerably and often improve performance as the memory impact is lowered (there is some debate about this; VB has to do more work to display non-BMP images but the data is much smaller so may process more quickly). To assist with this the program names the files it produces with the format 'Form_Control_Property' making reloading them much easier. This code can also extract from ImageLists. NOTE ToolBar's images are stored in an ImageList so the filename will be for the Imagelist not the toolbar. ---------------------------------------------------- This is a major modification of Tony's 'Extract images from a VB project files' at . A great program I've used for ages. Thanks also to 'Light Templer' whose 'JES - JPEG EXPLOIT SCANNER' at while not directly used allowed me to understand and include a simple test for that threat. If the program can't find a valid file extention for the graphic it assumes that it is the exploit and warns of the risk (you can still save the file if you want but have to work past a couple of MsgBoxes). This may not be an accurate test, if you find an image type that VB allows you to load but this program doesn't extract let me know. Also inlcudes a modified version of my ClsScrollPicture.cls to display selected images. ---------------------------------------------------- Bug reports/suggestions very welcome. This project is an experiment prior to incorparating the functionality into Code Fixer. I hope I have included all the Image holding Properties and all the usable Image types but let me know if I missed any. ---------------------------------------------------- BTW does anyone know of code that can extract List/ComboBox data and large Label/TextBox data from binary files? I'll probably work it out but would be happy to 'borrow' ;) ---------------------------------------------------- What's New? Resized to fit on a 800X600 screen, improved image scroller. ----------------------------------------------------
QuickSort is one of the fastest sorts available but contains a couple of gotcha's. You cannot just stick any old QuickSort into your code; you have to optimize it to the data you are sorting. -------------------------------- This demo provides optimized versions for each of the major variable types (Integer and Byte are not covered but you should be able to work it out). It also demonstrates some of the problems with using the wrong QuickSort and demonstrates the sheer speed of QuickSort on different data types. -------------------------------- The other Gotcha is that if the data is nearly sorted then it can be very slow. But all of these QuickSorts also have a an asending/desending switch, if you suspect your data is near sorted then reverse it first. -------------------------------- A further optimization is that if you only need one direction in your code you can strip out the asending/desending switch improving speed greatly because you are not passing a parameter. -------------------------------- If you want both you could also use a Variable to control the direction instead of the parameter.
updated------------------------------------ The VB binary files (frx, ctx, dox, drx & pax) are where VB stores the image data for graphics you load into the objects from the IDE Properties window (or a Property page). If you forget to include it in an upload then people get log files complaining about missing graphics. It doesn't matter if you supply the original graphic files, VB doesn't know what they are. When you include the VB binary files in a zip there is no need to supply the graphics saving bandwidth and disk space. ---------------------------------------------------- However end-users have a problem; they are stuck with your graphics. With this program you can extract graphics (bmp, gif, ico, jpg, wmf (some loadable image classes extract as a different (legitimate) type; cur as ico, dib as bmp, jpeg & Tiff as jpg) from the binary files. The image may need editing or you might just want it to use in your own purposes (Ask first;)). Perhaps you want to reuse an image you included in your own code but can't remember where you stored the original? Another use is to extract large Bitmap graphics, convert them to Jpg (or other small files types) in almost any modern (that rules out MSPaint then;)) paint program and reloading them into the project. This will shrink the code considerably and often improve performance as the memory impact is lowered (there is some debate about this; VB has to do more work to display non-BMP images but the data is much smaller so may process more quickly). To assist with this the program names the files it produces with the format 'Form_Control_Property' making reloading them much easier. This code can also extract from ImageLists. NOTE ToolBar's images are stored in an ImageList so the filename will be for the Imagelist not the toolbar. ---------------------------------------------------- This is a major modification of Tony's 'Extract images from a VB project files' at . A great program I've used for ages. Thanks also to 'Light Templer' whose 'JES - JPEG EXPLOIT SCANNER' at while not directly used allowed me to understand and include a simple test for that threat. If the program can't find a valid file extention for the graphic it assumes that it is the exploit and warns of the risk (you can still save the file if you want but have to work past a couple of MsgBoxes). This may not be an accurate test, if you find an image type that VB allows you to load but this program doesn't extract let me know. Also inlcudes a modified version of my ClsScrollPicture.cls to display selected images. ---------------------------------------------------- Bug reports/suggestions very welcome. This project is an experiment prior to incorparating the functionality into Code Fixer. I hope I have included all the Image holding Properties and all the usable Image types but let me know if I missed any. ---------------------------------------------------- BTW does anyone know of code that can extract List/ComboBox data and large Label/TextBox data from binary files? I'll probably work it out but would be happy to 'borrow' ;)
This is a VB6 Add-in. It's purpose is to format, optimize and improve VB code. Many fixes are performed automatically and there are also many additional suggestions to improve your code. ---------------------------------------------------------------------- It also contains a user-friend replacement for VB's find and replace tool. ---------------------------------------------------------------------- This is a very powerful tool so please download the separate help file upload and read it for installation and operating instructions. ---------------------------------------------------------------------- If you have tried it before then it's time to up-date (or give it another go, there may have been a lot of bug fixes and improvements since then). ---------------------------------------------------------------------- Comments/bug reports welcome. Please contact me if you have any questions. Re-issued because the version number has rolled over and to gather some new end-user input so suggest away. --------------------------------------- Updates 3.0.9 FIXED debug Stop left in code, NEW fix Fonts properties in USerControls fix, Release folder has better naming see history.txt for details and thanks
Code Fixer Help File 3.0.4 This is the Help File for Code Fixer 3. It is presented as a separate upload so you don't have to download it every time there is a bug fix to the program. Help file is only updated if a new tool or fix is added to the program. For bug fix details see the history.txt file in the program zip file. --------------------------------------------------------------------------- WARNING Code Fixer is very powerful, 'Suck it and see' is not a good idea with this add-in. Don't operate it without checking the help file.
A class that allows you to create animated drawing images. To use the class all you need is a Form and a CommonDialog control. Menus are optional but useful. You can either draw your own images or load an existing image and trace it. ----------------------------------------- Tracing can either be with standard pen, where the user selects the colour used or a Duplicate Pen which takes its colour from the underlaying image. To assist tracing you can either draw directly on the underlying image or offset the trace output to any side of the underlying image. ----------------------------------------- The images are stored in a very simple (and large) file format called 'Sket' which is simply a hex description of the position, drawing phase(Start/Drawing/End), Colour and DrawWidth of a point on the lines you draw. This is a very inefficent file format which I plan to improve as soon as possible (so don't commit yourself to it too deeply) ----------------------------------------- Suggested by Lucim Lack's 'Retrace your Footsteps!' at http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=58084&lngWId=1 ----------------------------------------- UPDATE Fixed the save error (accidentally zipped the next to last version)) Added new hotkeys, improved data storage in the Sket file format(unfortunately this means anything you built with version 1 is useless) and added a Scaling method of drawing and some auto sketchers. -------------------------- Also thought of a use for this, and am building a screensaver engine which could use the Sket files as input. -------------------------- NEW NEW NEW NEW ----------- Minor update 'Save' now displays a progress report in caption bar as it can be rather slow if you have large data or high bit colour. Auto Dash now looks more like pencil strokes (use Width 4-8).