Advertisement

Results for "Author: roger gilchrist"

ASP_Volume2 #28475
VB binary file embedded graphics extractor(update)

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

ASP_Volume2 #28606
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_Volume2 #28607
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_Volume2 #28642
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_Volume2 #28643
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_Volume2 #28658
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_Volume2 #28690
Transparent Tiler 4

Back again. Draws coloured tiles over any picture, looks better than it sounds (see screenshot). Ambiant light problem solved brilliantly by redbird77. API working thanks to Carle PV and Robert Rayment who both spotted my dumb mistake in passing the wrong values into the colour setting (took a while to notice it even with their help, some times your brain just won't work, eh). redbird77's code allowed me to activate the Ambiant colour parameter and add another one (Intensity). Aslo increased the number of bevels the demo allows to 200 (there is no real limit other than time) This allows you to create a single tile on a reasonably large picture giving a nice frame or curved (Hard edge Off) effect. If the bevel number is high enough the whole picture will be tinted, play with transparency and Intensity controls for best effect. --------------------------------------------------- I have also cleaned up the code a bit (removed some unnecessary Optional parameters) and created 2 modules; one using pure VB, the other API. I recommend that if you want to use this you use the API version it is about 40 -50% faster especially with large numbers of tiles. There is a simple (and not very good) timer message so you can compare the two versions. --------------------------------------------------- This demo takes advantage of a weakness in VB; it doesn't notice if you have Private routines with the same name in different modules, so both modules contain the some of the basic support functions. This is a potential source of bugs in code, if the 2 routines are not exact copies of each other. In this demo they are exactly the same, I could also have renamed them by adding 'VB' or 'API' to end of names as i did with other routines (which are not identical). Alternatively a single copy of the routines declared Public (in a 3rd module or either of the exiting modules) would work but would make the modules less portable.

ASP_Volume2 #28708
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_Volume2 #28731
simple clock (a lot less than 46000 lines ;)

OK I'm pretty sure that the Jornak D'teires 'Alarm Clock v1.1 w/ 46000 lines of code ' is a stunt/fake but I'd like to see the code that wrote that @$%#! (I pray it wasn't Cut'n'Paste or hand-crafted) but it was a challange so here's my answer 36 lines; 34 if you grant me the line continuation formatting; 31 if you ditch the Form_Load and set the Visible status of the dots in the IDE( one True /one False) Not a brilliant clock but I kind of like the LED function for elegance

ASP_Volume2 #28738
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_Volume2 #28780
Extract VB Binary data 4

VB Binary files are where VB stores any data added to a form/designer/usecontrol/property page in the IDE (either through wizards or the Property window). These are the .frx, .ctx, .dsx, .pax etc files that vb generates. THe advantage is that you don't need to provide the original graphics, the disadvantage is that it can be hard to access/edit stored this way. This program allows you to extract that data for easier manipulation. ----------------------WHATS NEW------------ This version can extract Text and List/Combo data as well as graphics. At present the data is just dumped to text files. To reincorperate it in your code you will have to added the necessary code. --------------------WHAT'S FIXED----------- FIXED error in code meant that dsr(dsx) files were ignored. IMPROVED Speed up in file scanning. ------------------WHAT'S MISSING----------- Not yet able to extract TextRTF from RichTextBoxes. Any suggestions?

ASP_Volume2 #28904
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_Volume2 #34348
ClsExtendedRTF Ver 2a for RichTextBox

