Results for "Author: rde"
MsgLink - An Inter-Application Messaging Control v2. This is a complete and functional control that uses the Copy Data Structure to pass data between applications that utilize this control. It allows you to pass numeric data, strings, dates, currency, in fact all data types except variants, including arrays and udts, and arrays of udts (except arrays of variants and strings). Possibly could be extended to handle arrays of pointers to the data (strings and variants).
Explains the use of non-VB data types to help in converting C declarations to Visual Basic. 10k zip
Some very basic but handy tips for newbies (and maybe not so newbies). Hope you learn something. I've added quite a bit more to the article, mostly very basic info on the vb language, but we all had to learn this stuff when we started out.
This JPEG strip code is in response to a recent submission on JPEG info extraction. This code was developed by David Crowell using vb5, so don't vote. I posted it for those interested in learning more about the internals of the JPEG graphic format. Please follow Davids request to leave this zip archive intact if you re-distribute it. This is version 1, and David is still developing it, he has a freeware exe version 1.3 available at: www.ksurf.net/~bermania/prog/dessin/jpgstrip.zip I don't know whether sourse code is available.
Introducing a shellsort hybrid that slips pre-sorted data to a built in walker with a very fast smart-find (binary search) twister. This shell algorithm is founded on a very solid performer that was originally developed by vb2themax, and optimized further by several very talented coders, before I twisted a little more out of it in this hybrid version. Although this algorithm is optimized for re-sorting and reverse sorting, it also has been greatly boosted in raw outright speed to square up against anything, anytime! This is the fastest shellsort I know of by far*. This algorithm excels on both un-sorted and pre-sorted data. *A hybrid shellsort with a twist, and no bubbles.
Collection 1 of 4 (6320 out of nearly 30 thousand in all!) constants (flags) for the Windows API functions in 84kb zip!. The API documentation tells you what flags you need but not their values. Well here they are, as many as I can find so far, converted to VB constants. But be warned I have not tested them all so some may not work correctly, I don't know. Happy coding, Rd.
Collection 4 of 4 (7070 out of nearly 30 thousand in all!) constants (flags) for the Windows API functions in 83kb zip!. The API documentation tells you what flags you need but not their values. Well here they are, as many as I can find so far, converted to VB constants. But be warned I have not tested them all so some may not work correctly, I don't know. Happy coding, Rd.
I have come across several different solutions for testing for a file's existance, from Dir to opening the file, testing for error, then closing the file again. I remembered an article/comment by Bruce McKinney that influenced my solution to this problem and thought I would share it.
Hi. This is an MDI app work in progress. Many have asked after a way to open files into a single (previous) instance of a program. This demo can open multiple files at startup into one instance, you can drag-and-drop onto the running program to open files, and it can receive files to open when already running from explorer or the command line. It also includes working file handling code (open, edit and save files) and some generic menu items. It cannot yet receive commands like [print], this is yet to be added. I have eliminated the need for the MsgLink module which subclass's the window. By raising the LinkExecute event (I looked at doing this programatically but it also needed a hook) using DDE and a label on an invisible form. My idea was to use this form as a progress meter but I made it invisible, using an existing form would load the new instance when the DDE properties are accessed. I have used a RTB control on the child form which is likely to give you trouble. If so you can add your own RTB ref from Components and place it on the child form and name it rtfText. You do not need to size it as it will auto-size at runtime. Please don't complain too much about the lack of comments in the code (there aren't many I admit). I am working on it. Let me know if you have any issues with this working correctly. I've uploaded already to get comments and suggestions, so please DO.
When installing a file on an end user's machine, you should not copy an older version of the file over a new version. The InstallFile wrapper in the InstFile.bas module uses the VerFindFile and VerInstallFile API functions provided by Version.dll to copy files to the user's machine, and will not overwrite an existing file with an older version. The InstFile.bas module requires the GetVersionInfo wrapper in the VerInfo.bas module (also included) which uses several API functions also provided by Version.dll, most importantly the GetFileVersionInfo function.
Collection of lucky 13 modules packed with API wrappers, commonly used funcs, and some not-so common bits as well. Includes: AlertErr.bas (new) APITimer.bas Common.bas (updated) Conv.bas FileSys.bas FileTime.bas FindFiles.bas MemMaps.bas Misc.bas MRUFiles.bas MsgLink.bas ShellExe.bas WinVersion.bas (updated) UPDATED Now has NEW AlertErr.bas! This CHERRY mod includes the full GetClientSpec module code which it replaces so still 13. Must be lucky! Thanks to everyone who responded to my request for info to update the WinVersion module. Please give more feedback :)
AlertError module - this is a simple solution for handling and alerting errors when they occur. Rather than hiding errors away this module uses the philosophy of alerting you to errors right where they occur, while logging errors to file in the most convenient location when in your end-users space, all automatically according to the running environment. This module can *best pick* the log path for all running environments including when running as a compiled ActiveX component in/out of the IDE. Update inspired by Ulli's submission at: txtCodeId=56112&lngWId=1
These two simple wrappers can be used for setting and retrieving individual or selected file attributes without affecting the other attributes of the file. For example, to set the Archive bit of a file you should not just set its attributes to vbArchive (32), as this will turn off any other attributes currently set. Normally you would need to get the file attributes, add the desired attribute to the current attributes, then set them again. These wrappers just hide the details of this process. Update thanks to redbird77. +++++++++++++++++++++++++++++++++++++++++++++++++++ With the GetAttrib wrapper you can easily test the current state of an attribute. You simply specify the attribute(s) and the function will return True if the specified attribute(s) is set to on. You can specify more than one attribute and True will be returned only if all specified attributes are turned on. +++++++++++++++++++++++++++++++++++++++++++++++++++ The SetAttrib wrapper simplifies the setting of an attribute to on or off, and will be set as desired irrespective of its current state. You can set more than one attibute at a time (eg. SetAttrib(sFile, vbReadOnly Or vbHidden) will set these attributes to on, no matter if they are on or off, without affecting other attributes that may be set. +++++++++++++++++++++++++++++++++++++++++++++++++++ My first version of the SetAttrib function used 'Xor' to turn attributes off, but thanks to redbird77, I have updated it to 'Not' which has eliminated a limitation of my version. The bottom line is that you can set a files attribute(s) to on or off without needing to know the current state of the specified attributes, while not affecting other attributes that may be set.
This demonstrates the use of Objects and Arrays using simple examples. Shows the differences between objects and arrays, adding properties and methods, explains associative arrays, constructor functions, all by example. Although I have put it in the beginners section, experienced js scripters may find some interesting facts about arrays lengths, deleting items and more. Hope you find it helpful.
This is a complete and functional control that uses the Copy Data Structure to pass data between applications that utilize this control. It allows you to pass numeric data, strings, dates, currency, in fact all data types (except variants), including arrays and udts, and arrays of udts (except arrays of variants and strings). Update v3 removed the parent hook, and fixed a bug in passing UDTs and now works in both VB5 and VB6. Updated demo thanks to Zhu now shows Unicode strings.
These two simple wrappers can be used for setting and retrieving individual or selected file attributes without affecting the other attributes of the file. For example, to set the Archive bit of a file you should not just set its attributes to vbArchive (32), as this will turn off any other attributes currently set. Normally you would need to get the file attributes, add the desired attribute to the current attributes, then set them again. These wrappers just hide the details of this process. Update thanks to redbird77. +++++++++++++++++++++++++++++++++++++++++++++++++++ With the GetAttrib wrapper you can easily test the current state of an attribute. You simply specify the attribute(s) and the function will return True if the specified attribute(s) is set to on. You can specify more than one attribute and True will be returned only if all specified attributes are turned on. +++++++++++++++++++++++++++++++++++++++++++++++++++ The SetAttrib wrapper simplifies the setting of an attribute to on or off, and will be set as desired irrespective of its current state. You can set more than one attibute at a time (eg. SetAttrib(sFile, vbReadOnly Or vbHidden) will set these attributes to on, no matter if they are on or off, without affecting other attributes that may be set. +++++++++++++++++++++++++++++++++++++++++++++++++++ My first version of the SetAttrib function used 'Xor' to turn attributes off, but thanks to redbird77, I have updated it to 'Not' which has eliminated a limitation of my version. The bottom line is that you can set a files attribute(s) to on or off without needing to know the current state of the specified attributes, while not affecting other attributes that may be set.
I have come across several different solutions for testing for a file's existance, from Dir to opening the file, testing for error, then closing the file again. I remembered an article/comment by Bruce McKinney that influenced my solution to this problem and thought I would share it.
This demonstrates the use of Objects and Arrays using simple examples. Shows the differences between objects and arrays, adding properties and methods, explains associative arrays, constructor functions, all by example. Although I have put it in the beginners section, experienced js scripters may find some interesting facts about arrays lengths, deleting items and more. Hope you find it helpful.
Simple synchronize backups and remove duplicates utility Added option to remove empty folders after delete operations v3 adds the option to use file CRCs for exact matching - this helps in situations where time stamps are different when files are still identical. v4 updates the whole project to use the 'W' API functions to preserve unicode. v5 fixes a bug introduced in v4
This module is a wrapper for the unrar.dll freely available from www.rarlab.com Enables unpacking a specified file from a RAR archive, both to disk as a file or only to memory (string variable) as the file text. There are a couple of other posts on RAR archives, and extracting a single file from an archive has not been demonstrated, and I needed this functionality for my ZipSearch project. Thought others might be interested in this functionality - reuse as you see fit. Note that the declares for the library functions are named unrar and unrar3 depending on the version you have. Get a free copy of this DLL from: www.rarlab.com - Extras www.rarlab.com/rar_add.htm - UnRAR.dll ftp://ftp.rarlab.com/rar/UnRARDLL.exe Happy coding :)