Results for "Author: ulli"
This class contains the basic arithmetic operations (+ - * / mod) and a square root function for integer operands of virtually any size. A few helper functions are also included. There is no real limit on the number of digits but your memory size and time (up to a theoretical maximum of more than four thousand million digits). However, extracting for example the root of 10,000-digit number giving a result of 5,000 accurate(!!) digits will let you drink a cup of coffee while waiting (faster when compiled -- about 27 seconds on my 1800 Athlon). The Screenshot shows the square root of 2 with about 1000 digits. Download is 8 kB.
This Visual Basic Add-In will format your code for a generally accepted indentation - one tab per structure level, the tab width being obtained from the IDE. It will also check your code for some of the most common ommissions and traps. Included are a Code Printer, a Copy Facility, a Code Structure Viewer and an option to create WinXP manifest files and to modify your code to make use of them. Simply compile the DLL into your VB directory and then use the AddIns Manager to add it to the AddIns Menu. A few fixes and line number support. Download is 136 kB.
This little program lets you alter file dates: date created, date last modified, and date last accessed. Download is just 7.2 kB. Give it a try. Update now lets you also drag'n'drop files onto the app without using the browser.
Magnifies an area at the mouse cursor hot spot; size, shape and magnification factor can easily be adjusted at compile time. To terminate magnification move the mouse into the screen top lefthand corner. Download is 5 kB.
Find, decrypt, and show your Windows Digital Product Id (download is only 5.5 kB)
This AddIn will put all necessary instrumentation into your project to create a run profile. Then during execution profile data are acquired and finally evaluated and shown. The data include: ~ number of hits for each line of code ~ total time spent executing each line of code ~ average time spent executing each line of code ~ the code line itself ~ Timing accuracy is quite good and depends on the CPU high resolution timer (which in my AMD Athlon XP1800+ ticks about 3.5 million times a second giving a resolution of .279 µsecs), and utmost care has been taken to remove all data acquisition overhead effects from the execution times shown. Updates include check for isDirty (in which case you may loose the changes you made), better evaluation routine and printing.
This Add-In analyses all (or selected) controls in a form and assigns or generates the necessary accelerator hotkeys, ie those keys that you press together with the Alt-key to access a control (the underlined characters which are preceeded by an ampersand in code). The problem is that a different accelerator key should be selected from the caption of each individual control. To achieve this one has to generate all possible permutations to find the best solution where the accelerator keys are all different and as far to the left as possible.
This little container OCX works like dropdown combo exept that it can contain other controls. Dropdown and Collapse can be set to occur either on MouseEnter/Exit or on TitleClick. For those of you interested in how to use Mouse Tracking this is a good example because it uses Subclassing and the Windows MouseLeave and MouseHover system messages to control it's behavior. Try it, download is only 8.5 kB. Tested (and probably works on) Win32 only!
A Memory Mapped File resides in virtual memory from the moment it is opened until it is closed. This makes access to it very fast, in fact read and write merely consist of data moves in memory. All parts of the file are accessible by means of a zero based offset and the length of the data chunks you can transfer is only limited by the file size itself. The system will swap out and in pages of virtual memory as necessary. Only when you close the file the data are "lazily" written to disc, and the Physical Write Operations are limited to the altered memory pages. When you open an MMF you are required to supply an estimate of how large the file is gonna be. Any reasonable estimate will be fine, however, you cannot exceed this estimate, ie you can't extend a file while it is open, but you can truncate the file size to the actual size used when you close it. You can extend an existing file by giving the appropriate estimate when you open it and truncating it to the larger size when closing. MMFs are byte oriented and that requires a bit of understanding the data types which VB uses and how they are represented physically. The class contains tools however to handle the different aspects.
This is a game of Checkers which employs true alpha-beta pruning, iterative search deepening and principal variation move ordering. It runs to a ply of 12 to 18 analysing about 200,000 positions when given 30 seconds thinking time. I am not good at playing the game, so I don't know if it can be beaten - I haven't been able yet (with the planned moves list switched off) ;-[. The rules are included - found them somewhere on the WWW. This is an updated version with a few bugs killed and with Conditional Compilation to implement the American Checkers Federation Rules (where the pieces do not jump backwards). Other updates include: board editing, problem solver mode (solving a 17-move problem in under five minutes), better graphics, and piece and square highlighting. Found this in one of my arcives, so I thought I might as well upload it again.
How to keep the upper/lower case of Enumeration members
This demo application demonstrates the use of a Custom Tooltip Class supporting square and ballon style tooltips, centered at the corresponding control or at the mouse pointer hot spot, with or without title. Individual back- and forecolors are also possible as well as an assortment of Icons to be displayed in the tooltip and finally individual delay- and show-times. The code is easy to follow and well documented. And on top of that the class is very easy to use. Check it out, download is only 6.4 kB. (Sorry the screenshot didn't come out very well)
This is a KnightRider Custom Control with customizable Back- and ForeColors, Size, Speed, and Effect. The appearance and effects can be viewed in the IDE; that is it is already active in Design Mode :- just set the Enabled-property to True. It was inspired by a previous submission to PSC.
Simple Sound Mixer Wrapper Class plus Test Driver. Unfortunately the Mixer interface is rather complicated - maybe written by a musician *g* - so there are quite a few mystic API calls with plenty of params, mixer-constants with ugly names, cryptic structure types, and virtual memory address pointers from one structure into the next. And Micro$oft's documentation is slim, to put it polite, but I tried my best to put all that into a wrapper with a simple interface: You choose the Channel and SoundControl; this will return True if the selection was successful, and then Get or Let the Value. (Note that ALL values are in % - for booleans (like Mute) the value 0 means False and 100 means True - one hundred percent true, so to say).
This little AddIn toggles VB's code pane windows between normal display mode and full screen display mode. Simply compile the .dll into your VB folder and then use the Add-Ins manager to load it into VB. Updates include: safeguard against accidentaly closing a codepane or VB while in maximized state, and an emergeny fallback in case VB crashes while maximized. So the necessity to manually re-do the registry after a crash should have gone. Some of your feedback suggestions have also been added.
A little set of routines to prevent Windows from switching into StandBy or Sleep Modes. Use them if you have a long-running or overnight application which cannot be interrupted or suspended by Windows going into hibernation after a period of user idleness (as may be optioned in System Administration).
This AddIn will put all necessary instrumentation into your project to create a run profile. Then during execution profile data are acquired and finally evaluated and shown. New: You can now also replay your program code execution at different speeds. ► Bug reported by hedgehog fixed.
This Sort-Class can be used to retrieve the elements in a one-dimensional table of strings in either ascending or descending sequence. The table itself is not altered in any way by this process, rather pointers into the table are returned which point to the elements in the table in the requested order. Tests on a 1800 MHz Athlon processor have shown that the Sort is in fact the fastest I know, sorting 100,000 elements on a five byte random sort key in under 0.3 seconds. The speed varies only very slightly with the number of elements to be sorted, so one million elements take about three seconds to sort. Any special presorting has no measurable effect on speed (Quicksort by contrast is almost killed by a presorted sequence).
My son and I made this for his IT class. You set or reset the operands bits, the mode, and the injected carry; the binary result, the intermediate and final carry and the overflow bit are then computed and displayed by applying the actual logic in the diagram. Download 8 kB
The proper way to find out whether your code is running in the IDE or was compiled