Category Archives: Microsoft

Open Folders As Windows from VB5

This code is for those people who want to open up folders/directories as separate windows, as compared to the alternative fileboxes. Original Author: Ted R. Smith Assumptions Nothing Returns Opens a folder/directory in a separate window API Declarations Code Directory = “C:”Shell “Explorer ” + Directory, vbNormalFocus’ The above code opens the C: directory as a new window

Expiredate

Expiredate, it’s very usefull for makers of shareware. It can worked for 30 days long or 60 days long. you can make new demo for. After expiredate your programma will not worked until customer pay to you. Original Author: Edward Tie API Declarations Code Option ExplicitDim day1 As IntegerDim month1 As IntegerDim basis As LongDim schrikbasis As LongDim e… Read More »

Rotating Cube Demo

The HELLO WORLD of 3D programming 🙂A rotating cube demo. You can adjust the rotation (clockwise or anticlockwise) and the speed by moving the mouse cursor towards the right and left edges of the form. Original Author: Theo Kandiliotis Inputs Nothing Assumptions This is Math stuff mostly,has little to do with VB’s methods. I used the Line method to… Read More »

TimeDelay

TimeDelay fuction is good for when you want to time out a loop, in milliseconds.Does’nt use a timer control, Uses simple api declare. Original Author: Mitch Mooney Inputs Delay as Long, milliseconds Assumptions Create a module with the following api declare and functionUsage can beDoFuncThatRetunsTrueMoreCodeEctEctLoop until ( FuncThatRetunsTrue=True) or (TimeDelay(60000)=True) Returns TimeDelay as boolean, turns turn if time reached,else… Read More »

Center a form – Short, Simple, and Sweet

This code allows you to quickly center a form within the screen without eating up alot of cpu time. Original Author: Scott Fitzhugh Side Effects none. The form gets centered. API Declarations Code sub form_load()me.left = (screen.width / 2) – (me.width / 2)me.top = (screen.height / 2) – (me.height / 2)end sub

Stop Typeing in Textboxes but dont diasble them

This Code stops the End-user typing o#into a textbox but still allows themto scroll it because it is not disabled Original Author: Andrew Timberlake API Declarations Code in textbox_keypresskeyascii = 0in textbox_keydown and textbox_keyupkeycode = 0Its as simple as that.

RECURSIVE DESCENT PARSER FOR NUMERIC EXPRESSIONS

RECURSIVE DESCENT PARSER FOR NUMERIC EXPRESSIONS Original Author: Sven-Erik Dahlrot Inputs A string with a nummeric expression to parse Returns The result of the parsing as a string API Declarations Code Option ExplicitPrivate Const NON_NUMERIC = 1Private Const PARENTHESIS_EXPECTED = 2Private Const NON_NUMERIC_DESCR = “Non numeric value”Private Const PARENTESIS_DESCR = “Parenthesis expected”Private Token As Variant   ‘Current token’*********************************************************************’*’*   RECURSIVE DESCENT… Read More »

3D-Stars in a Form

Draws a nice 3D-Starfield in a Form (uses X,Y,Z positions)width a very short codeShades each star depending on the distance. Original Author: Mikael Rickan Assumptions Create an Timer for the form called Timer1 Side Effects None (maybe some flickering) API Declarations Code ‘Dim X(100), Y(100), Z(100) As IntegerDim tmpX(100), tmpY(100), tmpZ(100) As IntegerDim K As IntegerDim Zoom As IntegerDim… Read More »

Credit Card Identification

Determines type of Credit Card by it’s number. Original Author: John Anderson Inputs Card Number as String Assumptions This is based on documents from CyberCash’s home page. Returns Card Type as String Side Effects Is not Year 2061 Compliant API Declarations Code Public Function CardType(CCNum As String) As StringDim Header As String  Select Case Left$(CCNum, 1)    Case “5”      Header = Left$(CCNum, 2)      If… Read More »