Works well in VB4 show run time error 53 with VB6
Hi, I'm trying convert an old VB4 program to VB6, and show a running error 53, please see the full code attached. Thanks Function OpenFileInputRead(tFileName$) As Integer OpenFileInputRead = FreeFile...
View ArticleSuperTrim Function for strings
I created the "SuperTrim" function, quoted by Gary Cornell in "Visual Basic 6 from the Ground Up": the function removes excess spaces in a string. Compared to the example found in the book, I have...
View ArticleVB6 API Viewer Database Editor
Here is a small utility i wrote that allows you to edit the api files that come with the API Viewer 2004. The APIViewer2004 is a nice upgrade from MS's old api viewer made by Christoph Von Wittich, but...
View ArticleSimple Statistics
Mar 03, 2018 Added more features. And continued polishing. ---- I've started a similar CodeBank thread before, but I'm now thinking I went too complex, as there was no interest. Just looking around...
View ArticleURLEncode in UTF-8 with Visual Basic 6 (Sending Unicode SMS message)
After searching this forum and the internet for a few days and did not get what I am looking for I stumbled upon this and tweaked it a little bit because it had a problem with encoding vbCrLf. It all...
View ArticleRound Function
This round function round at 0 to 13 places, and a -1.5 turn to -2 and 1.5 to 2 While upgrading M2000 Interpreter to work with Currency and Decimals, I make this function to work with decimals,...
View ArticleCopy data from external Listview/Treeview/Listbox/ComboBox/IE Window
This is handy code to have around in case you have to scrape data from an external application for some reason. Drag the cross hairs over the target window in an external application (or in the demo...
View ArticleVB6 - Personal Chat
PChat is a 2 part program consisting of a server component and a client component. The client component (PChat.vbp) runs as a Desktop Application, whereas the Server component can run as a Service or a...
View ArticleRound Colorful Forms
Ok in its raw form this is really quite useless but it contains several interesting parts that can be put to greater use With this code you can create a round, color changing form that can be moved...
View ArticleIEEE Doubles: NaN, Infinity, etc.
When doing math that may have problems, I've traditionally resorted to Variants and returned a Null or Empty when things didn't go correctly. However, that's never felt totally clean. Lately, I've been...
View Article[vb6] Enhancing VB's StdPicture Object to Support GDI+
This is my second version of the logic first introduced here. That version will no longer be supported. This version offers so much more: 1. GDI+ can be used for improved scaling for all image formats...
View ArticleVB6 - Elliptical Curve Diffie Hellman (ECDH) Demo
The heart of this demo is the "GetECCKey" function. It is a dual purpose function, requiring 4 supplied variables (pAlg, KeyLen, bPublicECCKey, & bPrivateECCKey). "pAlg" is a pointer to the wide...
View ArticleRemember Form's Position for Next Execution, Multi-Monitor
Here's something I just cobbled together for a project I'm working on, and this occasionally comes up in these forums. It's a couple of procedures (with support procedures) for saving the last position...
View ArticleVB6 - Remember App window Position and Size
Attached is a demo of saving and restoring an application position and size. Rather than hijacking Elroy's thread, I decided to create a new one. This code is further simplified from the code that I...
View Article[VB6] Neural Network
Since a neural network is missing in the codebank here is my version: It's very simple. It initializes with "CREATE" Code: NN.CREATE Array (2, 2, 1), 0.25, 4 -Where Array indicates the NN topology...
View ArticlePNG (specifically 32-bit RGBA type PNG) Editing Tool
Hi All, This was a request and I thought it would be fun. It turned out to be quite the learning experience. Basically, I've developed a tool for editing the Gamma, Brightness, or Contrast of a 32-bit...
View Article[vb6] GDI+ Image Attributes Intro & Usage
Thought it would be worthwhile sharing some information regarding GDI+ and its Image Attributes object. Specifically, we are going to discuss the color matrix. This is a 5x5 matrix/grid, variable type:...
View ArticleVB6 - Sort Routine
Shown here is a sort routine that utilizes the built in Command Line sort function. Outside of this routine, a file is loaded into a Textbox and the file name is saved in "m_Filename". The user is...
View ArticlePNG/TGA (specifically 32-bpp type files) Editing Tool
Note, this project uses mscomctl.ocx version 2.2. If you have an older version, the project may not load correctly for you. To fix this problem, you will need to update your mscomctl.ocx. Here's a link...
View ArticleStandard API Color Picker
It's strange that this doesn't have more of a presence on these forums than it does, but hey ho. Attached is the my ChooseColorAPI wrapper that I've just polished up. Here are its features: It just...
View Article