Advertisement

Results for "Author: roger gilchrist"

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

7_2009-2012 #232241
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?

7_2009-2012 #232242
Create AVI 2b

Convert ordered collections of bmp, jpg or gif files into AVI files. This program is based on 'Ron Hoebe's 'Create AVI' txtCodeId=29517. Also includes some file searching code base on 'NeO78's 'PDF Printer Class' txtCodeId=61936. And 'merlin's 'ProgressBar2Class (8 DrawDirections, XOR Caption,Time2End Display)' txtCodeId=23431 -------------------------------------------------------------------- See comments at top of frmAVI for details of use and limitations. There are 2 pictures in a Sub-Folder to give you a small start (Note the progressbar and bounce don't work for 2 picture sources) Use them to test FPS values. -------------------------------------------------------------------- 'WHAT'S NEW Added 'Fast Auto Name' button. Uses FolderBrowser for simpler folder selection and automatically generates an AVI file name based on foldername (numbers them if there is already an AVI file). Modified the FPS to allow fractions. At 0.1 each picture will last about 3 seconds. Improved button activation and deactivation. Once you have created an AVI you need to reselect the folder to make a new one (required to trigger the automatic naming routine for next AVI) Reduced size of sample images

7_2009-2012 #232243
VB Safety Net (1.4)

This Add-in combines 2 services. ------------------------------------------------- 1. VPB FilePath correction: For all those uploads that have the files but give you file missing messages when you load them. This fix searchs for missing files in the vbp file's folder, sub-folders and immediate neighbour folders (Sub folders of one folder above the vbp folder) and if it finds them rewrites the vbp path. If it can't find the file it loads the vbp into NotePad and suggests what to do. For your own projects it warns you if any of the files are unnecessarily distant from the rest of the project. ------------------------------------------------- 2. Malicious Automatic Code detection/blocking: Searchs the automatic launch procedures (those that VB can fire before you can even look at them) for code that may be able to attack your computer. This code is commented out before it can load. Also searches for hard-coded paths that may be used to attack EG "C\Windows\Systetm32\...". If suspicious code is detected it is commented out and VB will jup to the relevant position once the code has loaded. ------------------------------------------------- How it works: using FileControlEvents you can create a sub 'BeforeLoadFile' that intercepts filenames, while you cannot stop it loading you can open the file, inspect and modify it before it appears in the IDE. ------------------------------------------------- NOTE the add-in has no interface, it is designed to run silent unless you load code that triggers any of the messageboxs shown below. -------------------------------------------------------------------------------------------------- IMPROVED: 1.2 Sub-Menu added to allow you to turn off the more intense search that bugs so many. Added a USING SAFETY NET.txt to the zip with more details of how to use Safety Net. ------------------------------------------------ 1.1 You can now mark suspicious code as safe. On the Add-in menu you will find an entry 'VB Safety Net OK Stamp' simply place the cursor above the line you wish to protect and click the menu entry. 'SAFETY NET OK by <RegisteredName> <Date> <Time> This safety mark depends on your windows registered name so only works on your machine, on other machines the protective comment has no value. This prevents someone creating an attack that will be passed by Safety Net by protecting their nasty. (Well, if they know your registered name they could build a one-off attack) ------------------------------------------------- apologies for the path bug that reported vbp fiolder files as being in thewrong place (fixed) UPDATE 1.3 1 The Ignore Threat message has been changed so that its meaning is clearer: SAFETY NET Ignore Threat OK by <Windows_Registered_User_Name> <Date> <Time> 2 The Ignore Threat message is now inserted when Safety Net disables suspicous code. You can mark the code as safe simply by uncommenting the code and leaving the Ignore Threat comment in place. 3 removed some unnecessary code. 4 do'h forgot about the VBP Parent folder 1.4 Tightened up some of the code for path detection.

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

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

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

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

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

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

7_2009-2012 #232707
CODE FIXER HELP FILE

For latest Version 3+ change the 'txtCodeId=' number in the addressbar to 59248 File for v 2.9.7 New Fixes added. Check out improved Comments description page. This is the Help file for my Code Fixer Upload. Because it is large but doesn't change that much, I have decided to upload it seperately so that you don't have to download it every time I make a bug fix to the code. ---------- WARNING DO NOT USE CODE FIXER WITHOUT A COPY OF HELP------------- Not that it's hard coded (Code Fixer just tells you the help file is missing) but the program is a bit too powerful for 'poke it and see' use. ------------------------------------------------- Once you have a copy you need not update unless you wish. If there is a major change to Code Fixer that entails need for new help I will add a comment at the code Fixer page. For Code Fixer go to http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=53297&lngWId

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

7_2009-2012 #232720
PictureFrame UserControl v2

Version 2 This is a response to Jorge who asked how to save the picture including the frame. Uses code from 'Screen Capture Class Module' http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=24651&lngWId=1 . The class code has been merged into the UserControl. I also added UniqueName routine which creates numbered file names to simplify saving files, it simply adds bracketed numbers to a preset filename. I semi-hard coded it to App.Path & "\PicFrameCapture.bmp" you could edit it in VB or add a property that allows you to specify the name(be careful to include a default filename in case users don't supply a name. Version 1 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.

7_2009-2012 #232721
Quicksort Word Tricks

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

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

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

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

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

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

7_2009-2012 #232727
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 ;).

Languages
Top Categories
Global Discovery