Results for "Author: lavolpe"
I know this is not truly a programming article. But I wanted to thank all of PSC for your continuous and generous feedback. Even negative feedback is positive when taken as an opportunity to improve weaknesses.
Updated posted bad example in previous upload. For your personal use. A slightly different method of exporting/importing a ListView. When I said listview, I mean all that pertains to it: This includes listview properties, its column headers & their props, its listitems & their props, the listitems' subitems & their props, the imagelists bound to the listview and its props, each image in the imagelist and its props. Additionally, you can pick and choose portions of what will be exported/imported. Note. The previous upload example for importing the reportview example did not ask to include control formatting, it should have. My mistake. No change to the class.
The attached class contains a lot of bit manipulation routines. Here are some of them 1) Right/Left shifting, both logical & arithmetic logic, both truncation & wrapping, 2) Get/Set any bits or a range of bits, 3) Convert data types and byte arrays to a string of bits, 4) Convert a string of bits to byte,int,long 5) CRC32 calcs on arrays and strings, 6) and many more. Let me know if you see any errors or potential improvements.
For those that like linked lists, heaps, hash tables, etc, here is a self-balancing binary tree. If you are not familiar with binary trees, I included an RTF document to help understand them. For the rest of us, we know a worse-case binary tree is a linked list, and a best case binary tree is probably a Red-Black or AVL tree. A close runner up is a binary tree that has nodes added randomly, and then a better solution might just be this, a self-balancing binary tree. The tree does not balance perfectly, rather it balances its height on insertions and deletions maintaining a worse-case O(Log n)+1 search time. Not bad at all ;)
A "fluff" tool for usercontrol developers. With the attached, one can easily supply their own custom dropdown lists for propertysheets. If a property is a VB enumeration (say AlignmentConstants), you normally get values like: vbLeftJustify, vbRightJustify, vbCenter for the property's dropdown and its displayed value. Wouldn't it be cool if it was displayed like this instead: Left, Right, Centered? Easy. Ever want or need a string enumeration, say a list of controls on the form or a list of available drives? Easy. Want to display your own dialog box for a property vs a property sheet? Say a FileName property that opens a commondialog? Easy. The attached has a sample project that shows how this can be done. 18 Dec 08... Found memory related bugs that crash. Thunks & mapped memory file modified as needed. Now tested compiled/uncompiled and in other apps (MSAccess). No more crashing; no errors noticed.
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.
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
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.
No longer updating this old project; just maintaining it. Latest patch (01Jun06) to fix bug in ReadProperties routine. Original description follows ===================== 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, < 100k using P-Code & minimal app size increase; not bad considering the common dialog is 138k. 6) No timer control used. 7) Reorganized to help follow code easier. 8) Comments welcomed, votes are up to you. Project inspired by Gonchuki's Chameleon Buttons v1.x. Last Update Uploaded: 30 Oct 2004/1405 EST to fix font problem. Last update 23 Oct 2005 to include a separate OCX project.
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.
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.
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.
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.
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. :)
A few posts recently on decimal>fraction conversions & thought I post a different approach. This one uses vector logic vs the brute force algorithms existing on this site. Enjoy. Patched to prevent negative values used in the Carpenter's Cheat routine.
For the paranoid: A simple test to determine if your window is being subclassed. This is a very simple demonstration & usage/expansion is up to you. Not much use without a form, huh? Oops.
[No code update; only added the missing RTF file]. Fastest non-tiled graph path finder. Extended my unique approach & believe it is 100% accurate and still very fast. This approach uses window regions to process open space very quickly. Where A* & Dijkstra require known distances between nodes, this project kinda explores on the fly, creating the needed link structure as it explores. Give it a go & if you want to discuss better logic/routines, please email me. P.S. Sorry about the large screenshot: wanted to show you the size of a graph & it's potential speed. Thanx goes to Stavros Sirigos for getting me re-interested in this project. Updated: a bit faster & fixed routine to recognize when start/end nodes in same regional rectangle. Updated 18Jun: added efficiency tweaks & correct path error that occurs maybe 1 out of 1000 paths.
While back I posted something like: 2 new borders for your picture boxes. Well how about 13 more? Trying to get a handle on the pixel measurement of borders, I was sometimes off by a pixel & couldn't figure out why. You know 1+3 should = 4, but interesting 'nuf thickframe(3)+staticedge(1)=2 and not 4. Anyway, if you wanted to know...
Don't have API Viewer freeware program? Don't bother downloading this. However, should you need or want to parse the API Viewer apv files from your code, a module is included in the zip. The parsing engine is fast & pretty well designed. The included interface to show a way of using the engine is not finished & no plans on finishing it. Required: API Viewer *.apv files (not included in zip)