ClsExtendedRTF Version 2a OOPS SMALL UPGRADE FORGOT ABOUT LOW RESOLUTION SCREENS sort of fixed that and there's a small animation demo added as an apology. This code manipulates the underlying Rich Text format string in RichTextBoxes in several ways. Highlight text, add interesting, strange and weird formats to RTF text. Resize mixed sizes of fonts with one call. Add a Zooming ComboBox to any RichTextBox. CommonDialog is encapsulated to give File New / Open / Save / SaveAs / SafeSave and Reload functionality. ShowColor is also encapsulated. This is a more stable version of this code. Insertion point is preserved after changes to text. More of the work is done at string manipulation level. New details added see * below for version 2's new elements. Minimum Requirments Riched20.dll (version 3) Riched32.dll (5.00.2008.1) probably the Richx32.ocx control Highlight now comes in two flavours RTF and API there are advantages and disadvatages to each. Menu and Toolbar use API; Text Colour Panel (in Font Looks menu) uses RTF Incorperated my ClsManifestation (see help) It is behind the spanner button on the tool bar only useful in WindowsXP to choose between XP and Classic look for compiled demo. Does not work in IDE. Font Looks menu contains to Forms which can be added to other programs to give maximum freedom of using the Font format and colour options. Added new font colour choices. Improved Demo performance. Corrected many minor bugs(extra spaces, spaces being deleted) Added Zoom ability Broke up the original ClsExtendedRTF into a couple of separate classes. Rewrote, simplified and often renamed routines for speed and comprehension Please comment, vote and send me interesting formats you develop and I'll included them with acknowlegments. Feel free to take just the parts you want (leave copyrights etc) this class is still 'Under Construction' if you like check back for updates. Demo Program is also a test bed for experimenting with RTF. 'ExtendedRTF Code for VB6.rtf'is both the help file and the demonstation file and was created interactivly with the code. NOTE uses VB6 only routines but if you have work-rounds for them should work with VB5, VB4. Needs more recent versions of RichText control. ExtendedRTF provides: 1. Highlight (NOT the same as select) *more ways of accessing this facility. 2.Other Underlines wave,dot,dash, dashdot, dashdotdot, hairline, and thick. (word and double are partially supported; you can set them but they appear as single in RichTextBox, in Word they look fine) 3. Hidden text/images 4. Weird font formats. Ripple, HeightRipple, Ransom 5.Font colour schemes *Rainbow, *Spectrum and *Materials. 6.subscript, superscript,up and down RTF codes. RichTextBox recognises '\up' and '\dn' with as superscript but not '\sub' and '\super' ???? 7. Get current insertion point as percentage of total document 8. Remove excess spaces in selection or whole document. 9. File handling: routines to simplify standard New/Open/Save/SaveAs. *Reload routine reload last saved document without opening CommonDialog *Document loaded in IDE is automatically reloaded from disk. SafeSave routine place this in your exit program and file procedures and you'll never lose your edits again.

ASP_Volume2 #34670
clsExtendeRTF ver 3 for RichTextBox

ClsExtendedRTF.Cls version 3 for RichTextBox extensive rewrite, recode and rename. Mostly about manipulating RTF code to change text and background colours. Now includes API and RTF based higlighting(Not selection, this is the RichTextBox equivalant of highlihter pens). Highlighting with: API advantage it can detect highlighting; disadvantage single colour at a time RTF advantage multicolour highlighting. disadvantage can't detect itself. ClsAPIZoom for RichTtextBox, a few lines of code and your RTBox is zoomable. cLsManifestation (incorperated from my other upload) Gives compiled program user's choice of Classic or WindowsXP(if they have XP) added panels(form) which give you greater control over highlight, text colour and text format. *New* Materials interface you can create your own materials colour schemes. *New* Styles; if you create a text and background colour scheme you want to reuse save it with a name and access through the RTF Font Painter tool and class. fixed small bug in RemoveFormatting which added a space to start;(if selection was at start of doc) see earlier versions for mor details.

ASP_Volume2 #35141
clsStackCollection

Cls StackCollection Use VB's Collections to build stacks and queues. Also included a safety wrapper for collections. To operate as a stack/queue you do not need a separate key, everything is done using the index This class adds new Methods and Properties to VB collections. ArrayFromCollection Put contents of stack into an array ArrayToCollection Load members of an array into the stack Bottom: Returns first value added to stack Clear: Empty stack in one call Exists: Tests if index/Key is in stack. Uses error trap to test Optionally runs silent if error occurs Extract: Remove any member from stack Invert: Reverse order of stack Max: Returns the highest alphanumeric member of stack Middle: Returns Middle member of stack Min: Returns the lowest alphanumeric member of stack. Pop: Use collection as a LIFO (Last In First Out) stack, removes member from stack. Pull: Use collection as a FIFO (First In First Out) stack, removes member from stack. Push: Wrapper for VB standard Add. Push is used by both LIFO & FIFO stacks. QuickSort: Sort stack into alphanumeric order RandomMember: Extract a random member of the stack(Optional RemoveIt as Boolean = False); if True remove from stack Replace: Change the Item for an Index/Key Shuffle: Randomise the contents of the stack Top: Returns last value added to array I have also included a class ClsSafeCollection which wraps the standard collection in a safety net Add: Modified to allow you to cope with the various error conditions that can occur Count: VB standard Collection.Count Item: Modified to allow you to cope with the 'Index/Key does not exist' error Remove: Modified to allow you to cope with the 'Index/Key does not exist' error Please comment and vote. May just have reinvented the wheel for many of you but hope you find some use for it. Feel free to use all or parts of this but leave copyrights in place and let me know about it at rojagilkrist@hotmail.com

