• All About Visual Basic 6.0
  • All About Visual Basic 6.0
  • All About Visual Basic 6.0

Kamis, 08 April 2010

example code program

CODE PROGRAM VB 6.0


Penjualan toko retail

http://www.ziddu.com/download/9360983/pnjualantokoretail.zip.html


Sistem Persediaan Obat

http://www.ziddu.com/download/9360984/SistemPersediaanObat.rar.html


penjualan toko komputer

http://www.ziddu.com/download/9360985/penjualantokokomputr.rar.html


SISTEM APLIKASI RENTAL DVD

http://www.ziddu.com/download/9360986/SISTEMAPLIKASIRENTALDVD.zip.html


mp3 class

http://www.ziddu.com/download/9361001/mp3class.zip.html


hide Show Caret Vb

http://www.ziddu.com/download/9361002/hideShowCaretVb.zip.html


logonWithInputboxVBex

http://www.ziddu.com/download/9361003/logonWithInputboxVBex.zip.html


changeDesktopWallpaperVB6

http://www.ziddu.com/download/9361004/changeDesktopWallpaperVB6.zip.htm


mp3 media

http://www.ziddu.com/download/9361005/mp3media.zip.html


Aplikasi Karyawan PLN

http://www.ziddu.com/download/9358875/AplikasiKaryawanPLN.zip.html


Bel Sekolah

http://www.ziddu.com/download/9359065/BelSekolah.zip.html


Koperasi

http://www.ziddu.com/download/9359252/Koperasi.rar.html


Penggajian

http://www.ziddu.com/download/9359381/Penggajian.rar.html


Pendaftaran Sekolah

http://www.ziddu.com/download/9359382/PendaftaranSekolah.zip.html


Penerimaan Mahasiswa Baru

http://www.ziddu.com/download/9359383/PenerimaanMahasiswaBaru.zip.html


txt 2list example

http://www.ziddu.com/download/9360977/txt2listexample.zip.html


mp3 playex

http://www.ziddu.com/download/9360978/mp3playex.zip.html


Rumah Sakit

http://www.ziddu.com/download/9360979/RumahSakit.rar.html


shutDown

http://www.ziddu.com/download/9360980/shutDownWinXpExample.zip.html


Sistem Aplikasi Penjualan Koran

http://www.ziddu.com/download/9360981/SistemAplikasiPenjualanKoran.zip.html


Sistem Informasi Rumah Sakit

http://www.ziddu.com/download/9360982/SistemInformasiRumahSakit.zip.html





CODE PROGRAM GAME DGN VB 6.0


MineSweeper

http://www.ziddu.com/download/9361020/MineSweeper.zip.html


ChristmasCards

http://www.ziddu.com/download/9361021/ChristmasCardsv.zip.html


Traffic Trouble Finished
http://www.ziddu.com/download/9361022/TrafficTroubleFinished.zip.html




 
»»  read more

Selasa, 30 Maret 2010

Repetition Structures in Visual Basic


Do While... Loop Statement 

The Do While...Loop is used to execute statements until a certain condition is met. The following Do Loop counts from 1 to 100.

Dim number As Integer
number = 1
Do While number <= 100 
number = number + 1 
Loop 

A variable number is initialized to 1 and then the Do While Loop starts. First, the condition is tested; if condition is True, then the statements are executed. When it gets to the Loop it goes back to the Do and tests condition again. If condition is False on the first pass, the statements are never executed. 

While... Wend Statement 

A While...Wend statement behaves like the Do While...Loop statement. The following While...Wend counts from 1 to 100 

Dim number As Integer 
number = 1 
While number <=100 
number = number + 1 
Wend 

Do...Loop While Statement 

The Do...Loop While statement first executes the statements and then test the condition after each execution. The following program block illustrates the structure: 

Dim number As Long 
number = 0 
Do 
number = number + 1 
Loop While number < 201 

The programs executes the statements between Do and Loop While structure in any case. Then it determines whether the counter is less than 501. If so, the program again executes the statements between Do and Loop While else exits the Loop. 

Do Until...Loop Statement 

Unlike the Do While...Loop and While...Wend repetition structures, the Do Until... Loop structure tests a condition for falsity. Statements in the body of a Do Until...Loop are executed repeatedly as long as the loop-continuation test evaluates to False. 

An example for Do Until...Loop statement. The coding is typed inside the click event of the command button 

Dim number As Long 
number=0 
Do Until number > 1000
number = number + 1
Print number
Loop

Numbers between 1 to 1000 will be displayed on the form as soon as you click on the command button.

The For...Next Loop

The For...Next Loop is another way to make loops in Visual Basic. For...Next repetition structure handles all the details of counter-controlled repetition. The following loop counts the numbers from 1 to 100:

Dim x As Integer
For x = 1 To 50
Print x
Next

In order to count the numbers from 1 yo 50 in steps of 2, the following loop can be used

For x = 1 To 50 Step 2
Print x
Next

The following loop counts numbers as 1, 3, 5, 7..etc

The above coding will display numbers vertically on the form. In order to display numbers horizontally the following method can be used.

For x = 1 To 50
Print x & Space$ (2);
Next

To increase the space between the numbers increase the value inside the brackets after the & Space$.

Following example is a For...Next repetition structure which is with the If condition used.

Dim number As Integer
For number = 1 To 10
If number = 4 Then
Print "This is number 4"
Else
Print number
End If
Next
»»  read more
 

flagcounter

free counters