A summary in sales/purchase invoice a necessary for clarifying levied tax details or something like that. In VB6 Report allows you use limited controls only (Label, Textbox, Image control etc)
A grid view of summary as follows may add some beauty to your report, isn’t it?
As you know, you can’t add a grid control to your Visual Basic 6.0 Data Report. So we need to alternate method. I suggest adding a screen picture of the grid instead of the using control, this can be quiet easy. Continue reading
Listing all printers with name, Port in VB6 is simple as listing default printer port using Kernel32 library . Today we going show you how to do this.
As usual we start with function declaration, then define a new function which add all information into a list box. Here we goes
Kernel32 GetProfileString method
Declare Function GetProfileString Lib “kernel32.dll” Alias “GetProfileStringA” (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long
Add printer information into a list box
Public Sub GetPrinterList(lstPrinter As ListBox)Dim PrintData As PrinterDim defprinterpos%
For Each PrintData In Printers
‘ Add printer name and port to list
lstPrinter.AddItem PrintData.DeviceName & ” at: ” & PrintData.Port
‘ Check for default printer
If PrintData.DeviceName = Printer.DeviceName Then defprinterpos = lstPrinter.NewIndex
lstPrinter.ListIndex = defprinterpos%
This sub procedure will take list box as argument, and add printer to this list box.
Call the sub
The final line of code just invoke the procedure and see what we have.
How to List all data tables from a access .accdb file in VB.net using the ‘GetSchema’ Method. This tutorial is quick access to the problem.
Let me show how to add a new field into an existing access database using Visual Basic 6.0.Using the tableDef and Filed object you can create new fields. Firstly, you need to create Database and Recordset object, mke sure the DAO access object library. Continue reading
How to add a auto complete feature in Microsoft Visual Basic 6 ?
With the help of some creepy code, we can save the entry into a data file temporarily and later we can use them as input for auto complete the name/place/text.
The code is work with Text box as well as Combo box. Drop the following code to a module call the methods defined. Continue reading
Here is how you can input and retrieve data into and from Microsoft Flex gridcontol in Visual Basic 6, just drag and drop and text box and flex grid. and do these code Continue reading
How to delete selected items from a data table (Access) in Visual basic 6.0 ? Users can select the item using a list view control.
Get the count of selected items first Continue reading