Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Browsing all 1463 articles
Browse latest View live

As a Kinder Egg 3 in 1 Progress Dialogs Plus One Extra

I did find in MSDN that shell32 are using three (four) different progress interfaces (derived from the first one) for same things. Here are they listed as code snippets Code: '<---From here is from...

View Article


How to get the info from the shell about the headers in "Detailed" view

The information is the caption for every header item in "detailed" view with 0-based index. For example: 0 = Name, 1 = Size, 2 = Type, 3 = Date etc etc. You need any type lib that can handle...

View Article


Image may be NSFW.
Clik here to view.

Windows File API

In the past I have used the Binary File Access provided by VB6 using Open #x. Binary access is not supported by FSO (File System Object). I wanted to find out if file access using the Windows API was...

View Article

Image may be NSFW.
Clik here to view.

Code to Paste Excel data from the clipboard in a Grid

I needed for one of my application to Paste selected part of Excel sheet, including text, Format, colors.... into a grid (here ssGrid2 from Steve) After doing some research, I never saw such code for...

View Article

Image may be NSFW.
Clik here to view.

Read Barcode & QRCode within VB6 using ZXing

Here is code to read Barcode & QRCode using ZXing Just download the library, create the form, add the button & list Code: Option Explicit ' *** Structures Needed For Registry Prototypes Private...

View Article


Image may be NSFW.
Clik here to view.

Forked version of LaVolpe's FRX file reader.

As a note, this is ONLY for someone who is doing some external processing of VB6 FRM files, such as reading them directly and/or massaging them for whatever reason. In my case, I'm messing with...

View Article

[VB6] OpenStreetMap

OpenStreetMap I dusted off an old program from more than a decade ago. (An that time the OSM data was really very poor...) If I remember correctly it was published on PlanetSourceCode. I revisited it...

View Article

RichClient: CairoSurface

I have created a cCairoSurface from bytes like this: Code: Dim s As cCairoSurface Set s = modCairo.CairoSurfaceFromBytes(m_PngBytesBGRemoved) Next, I crop it so that all outer transparent pixels are...

View Article


InputBox with full unicode support v. 2.5 and v. 2.55

The possibility of calling InputBox with unicode support has already been discussed on this forum, but in fact, I can provide you with the correct source code of the InputBox function. v. 2.5 Code:...

View Article


VB6. Move a Window by dragging from any part of it

Good morning. I want to share this simple code. It allows the user to move the window, by clicking and dragging, from any point on the Form. The scrolling achieved is smooth and pleasant, just as if...

View Article

Help Needed: Resizing Images with Cairo in VB6

I'm using the Cairo graphics library in VB6 to work with PDFs by converting them to images for easier manipulation. My goal is to resize these images to a specific maximum width and height without...

View Article

Image may be NSFW.
Clik here to view.

A VB6 FRM to PY Converter

A VB6 FRM to PY Converter Assumptions: It is assumed that you are quite familiar with the VB6 form designer, and have at least a modicum of experience with Python and the VSCode IDE. The development...

View Article

[VB6/VBA] "modern" Version of IsLeapYear and LastDayOfMonth-Functions

Hi Folks, was watching this fascinating video this weekend: "Implementing Fast Calendar Algorithms" https://www.youtube.com/watch?v=J9KijLyP-yg And i caught myself thinking: Huh? I've been doing the...

View Article


Using a Collection for Sorting

I've discussed all this before, but it came up again in a recent post I made (although I don't think it was considered). Here's some code that allows using a Collection for sorting purposes (designed...

View Article

Subclassing At Its Simplest

There are several examples of how to subclass in this CodeBank. However, most go into complexities of how to "protect the IDE". I'm posting this to provide an example of VB6 subclassing at its...

View Article


Image may be NSFW.
Clik here to view.

INameSpaceTreeControl Sample

Here is a sample how to implement, take advantage of and exploit the "explorer.exe" built in TreeView Control. Basic Set Up for the INameSpaceTreeControl2: Code: Private Sub Command8_Click()   Dim pidl...

View Article

Simpliest way to get a pointer to IShellItemImageFactory

Here is the most simpliest way to get access to the images/icons/thumbnails!! All you need is a typelib that supports IShellItem and IShellItemImageFactory. Here we go!! Code: Public Function...

View Article


Do you wanna handle the Taskbar? Here is the most easy way!

All you need is a Typelib with access to ITaskbar and 2 and 3. Code: Public Function ShGetTaskBar(pITB As ITaskbarList) As Long   Dim hr As Long   Static CLSID_TaskbarList As GUID     CLSIDFromString2...

View Article

Subclassing made easy

This is an easy *and* somewhat useful subclassing which calls back into the form or user-control or whichever object instance the subclassing originates from. One could half-heartedly claim it is...

View Article

Image may be NSFW.
Clik here to view.

Take advantage of IThumbNailProvider

Here is a simple example how to to "skin" your form with a thumbnail. Since with this thumbnailhandler you can use up to max 2048 pixels depending on what source you use! I just choosed to make a...

View Article
Browsing all 1463 articles
Browse latest View live