Results for "Author: lavolpe"
Updated. Game--Battleship in space. A few twists on the original battleship like shields, scanning devices, cloaking. Play against another person or computer. A speed-play Salvo game option also. Built for my son, he thought it was awesome. Maybe yours would like it too. This update enables computer as opponent in all the games now. Part II has the optional WAV files (too big for one posting). Get Part II at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=40635&lngWId=1
Used to view huge files. I use daily to review last 1mb of 30+ meg files. Loads only portions of a file (by chunk size or percentage) instead of entire file & is quick. Feel free to use & abuse as you like.
Reusable form. Offers selection of trusted ODBC connections (system DSNs only) that are configured on a workstation. Results are ODBC DSN name and type of connection. Short & sweet. Looking for something your customer only has to click on, this is it -- no manual entry required.
A fun project -- magnifying glass. Can be used as is, but presented more for ideas. Fully commented and please read the main form's remarks before posting and ideas. Thanx in advance.
Just some examples/options of displaying disabled icons and or text. You are probably aware of most of these routines; but maybe not all... Enjoy; no feedback or voting requested. This project is too straightforward.
27 shaped regions from 3 functions can be used for custom buttons, windows or whatever. The logic used is pretty easy to follow so you can create even more shapes & add them to your collection. Also included is a simple but effective routine to add 3D-ish border to those shapes & could be used to apply borders to most custom shapes. A what-if project that took off but really can't use the code for anything right now -- hope you can find a good home for it :) Updated to include right triangles & showing a digitial timer as a practical example of using regions for drawing.
9,000 hits indicates you liked 1st version. Then, you'll absolutely love this new one. Complete rewrite fixing all known issues w/previous version and adding way too much to this iteration. ScreenShot hilites a lot of it. So heavily remarked it makes up 1/3 of the file size; a 250+kb html help file with pics, a fair sample project and something unique -- an optional user control you can add to your project while in IDE to view menus as they would look in run-time. Has its limitations, but works well. I'm looking for honest feedback, especially pertaining to bugs experienced on your system; this has been tested to death on Win98 & Win2K. I have been testing this for several weeks and each bug found, it seems I added a new feature. Figured if I didn't put this out now, I'd never put it out. Gotta stop sometime to smell the roses. Unzip the help file images to a folder named "ReadMe_files" then put the readme.html in the folder above that. P.S. honest feedback and the "pat on the back" votes keep us going. Thank you in advance. Last updated: 12 Mar/4:15PM Eastern.
Updated: Added checkbox/option button modes to include the diagonal buttons (Mode/Value Properties). Also included a custom shaped button that takes shape from its picture property. Some notes to mention: 1) checkbox face color intentionally made to look lighter than normal button face when Value is True. XP, Java, & Mac are best guess as to what it would look like. 2) Option button selections toggle other option buttons, but do not synchronize with VB's option buttons. 3) No change to round buttons; short of using anti-aliasing, could not figure a way for smoother look--experimenting with GDI+. 4) If compiled in app, adds 110k. 5) If compiled as OCX,
Knock-off of MSN's WHATword game. Caution: can be addicting. Enjoy. The multi-thousand word dictionary, sounds & needed graphics will be installed from the included .res file. Updates uploaded 22 Jun/1925 to include Hall of Fame & minor tweaks to random letter generator routine & updated help file.
Repost with Search Function> Just a cheat-sheet of sorts. Over 200 windows messages with their values and brief descriptions. Add it to your toolbox for referencing when subclassing forms, hooking, etc. Not much of a project but should be useful. Feel free to use & abuse as desired. :)
AI pathfinder for large maps - 2nd try. This is a unique approach and is fastest version I have to date. Submitted for your suggestions & feedback. Well commented. If anyone has seen an approach like this, please let me know. I would like to compare distance & heuristic calculations. Unlike most pathfinders, this one does not require fixed objects and can be used for quickly plotting paths btwn moving objects. For those of you that have personally requested to be updated on improvements to this code, I have sent you a personal copy. For all others, I have re-posted this project simply because the update produces a significantly faster result & is far more accurate to providing a shorter path. I'm sure this project can be tweaked to provide even faster results, but keep in mind the trade-off between speed and overtasking memory resources. Updated again for to allow user-defined accuracy and speed (use the AccuracyPct variable in routine: CreatePaths) 1 Feb 20:10 CST -- Now can find shortest path 100% of time & quickly.
A way to share memory fonts between dozens of DCs without creating duplicate fonts for each DC & without forcing you to track them. Just drop the included module in your project, add 2 lines to your custom controls: 1 to return a font handle & another to delete the font. Sample project included and code is commented. The idea is simple, want to create a font but don't want to duplicate it if one is already created, the module will check fonts it is managing against the properties of the font you want created. If it exists, the handle to the existing font is returned, otherwise a new font is created with the appropriate properties & that handle is passed. Destroying fonts are only performed when all instances of the font have been decremented to zero. Advanced category only due to the unique tracking system I employed.
Rotating captions are hard but doable. Keeping track of an accelerator key is complicated. This example has portable routines to rotate captions at 90 or 270 degrees & properly display the underscore on the hot key. In addition, you dictate where text is displayed by passing the bounding parameters. This will be used for a soon-2b-released vertical version of my buttons, so if you see errors, please let me know. Thanx.
Example how to rotate transparent icons & keep transparency. This sample project goes further by allowing creation of transparent icons from non-icon resources. My take: Making 1 icon is better than calling transparent bitmap routines 100's of times. Another mini-project for the soon-2b-released vertical version of my buttons.
A compilation of region functions & examples. Included is probably the fastest window shaping routine on PSC. Regions used to create shaped windows, regions used for simple animation, rotating & stretching regions, and using regions similar to FloodFill are examples shown. All are heavily commented to assist in learning.
Contribution to Julien Lecomte's post. AI path finder now goes diagonally too, less memory intensive. All credit goes to original author; if you wish to comment on the diagonal path routine, please do; otherwise any voting should go to the original author at www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=31654&lngWId=1
Another contribution to existing code. Very quickly sort a two-dimensional array containing any amount of members (ex: vArray(5,1000) by simply identifying the member of the array to sort on. This routine has links to the original authors' posts in the source. My only contribution was to tweak for use in more than a 1-dimensional & 2-dimensional/2-member arrays. Please no voting on this one; 99% of it is the work of other coders. PS. Revised by switching the array elements around properly,i.e, from vArray(1000,5) to vArray(5,1000). Revised once again (21 Nov) to offer fast search on sorted array & to properly handle non-zero based arrays.
Do you need to draw a large gradient area during window resizing? The slowness! Maybe an answer is to draw faster in poorer quality then when done sizing (i.e., Button Up), redraw in fine quality. The attached sample, if nothing else, is a good routine for drawing gradients between 2 colors. The extra code in the routines allows user-supplied quality values which when used with the example can show a dramatic decrease in the number of loop iterations required to draw in the different qualities/roughness. RePosted: Reworked calcs to account for the uneven left/right edges of thick lines.
A sneaky way to have your program pause for a window to close (Modal) without disabling your project (non-Modal). Uses subclassing & hooks with 0% cpu usage. So the Do:DoEvents:Loop not used which hogs 95% CPU time. Can be used for all-API windows or standard VB windows. Heavily commented too.
Part 1. Prequel to a full-blown skinning application. This part does not skin but attempts to completely control the window non-client area. Provided in hopes you will help identify any bugs on different O/Ss. Works well on 98/2K. The other parts of this project will be submitted after bugs fixed in this part and feedback has been addressed. Part 2 will be skinned version compatible with MDIs, Part 3 will include routines for custom-drawn menus. Heavily subclassed and heavily commented; but still a work in progress. Feedback is definitely requested especially pertaining to bugs and suggestions.