C++
PHP
Java
Linux & UNIX
ColdFusion
Visual Basic
ActionScript
CGI/Perl
JavaScript
HTML/CSS
Other Languages
Bash
ASP
C
mySQL
Python
C#
Assembly
VB.NET
Scheme
Ruby
System Uptime
Byte Format
File Download to Temp Dir
Shutdown Computer from VB
Easy String Writing in Registry
Open/Close your CD-Drive.
Detecting and Aborting Windows Shutdown from VB
Windows XP Task Manager Disabler/Enabler
Is the Program being Debugged?
TextBox Telephone Number Formatting
REMOVING AN APP FROM THE PROCESSES LIST
Unescape
RoundUp and RoundDown functions in VB 6.0
Classic Bouncing Balls
Decimal to Binary
Analog Clock
Stopping the user from exiting out of your app.
RoundUp and RoundDown
Date (in words) to Oracle Date Format
Calculator
Opening / Closing CDROM in VB6 drive using command buttons..
Starting a Screen saver using VB6 code
Flash the Form window
Starting an *.exe file from VB6 code
Playing a Sound File From VB6 appl
Deternining Drive Type Through VB
Convert Number to Equivalent TExt
Inverse Number
Reading a Text file Line by Line
Selecting a an Application's Default Printer and Printing to it
Scroller
Draw Polygon
Open & Saving .txt files
Quadratic Formula
Inserting Hyperlinks in VB
HD serial Number (Hardcoded One)
Encrypt-Decrypt File with Password
Creating An ODBC
PutBackgroung
Find a day in the week
Shell revisited
Enabled/Disabled an array of command button
Projectile Motion
LUHN CHECK PROGRAM
Tic Tac Toe
Basic Spell this Picture Game
Cost Calculator
Data Validation w/o messageBoxes
Random Password
AutoNumber in Access
ADO connection to excel
Mouse Input Test
Number conversions (binary, decimal, hex)
Bubble_sort
Fibonacci Numbers done recrusively
Recrusive dec->x algorithm
Quadratic equation solver
Arabic numeral converter to roman numerals (recursive)
Non repeating random number generator
Return cpu up time (recursively)
Read & Write to file
Return specific pixel RGB code
Split RGB to Red;Green;Blue
Hangman
Elementar calculator
Change screen resolution
Simple database connectivity
Check if a character is alpha(lower or upper) or alpha numeric,
Loading the ProgressBar
Color combination
Find USB Drive Letter
Download file using ftp
User validation
Creating Auto Number Generation
Ghost Mail
Read registry
Write to registry
Prevent a program from running
Am I running from IDE or not ?
My CD Collection
Password Keeper
Finding your application's path
Simple Text Encryption
Change System Date fomat
Run program outside vb
Get System Volume Infomation
Fade out your form
Code :
VISUAL BASIC - SCROLLER
Code Discription :
Creates a message accross the screen.
Right Click And Copy This Code
"################################################# " " That"s were everything begins ;) " " VERY BASIC 3D ENGINE, PURE VB only some math ;) " " Author: over (overkillpage@gmx.net) " " Comments and suggestions are of course welcome " "################################################# "Preparing the Form, setting up a picturebox for 3d output, setting the viewpoint ... "Please keep the order of sub calls "For further information on the SUB functions have a look at the First3dMath.bas Private Sub Form_Load() Init3D OutPutBox, 4, False, True StartFrame SetViewpoint 0, 0, 0, False EndFrame End Sub " This Sub is a simple example of drawing a 3D Object using First3dMath.bas " " The Initializationprocess was already done in Form_Load Private Sub cmdBox_Click() " #### Clean up #### " " The cleaning up process is only necessary if there were already objects drawn " If you have just done the Initializationprocess you can leave this part out SetViewpoint 0, 0, 0, False Timer1.Enabled = False Timer2.Enabled = False " #### Clean up #### " Here we go ! ... " Declearing two Vectors which will be used to store the coordinates of two points " We will draw lines between these points. Dim p1 As VECTOR3D Dim p2 As VECTOR3D " StartFrame is always used before drawing lines etc into a new frame. It clears the " outputpicturebox etc. StartFrame " ###################################################### " ######################## BOX ####################### " ######################## TOP ####################### " ###################################################### " Now we are gonna draw some line to form a 3D box. The procedure is always the same: " " 1. Storing the Coordinates of the two points in p1 and p2 " Example: " " p1.x1 = -1 " p1.x2 = 1 " p1.x3 = -1 " " p2.x1 = 1 " p2.x2 = 1 " p2.x3 = -1 " " 2. Drawing the line " Example: " " DrawLine p1,p2 " " ... do the former steps for every line ... p1.x1 = -1 p1.x2 = 1 p1.x3 = -1 p2.x1 = 1 p2.x2 = 1 p2.x3 = -1 DrawLine p1, p2 p1.x1 = 1 p1.x2 = 1 p1.x3 = -1 p2.x1 = 1 p2.x2 = 1 p2.x3 = -3 DrawLine p1, p2 p1.x1 = 1 p1.x2 = 1 p1.x3 = -3 p2.x1 = -1 p2.x2 = 1 p2.x3 = -3 DrawLine p1, p2 p1.x1 = -1 p1.x2 = 1 p1.x3 = -3 p2.x1 = -1 p2.x2 = 1 p2.x3 = -1 DrawLine p1, p2 " ######################## bottom ####################### p1.x1 = -1 p1.x2 = -1 p1.x3 = -1 p2.x1 = 1 p2.x2 = -1 p2.x3 = -1 DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -1 p2.x1 = 1 p2.x2 = -1 p2.x3 = -3 DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -3 p2.x1 = -1 p2.x2 = -1 p2.x3 = -3 DrawLine p1, p2 p1.x1 = -1 p1.x2 = -1 p1.x3 = -3 p2.x1 = -1 p2.x2 = -1 p2.x3 = -1 DrawLine p1, p2 " ######################## sides ####################### p1.x1 = -1 p1.x2 = -1 p1.x3 = -1 p2.x1 = -1 p2.x2 = 1 p2.x3 = -1 DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -1 p2.x1 = 1 p2.x2 = 1 p2.x3 = -1 DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -3 p2.x1 = 1 p2.x2 = 1 p2.x3 = -3 DrawLine p1, p2 p1.x1 = -1 p1.x2 = -1 p1.x3 = -3 p2.x1 = -1 p2.x2 = 1 p2.x3 = -3 DrawLine p1, p2 "EndFrame is always used when a new frame is complete "It prints out the Frames per Second, draws our Viewpoint if requested ... EndFrame End Sub "Similar to cmdBox_Click, but in a timer with some changing vars to create a animation Private Sub Timer1_Timer() Dim p1 As VECTOR3D Dim p2 As VECTOR3D StartFrame AnimationCounter1 = AnimationCounter1 - 0.1 AniMovement = AniMovement + (Sin(AnimationCounter1)) / 10 " ####################################################### " ######################## QUADER ####################### " ######################## DECKEL ####################### " ####################################################### p1.x1 = -1 + AniMovement p1.x2 = 1 p1.x3 = -1 + AniMovement p2.x1 = 1 - AniMovement p2.x2 = 1 p2.x3 = -1 + AniMovement DrawLine p1, p2 p1.x1 = 1 - AniMovement p1.x2 = 1 p1.x3 = -1 + AniMovement p2.x1 = 1 - AniMovement p2.x2 = 1 p2.x3 = -3 + AniMovement DrawLine p1, p2 p1.x1 = 1 - AniMovement p1.x2 = 1 p1.x3 = -3 + AniMovement p2.x1 = -1 + AniMovement p2.x2 = 1 p2.x3 = -3 + AniMovement DrawLine p1, p2 p1.x1 = -1 + AniMovement p1.x2 = 1 p1.x3 = -3 + AniMovement p2.x1 = -1 + AniMovement p2.x2 = 1 p2.x3 = -1 + AniMovement DrawLine p1, p2 " ######################## Boden ####################### p1.x1 = -1 p1.x2 = -1 p1.x3 = -1 + AniMovement p2.x1 = 1 p2.x2 = -1 p2.x3 = -1 + AniMovement DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -1 + AniMovement p2.x1 = 1 p2.x2 = -1 p2.x3 = -3 + AniMovement DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -3 + AniMovement p2.x1 = -1 p2.x2 = -1 p2.x3 = -3 + AniMovement DrawLine p1, p2 p1.x1 = -1 p1.x2 = -1 p1.x3 = -3 + AniMovement p2.x1 = -1 p2.x2 = -1 p2.x3 = -1 + AniMovement DrawLine p1, p2 " ######################## Seiten ####################### p1.x1 = -1 p1.x2 = -1 p1.x3 = -1 + AniMovement p2.x1 = -1 + AniMovement p2.x2 = 1 p2.x3 = -1 + AniMovement DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -1 + AniMovement p2.x1 = 1 - AniMovement p2.x2 = 1 p2.x3 = -1 + AniMovement DrawLine p1, p2 p1.x1 = 1 p1.x2 = -1 p1.x3 = -3 + AniMovement p2.x1 = 1 - AniMovement p2.x2 = 1 p2.x3 = -3 + AniMovement DrawLine p1, p2 p1.x1 = -1 p1.x2 = -1 p1.x3 = -3 + AniMovement p2.x1 = -1 + AniMovement p2.x2 = 1 p2.x3 = -3 + AniMovement DrawLine p1, p2 EndFrame End Sub " Necessary for the Zoom function Private Sub MouseTimer_Timer() VP.x1 = 0 VP.x2 = 0 VecTrans3D VP MouseTimer.Enabled = False End Sub " Clears out the PictureBox by drawing an empty frame Private Sub cmdCls_Click() StartFrame EndFrame End Sub "Enable/Disable the timer used for Animation1 Private Sub cmdAni1_Click() If Timer1.Enabled = True Then Timer1.Enabled = False StopCountingFrames Else Timer2.Enabled = False StartCountingFrames SetViewpoint 0, 0, 0, False Timer1.Enabled = True End If End Sub "Enable/Disable the timer used for Animation2. Not implented yet. Private Sub cmdAni2_Click() If Timer2.Enabled = True Then Timer2.Enabled = False StopCountingFrames Else Timer1.Enabled = False StartCountingFrames Timer2.Enabled = True End If End Sub "Draws/Hides the used Grid Private Sub cmdGrid_Click() StartFrame If GRIDVISIBLE = True Then GRIDVISIBLE = False Else GRIDVISIBLE = True EndFrame End Sub " Necessary to make the viewpoint follow the mouspointer Private Sub OutPutBox_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) MouseTimer.Enabled = False MouseTimer.Enabled = True VP.ConvertedData.x1 = X VP.ConvertedData.x2 = Y End Sub " Necessary for the zooming function Private Sub OutPutBox_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) MouseDown = True TwipsPerQuad = OUTBOX.ScaleWidth / GRIDS Do If Button = 1 Then VP.ConvertedData.x3 = VP.ConvertedData.x3 + 0.01 If Button = 2 And VP.ConvertedData.x3 > -TwipsPerQuad + 20 Then VP.ConvertedData.x3 = VP.ConvertedData.x3 - 0.01 DoEvents Loop Until MouseDown = False End Sub " Necessary for the zooming function Private Sub OutPutBox_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) MouseDown = False End Sub " Displays a scrooler. Has nothing to do with our 3D animation. Private Sub cmdScroller_Click() "Clean up Timer1.Enabled = False Timer2.Enabled = False StopCountingFrames "Clean up StartCountingFrames Scroll "THANK YOUR FOR TRYING MY LITTLE 3D ENGINE, Contact me: overkillpage@gmx.net", OUTBOX.ScaleHeight / 2, 1, 0.0001 StopCountingFrames End Sub
COPYRIGHT © 2007-2008 BY Lib-Code.All rights reserved.
POWERED BY: Lib-Code V1.3