Category Archives: Microsoft

ChangeRes

This Function will change your Windows Resolution. It is very simple, and it does what most Resolution Change Functions don’t do, it changes the the Bits Per Pixels as well as the Screen Width and Height. Original Author: ScAnFrEaK Inputs Dim RetValue As IntegerRetValue = ChangeRes(800, 600, 32) Returns 1 = Resolution Successfully Changed0 = Resolution Was Not Changed… Read More »

Set Icons for any Form or Program

With this code you can place any Icon in the title bar of any Window, just by reffering to a .ico file or to the position of the Icon in a DLL. Original Author: J. van Gils Inputs Handle of the window you want to change the icon of. Assumptions You need to have the Window Handle (hWnd) of… Read More »

Form bouncing against the Start Menu at exit! 2.0

This code is a must have! It’s cooler than the “Cool Form Close” code , cooler than the “Implode and Explode” code! So what does it do? When you close you program a really cool effect will appear. Your form will shrink so just the Titlebar is being showned, then the titlebar accelerates and bounces againt the start… Read More »

Dictionary, or Anything Else to store stuff

you enter a word, or whatever else you want and it brings up a definition, or something else.Note: Saves into the registry key: HKEY_Current_UserSoftwareVB and VBA Program Setting whatever you set the path to Original Author: Tyler Robbins Assumptions create 4 textboxes name them:AddName, AddDefine, definition, Wordcreate 1 label, label3 (make its caption blank)make 2 command buttonsname them:LookUp, AddWord… Read More »

Spell Checker (uses MS Word)

This code uses OLE Automation to allow VB to open an instance of MS Word if the user has it on their system and spell check the contents of a text box. It could easily be modified to work with any control that has text on it. I would recommend better error control than the On Error statement… Read More »

Create and save into .txt files.

This will create and write into a *.txt file of your choice. Put this code in a timer and you have yourself a keystroke logger. You can save the contents of a textbox into a file also. Original Author: Abdul Kudrath Assumptions Put this code in a button and it will save the contents of a textbox. Code ‘… Read More »

Count number of lines/returns in a textbox

Simply counts the number of lines in a textbox (the textbox should be multiline=true, otherwise it is pretty useless). Put this in a module so it can be reused. Original Author: Jono Spiro Inputs USAGE–countLines(the textbox)EXAMPLE–countLines(text1) Returns Returns the number of lines in a textbox. Code Public Function countLines(textBox As textBox) As LongDim A%, B$A% = 1B$ = textBox.textDo… Read More »

CollectionPlus ! (See VERSION 2)

‘In replacement of existing Collection in VB‘SEE MY NEW VERSION ! Original Author: Rick Inputs ‘Same as Collection Assumptions ‘CollectionPlus his based on existing Collection, but you can ask question like‘ifKeyIsThere ou ifItemIsThere , returns True or False.‘A Public Event Error is available.‘It’s a very simple code but useful !‘In my next version i’m gonna handle Item,Key and Group‘so… Read More »

Simple Email Send

While browsing through the files on this site, I noticed that most listings that dealt with sending e-mail using VB used the Winsock Control. I recently wrote a small demo for a customer that reads a database file, and then sends it to an email address. This code requires that you use the MAPISession Control as well the… Read More »

A huge tip: Visual Basic Scripting Host

This tip is the most powerful bit of code I’ve ever come across. It will act as an exe but with no need to compile. However you must have either Win 98 or IE5 for it to work Original Author: Tmess Code First open up notepad and simply write:Msgbox “HI”Now save the text file. In windows explorerfind that text… Read More »