ASP_Volume2 #35142
Font Properties with AddressOf

This is a demo of how to use AddressOf to obtain information about font families. Unfortunately AddressOf cannot work from classes so it isn't exactly what I needed but it is useful. You can quickly fill a listbox or collection with font names meeting specific conditions. Some FontTypes are not on my system so while I built a detector for them I cannot be sure they work. Comments and votes welcome. Feel free to use all or parts of this but leave copyrights in place and let me know about it at rojagilkrist@hotmail.com

ASP_Volume2 #35506
PC Speaker Piano Keyboard

PC SPEAKER MUSIC KEYBOARD ClsKeyBoardPicture.cls OOPS! small upgrade. There was an error which meant a mouse move could change the duration value if there was too long between playing and outputing text. Also small change to the 'skins'. The speaker I mean the thing that goes beep to give POST messages during bootup,not built-in's multimedia stuff. This is a keyboard in a picture box class. It is part of a larger project but just to show that it is really free standing here is a small demo. The keyboard in this demo plays the PC internal speaker, and also outputs simplifed Basica and Nokia note codes. The keyboard has 3 built in 'skins'. Basica was a DOS ancestor of VB when the internal PC speaker was THE sound system, 16 colours was fantastic and 1 MB drives were a dream. This is a sub-component of a more complex notation writer with error checking and auto-correction that I am working on. Comments and votes welcome.

ASP_Volume2 #35942
PC SPEAKER MUSIC KEYBOARD Version 3a

Version 3a: Update in response to reported error. FIXED: Translation of sharps between codes, first note dotted error. NEW:The New Basica Trick called BasicaRealTranspose is misnamed; at present it creates rather interesting changes to a tune but does not Transpose. This is a keyboard in a picture box class. The keyboard now supports almost all of the Basica Play command code (excepting those bits that can't be, or don't need to be, reproduced inside Windows). Basica and Nokia Composer and RTTTL code now allow dotted notes. Many examples in each supported code. There is a player piano mode when playing back code strings. There is a Nokia ringtone safe mode. The keyboard has 4 built-in 'skins' and a safety routine which keeps the colours safe. You can generate random skins and save them to a file for adding new 'skins' to the code. I have incorperated the code necessary to use the class in pre NT systems (thanks to Bob Richards for this code ('Quick Search' for "PC Speaker" to see original) but you will need to download the free .Dll file WIN95IO.DLL which is available from http://www.softcircuits.com (For Win9xMe systems ONLY, the file WIN95IO.DLL may be copied to the Windows/System folder or just drop it in folder with my code) The PC Speaker is not a multimedia add-on it is part of most computers' bootup system, the thing that goes beep (just once if all is well). If you don't hear it, check that you have not disabled it from SetUp or disconnected it while tinkering inside your machine. One day you will want to hear it as it signals that something fundemental has gone wrong (over the years; hard drive cables disconnected, unplugged keyboard and loose memory chips in my case). Also includes a work in progress clsVirtualScoreSheet. View code as traditional score. As you will see this is not fully developed and assumes 4/4 time for all pieces but does not quite achieive it. Useful for inputting from score sheets as you can check that you got the right note and duration. It does not scroll (yet) but it is resizable (just maximize the form). Hope to develop it to allow direct mouse editing of score as another input system. Comments, suggestions and votes welcome.

ASP_Volume2 #37794
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_Volume2 #38459
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.

Languages
Top Categories
Global Discovery