Category Archives: Visual Basic 6 (VB6)

Access ODBC DB using SQL and a Data Control

This code will allow you to populate DBGrids and other bound data controls using a Data Control, SQL, and an ODBC DataBase. Original Author: Scott Lewis Assumptions Create a new form with a DBGrid and a Data Control. Set the datasource property on the grid to use the data control. Set the DB name property on the data control… Read More »

A KeyCode to Strings Converter

It is a function that converts keycodes [probably used in ???_KeyDown events], to strings like “Ctrl”, “Alt”, “F”, “/”, which are recognizable to the end-user. Great for game programmers who have a key configuration form! Original Author: unknown Inputs KeyCode as Integer Assumptions If the user presses Shift+3, the function will not return “#”, but will return “3” instead.… Read More »

Multiple-User Rich Text IP Chat

A multi-user chat server/client that can support unlimited users, and uses rich text in the messages, allowing colors, font-styles and different fonts. The user running the server can kick any person logged in. Requires: RichTextBo control, Winsock control, and Common Dialog control. Original Author: Joseph Huntley Attachments File Uploaded Size CODE_UPLOAD1398.zip 9/3/2020 3:45:00 PM 9841

Creating a Screen Saver

Create a screen saver in VB! Original Author: VB Tips and Source Code Code In order to accomplish this task, start a new Visual Basic project. This example only requires a form – no VBXs or additional modules necessary. On the form, set the following properties: ÔÇóCaption = “” ÔÇóControlBox = False ÔÇóMinButton = False ÔÇóMaxButton = False ÔÇóBorderStyle… Read More »

Creating Program Manager Groups & Icons

Create program manager groups and icons from your code! Original Author: VB Tips and Source Code Inputs It requires 3 arguments to be passed to it. They are:1.The form that contains Label1 (x) 2.A string variable containing the group’s name (GroupName$) 3.A string variable containing the path to the group (*.GRP) file (GroupPath$) Code The first step is to… Read More »

Center an MDI Child Form Within the Parent

useful when you need to center an MDI child form within the parent windo Original Author: Chris Gibbs Inputs The SUB (CenterChild) requires two arguments. The first of these two arguments is the name of the MDI (parent) form. The second argument is the name of the MDI Child form. Code Sub CenterChild (Parent As Form, Child As Form)  Dim… Read More »

Rotate WMF

This program lets you rotate a Windows Meta File inside a picture box. Original Author: Emilio Aguirre API Declarations Some see code. Attachments File Uploaded Size CODE_UPLOAD1346.zip 9/3/2020 3:45:00 PM 51650

IsLoadedForm

Tells whether a form is loaded or not Original Author: Luca Faiazza Inputs ByVal pObjForm As Form Returns Boolean value Code Public Function IsLoadedForm(ByVal pObjForm As Form) As Boolean  Dim tmpForm As Form  For Each tmpForm In Forms    If tmpForm Is pObjForm Then      IsLoadedForm = True      Exit For    End If  Next  End Function

Determine when an app launches with SHELL is done

In VB3, you call GetModuleUsage() to determine when an app you started with the Shell command was complete. However, this call does not work correctly in the 32-bit arena of Windows NT and Windows 95.To overcome this obstacle, use a routine in both 16- and 32- bit environments that will tell you when a program has finished, even… Read More »

Create a form bigger than the screen!

The primary focus here is to allow you to display forms that are larger than the screen can show. Need an 8?¢” x 11″ Form? NO Problem!The size used in this example is 8?¢” x 11″, but it could just as easily be landscape, envelope, or any needed size. Original Author: VB Tips and Source Code Code Place a… Read More »