Advertisement

Results for "Author: roger gilchrist"

ASP_Volume3 #59873
LED (20 Wires)

A more complex LED UserControl. uses a hacthwork of 20 'wires' to draw numbers/UpperCase letters. Another spin-off of the LED clock challange , but not in the running way more code than absoutely necessary (if no where near 64000 lines). Please feel free to adapt for yourself. Lots of comments in the UserCOntrol should help modifications/additions. ------------ Oops left the screenshot at home but it's only 8K so give it a go.

ASP_Volume3 #59874
Trace And Replay 3a (ClsSketcher)

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).

ASP_Volume3 #59875
Wandering Controls

A class that allows you to move controls around on a form or other container. There are several built in animated movements or you can specify a specific point for the control to move to. Using a timer it produces some interesting effects. No Screenshot, it's about movement. ----------- Thanks to Oscar Medina whose 'Marquees Marquesinas" at http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=58044&lngWId=1 inspired it.

ASP_Volume3 #59876
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_Volume3 #59877
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_Volume3 #59878
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.

ASP_Volume3 #59879
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' ;)

ASP_Volume3 #59880
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. '

ASP_Volume3 #59881
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.

ASP_Volume3 #59882
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

ASP_Volume3 #59883
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.

ASP_Volume3 #59884
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_Volume3 #59885
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?

ASP_Volume3 #59886
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.

ASP_Volume3 #59887
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).

ASP_Volume3 #59888
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.

ASP_Volume3 #59889
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_Volume3 #59890
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

ASP_Volume3 #59891
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_Volume3 #59892
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.

Languages
Top Categories
Global Discovery