Advertisement

Results for "Author: roger gilchrist"

7_2009-2012 #232728
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.

7_2009-2012 #232729
Optimized QuickSorts

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.

7_2009-2012 #232730
VB binary file embedded graphics extractor.

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' ;)

7_2009-2012 #232731
LED (20 Wire) v2

A quickie LED UserControl. LED20 because it uses 20 'Wires' to display characters (numbered 0 to 19 in case you're wondering) ' NEW in V2 Changed Font consturction and display routines to use arrays uses the Count property of Wire control array rather than hard coded values (Potentially allows you to add more Wires) ' This is a spin off from the LED clock challange but definitely not a contender (way too many lines) but I was more interested in the LED than the clock. If you look at the control in IDE you'll see that there has been no attempt to position the wires ahead of time. In case you do want to edit it please note that the form has been locked to stop unnecessary fiddling about. '

7_2009-2012 #232732
Peripheral Vision Game

This is a simple game built while doddling with a couple of recent uploads; Ryan Spencer's 'A "Button" Form' txtCodeId=61380 and aditya8000's 'Visible Light Spectrum' txtCodeId=61446. Instead dozens of hand laid buttons this code uses a runtime generated array of buttons and an abstraction of aditya8000's code to detect and draw some colours. The Spectrum drawing routine (mine not aditya's) is not quite right and a black edge may appear at some form sizes, however the colour to wavelength and wavelength to colour routines work well. Have fun.

7_2009-2012 #232733
Code Fixer 3.0.9

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

7_2009-2012 #232734
Code Fixer Help File 3

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.

7_2009-2012 #232735
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.

7_2009-2012 #232736
Lineart and Scrolling Picturebox (Class remix)

This is my remix of Arvinder Sehmi's Line Art and Min Thant Sin's Screen Scrolling code. I have converted their code to more easily reuseable classes. I have also optimized and enhanced (I hope)their code for speed and easy of use. The Line Art code has added effects and settings (some are only partial developed), is optimized for greater speed and I hope readability of the code. Thanks to 'Graphical Routine Maths' by Steven Paterson for maths to do some of the better ones. The Screen Scrolling code now has a way to centre smaller images and disable unneeded scrolling. The Class takes care of sizing all the necessary controls within a Frame. Also allows you to interlock two Scrolling PictureBoxes to each other with a single call. This class is an extensive demo of using WithEvents in classes. I think I 've imporved the earlier code enough to accept votes otherwise send them to the originals. 'Line Art Creation, And Edge Dection' by Arvinder Sehmi. 'Scroll Mouse Keys Move Pix' by Min Thant Sin COMMENTS, ENHANCEMENTS, QUESTIONS very welcome. Do you have/know similar routines that could also be included?

7_2009-2012 #232737
More Particles

This is a reworking of 'Geespot_Particles' giving many more options and settings to play with. Becasue this does not use the Shape control you can have many more Particles than before. This is also a demostration of my ClsUpDown (See other upload 'Decimal Fraction UpDown Class' for explanation). See http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=41231&lngWId=1 for the code which inspired this. I think my code is different enough to ask for votes but please vote for GeeSpot as well. Hope you like it.

7_2009-2012 #232738
How and why to add 'Start With Full Compile' button to VB ToolBars

Explains how and why to put a 'Start with Full Compile' button on VB toolbar. Works in VB4,5,6 and I think 3 (but its so long since I used that I can't remember).

7_2009-2012 #232739
RichTextBox picture import, resize, reorient, crop and export

Ver 4 Update on ClsPictureLoader. NEW Crop images before pasteing to RichTExtBox. OLD (But improved)Load picture to RichTextBox with resizing (width, height or proportional). Flip image Left-Right and Top-Bottom. Re-size inserted pictures proportionally with the class (better than doing it by the built-in RichTextBox behaviour). Export RTF document images to BMP. Improved interface with toolbars. Apologies to VER3 downloaders, I forgot that SavePicture is only BMP.

7_2009-2012 #232740
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

7_2009-2012 #232741
Removing Illegal Characters

Demo of routine to generate legal filenames, control names and variable names from any piece of text. Nothing original but check out the support procedures RStrip, LStrip and IsCharIntl for useful bits. Thanks Robert bug bixed

7_2009-2012 #232742
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.

7_2009-2012 #232743
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.

7_2009-2012 #232744
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)

7_2009-2012 #232745
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.

7_2009-2012 #232746
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.

7_2009-2012 #232747
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.

Languages
Top Categories
Global Discovery