Category Archives: Microsoft

ChangePrinterOrient

NEW NOTE: FROM VB6 SP4 MICROSOFT HAVE ADDED A NEW PROPERTY TO THE DATAREPORT (orientation) WHICH HAS THE SAME EFFECT. SO MY CODE MAY NOT BE REQUIRED.Using VB6 DataReport writer I hit a problem where it didn’t allow landscape reports unless the default printer was already set to landscape. I didn’t want my users to change there printers… Read More »

Killer Button! (Jaws? hehe)

Don’t worry, it doesn’t kill your system or anything, it’s for those “Yes/No” or “Register Now?” boxes, or just for a laugh!!If the user clicks “no” (or yes if you swap them) then the other button gets angry and goes after your cursor, with a snarl on its face and eyes that watch you! But don’t worry! he’s… Read More »

Comma De-Limited

This code will read a file line by line and create a comma delimited text file which can then be imported into Excel. Original Author: Howard Lee Inputs FileRead = File To be read as inputFileOutPut = file that will be created as output Code Private Sub Form_Load ()Dim instring As StringDim outstring As StringOn Error GoTo ClnupOpen “FileRead.txt”… Read More »

Using the Browse Folder Dialog Box

You may have noticed that in Windows the Browse Folder dialog is used in may programs, even the shell if you have used the find program you can choose browse and the folder below appears.WITH NO NEED FOR MODULES!!! You can implement this dialog bow into your applications very easily by using the following API calls.SHBrowseForFolderSHGetPathFromIDListlstrcat Original Author: King… Read More »

Creating email and attaching a file in lotus notes

This code is to show how to create an email in lotus notes with an attached file Original Author: Stan Allan Code Private Sub CmdSend_Click()Dim oSess As ObjectDim oDB As ObjectDim oDoc As ObjectDim oItem As ObjectDim direct As ObjectDim Var As VariantDim flag As BooleanForm1.MousePointer = 11Form1.StatusBar1.SimpleText = “Opening Lotus Notes…”Set oSess = CreateObject(“Notes.NotesSession”)Set oDB = oSess.GETDATABASE(“”, “”)Call… Read More »

Conversion between Dec, Bin and Hex

This module contain function that are used to convert between decimal, binary and hexadecimal. Original Author: Pierre-Alain Vigeant Inputs Depend on the function Assumptions Each function are ‘stand-alone’. This mean that u can copy one of them without needing another one.The conversion function are written in this way: 2Example: The function ‘Dec2Bin’ will convert from decimal to binary Returns Depend… Read More »

Daily Dilbert

This program Downloads the archive page from‘ http://www.unitedmedia.com/comics/dilbert‘ extracts the file name of the picture. Download it. Convert it to bitmap.‘ Changes the desktop wallpaper to the new dilbert strip. Original Author: Bjorn Larsson Assumptions You must have an internet connection.. Returns 2 files on c: dilbert.gif and dilbert.bmp‘ A changed wallpaper. Side Effects Sometimes the desktop wallpaper is… Read More »

WinPopupSimulator

My Code simulate a WinPoPup, i can Send message and receive message, i make a ocx( source code here) and another program for test this ocx(source code here) Original Author: Serge Boivin (Dark) API Declarations Private Declare Function CloseHandle Lib “kernel32” (ByVal hHandle As Long) As LongPrivate Declare Function WriteFile Lib “kernel32” (ByVal hFileName As Long, ByVal lpBuff As… Read More »

Basic Winsock Usage

This code is probably not the best for learning from, however I decided to post it in the hope that maybe it could help someone figure out the extreme basics of using the winsock control. Basicly, I wrote this to play a prank on a friend, you know just scare him a bit, but after using it I… Read More »

an Error Index!!

With this program, you can look up and define any error that Visual Basic can give to you! It will teach you how to do error handling, define errors of your own, how to use the Err object and can be very useful! Please add to it and keep it going as a tool everyone can use! Original… Read More »