Category Archives: Visual Basic 6 (VB6)

HTTPSafeString

Makes a string http querystring friendly by replacing all non-alpha and non-numeric characters with the appropriate hex code. Helpful when using the wininet API.example: “(Find This)” becomes “%28Find%20This%29” Original Author: Greg Tyndall Inputs Text as String Returns String Code Public Function HTTPSafeString(Text As String) As String  Dim lCounter As Long  Dim sBuffer As String  Dim sReturn As String    sReturn = Text    For lCounter =… Read More »

fWait

Shells an app, then waits for that app to close before it continues processing. Original Author: Brian Cidern Inputs None — Assumptions Pseudo code:Uses API to get the OS dir (for 95/98/NT4/2000 compatability) and appends result with Notepad.exe. Shells Notepad, returning process id. fWait gets the app hdl and issues a Do Events until the exit code of the… Read More »

Select List Box or Combo Box Value by Index

This function will select the value of a List Box or Combo Box based upon the Index ID. This is helpful when you are trying to edit a record and want to select a saved value in a combo box or list box. Original Author: Cierra Computers & Consulting API Declarations Public Enum CtlTypeListBoxComboBoxEnd Enum Code Public Sub SelectInList(varID… Read More »

Add Users to Distribution List in MS Outlook

Purpose:”Several Visual Basic based functions that demonstrate how to create and administer Distribution Lists (DL) using Collaboration Data Objects (CDO).” This code was taken from Microsoft (Article ID: Q178787) and I made it into a class so all you need to do is plug in your info and your ready to. I have included the article in the… Read More »

AutoComplete Combo

Access-like AutoComplete of a dropdown combobox or a simple combo box based on what’s already in the list. Simple code but can handle backspace and delete and will finish the ‘complete’ on Enter keystroke or lost focus. Could easily be converted to a user control. Original Author: Dan Redding – Blue Knot Software Attachments File Uploaded Size CODE_UPLOAD34122152000.zip 9/3/2020… Read More »

Beginner Form On Top

Puts Your form on top. Original Author: Demian Net API Declarations ‘Put this in a modulePublic Sub FormOnTop(FormName As Form)Call SetWindowPos(FormName.hwnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, FLAGS)End SubPublic Sub FormNotOnTop(FormName As Form)Call SetWindowPos(FormName.hwnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, FLAGS)End Sub Code ‘To make your form on top:FormOnTop Form1’To take you off off of on top:FormNotOnTop Form1

Transaction Committ/Rollback

This code allows for multiple record updates to be grouped into a single batch style transaction. You can then either committ changes to multiple records, or rollback the changes in the case of errors or conditions not being meet. This code is ideal for month-end processing, or in a situation where there is the possibility of errors being… Read More »

An example of using MSChart

This is just a basic example of how you can add and manipulate data used with an MSChart. Easy to amend and change for your own use. Don’t get carried away 😉 Original Author: Sam Attachments File Uploaded Size CODE_UPLOAD33872142000.zip 9/3/2020 3:45:00 PM 4434

FunREBOOT

This code makes the app install it self. Then i will use the rnd-function to do different things… some of them is pretty funny… (my brother said that). Iam only 14 years old so don’t blame me for bad code! Original Author: ^RaPToR^ Inputs all in code Attachments File Uploaded Size CODE_UPLOAD33732132000.zip 9/3/2020 3:45:00 PM 36193

VB2POSTGRES

This code demonstrates how to access a POSTGRES SQL database on a LINUX box via an ODBC connection. The demo ( using RDO ) shows you how to create a table, wipe a table, insert data, select data, modify data and write the modified contents back to the database. Original Author: Veve Inputs Nothing Assumptions Nothing Returns Nothing Attachments… Read More »