Kamis, 30 Juli 2009

Sistem Informasi

01.12

Ebooks Belajar Sistem Informasi dari server lokal file pdf yang terkompres rar
klik disini untuk DOWNLOAD/MENGUNDUH.
Wajib dibaca....!

Kamis, 23 Juli 2009

VB WITH MS ACCESS OR MS ACCESS WITH VB ?

00.26

Membuat Koneksi Database Access menggunakan Visual Basic 6.0Untuk menjadi Programmer kita harus menguasai beberapa coding dasar dari sebuah koneksi yang sederhana. Dalam kesempatan ini saya akan membahas coding koneksi menggunakan Access yang merupakan program aplikasi database dasar yang sering digunakan di lingkungan perkantoran.
Database latihan :
Tabel barang
Kode barang
Nama barang
Harga beli
Harga jual
stok
satuan






Sebenarnya dalam pembuatan table diatas tidak terlalu diperlukan dalam pembahasan ini tetapi hanya untuk informasi belaka. Untuk memberi penjelasan kepada pembaca.Yang harus diperhatikan dalam materi ini adalah pemahaman dari coding koneksi itu sendiri.Yang pertama dilakukan adalah membuat module dahulu untuk pemanggilan koneksi dari database.Setelah membuat koneksi masukan coding sebagai berikut :
Public cn As New ADODB.Connection
Public Sub BukaDB()
Dim koneksi As String
koneksi = “provider=microsoft.jet.oledb.4.0; Data source= ” & App.Path & “\latihan.mdb;”
cn.Open koneksi
End Sub
Perhatikan kode diatas, jangan sampai asal menulis saja tetapi anda harus bisa memahaminya dengan benar, yang pertama yaitu
Public cn As New ADODB.Connection
Berfungsi untuk membuat variable bersifat public menggunakan ADODB
Dim koneksi As String
Berfungsi untuk membuat variable bersifat private bertipe string
koneksi = “provider=microsoft.jet.oledb.4.0; Data source= ” & App.Path & “\latihan.mdb;”
Merupakan kode utama dari koneksi yang dibutuhkan. Yang pertama menggunakan provider Microsoft jet oledb 4.0 yang memanggil data source/sumber data dari database latihan.mdb
cn.Open koneksi
Visual Basic ? programmer mana sih yang nggak kenal sama tool yang satu ini?
nggak usah saya sebutin apa itu Visual Basic.
Lalu Ms Access, sebuah aplikasi yang menangani database, aplikasi ini biasanya sudah satu paket dengan Microsoft Office Aplication.
Keduanya merupakan keluarga besar keturunannya Om Bill Gates. Sebagai satu keluarga maka wajarlah bila satu sama lain dapat dikombinasikan untuk saling melengkapi.
lalu mengapa aku pake judul diatas ?

Sebagai tool programming yang powerful, Visual Basic kaya akan library-library yang mendukung pengelolaan database Ms Access, meski banyak jenis data lain yang didukung (txt, xls, xml, mysql dll)
Banyak sekali aplikasi VB jadi, baik mass product maupun rancangan software house yang menggunakan Ms Access sebagai basis datanya. Dengan demikian kemampuan VB dalam mengelola database Ms Access tidak diragkan lagi.

Lalu Ms Access sendiri, adalah sebuah RDBMS (relational database management system ) yang terintegrasi dalam satu file. didalam Ms access kita sudah dapat mendefinisikan tabel, query, relation, bahkan form dan report.
Kehebatan Ms Access adalah kita dapat menyusun aplikasi secara interaktif dan profesional dengan bantuan Visual Basic for Aplication (VBA).
VBA itu apa to ? mbuh lah, lha wong saya juga nggak terlalu mudeng, tapi kayaknya tuh semacam Visual Basic yang sudah terintegrasi dengan Office Aplication (Ms Excel, Word, MS Access).
Jadi didalam Ms Access kita dapat menyisipkan kode-kode VB (misalnya di dalam form dan report) agar lebih powerfull dalam mengelola database.
Menurut saya sebenarnya ‘kekuatan’ utama Ms Access adalah VBA itu sendiri, disamping integrasi yang sangat bagus dengan aplikasi office saudaranya.

Kesimpulannya, Kita dapat membuat aplikasi pengelolaan database dengan Visual Basic yang berbasis data Ms Access, juga bisa dengan ‘pure’ Ms Access Aplication yang di bumbui dengan VBA.

lalu gimana enaknya mas djmumun ?
Relatif sih. Bagi para suhu - suhu VB mungkin tertawa dengan dengan tulisan ini. Bagaimanapun dengan Visual Basic, anda dapat membuat aplikasi yang lebih kompleks. Fitur Installer yang bagus sehingga kita bisa membuat aplikasi standalone, tanpa tergantung dengan aplikasi lain .

tapi bagi saya bila database Ms-Access (bukan data berbasis yang lain, mis mysql, oracle, dll) yang menjadi point utama, mending langsung pake Ms Access aja.
fitur - fitur nya yang interaktif dan user friendly, -apalagi dengan wizard-wizardnya - sangat membantu saya dalam membuat aplikasi secara ’sedap sekejap’.
Kalo masih kurang puas dengan wizard yang ada (biasa nih.. penyakit) anda dapat mengoprek dengan memberi kode - kode VBA.
Buka aja Visual Basic Editor, silahkan tuliskan kode - kode (kebanyakan saya sih cuman kopi paste . . . ), dan lihatlah aplikasi ms access anda nggak kalah dengan yang buatan Visual Basic.
kendalanya mungkin dalam distribusinya.
komputer pemakai musti terinstall minimal Microsoft Access Runtime atau Microsoft Office profesional

Rabu, 22 Juli 2009

SISTEM INFORMASI MANAJEMEN

00.12

Pengertian SISTEM INFORMASI MANAJEMEN adalah:

Sistem informasi adalah sekumpulan hardware,software,brainware,prosedur dan atau aturan yang diorganisirkan secara integral untuk mengolah data menjadi informasi yang bermanfaat guna memecahkan masalah dan pengambilan keputusan.



Komponen Sistem Informasi :

- Perangkat keras (hardware)
- Perangkat lunak (software) atau program
- Prosedur
- Orang
- Basis data (database)
- Jaringan komputer dan komunikasi data





3 MACAM ARSITEKTUR

1. Arsitektur Tersentralisasi
Suatu proses pelayanan informasi yang dikelola secara terpusat
2. Arsitektur Terdistribusi
Suatu proses pelayanan informasi yang dikelola secara tersebar
3. Arsitektur Client <-> Server
Suatu proses pelayanan informasi yang database utama dikelola Server sedangkan proses analisis lebih lanjut dilakukan oleh Client

Kamis, 28 Mei 2009

20.15

MULOK : VISUAL BASIC
1. Skrip yang masih tergolong bahasa pemrograman bahasa level Rendah adalah : 0B38:0100 B402
2. Skrip yang masih tergolong bahasa pemrograman bahasa level menengah adalah : Mov AH,02h
3. Skrip yang masih tergolong bahasa pemrograman bahasa level tinggi adalah : Write(‘A’);
4. Berisi Data atau program adalah bagian definisi dari : file
5. Kumpulan instruksi / perintah yang dirangkaian sehingga membentuk suatu proses dinamakan :program
6. Apa yang dimaksud dengan meng-Compile instruksi program yang dibuat : memeriksa program yang telah disusun
7. Flowchart berfungsi sebagai : alat bantu yang berupa simbol – simbol yang saling dihubungkan sehingga dapat menggambarkan alur pikir sebuah program atau permasalahan yang akan diproses dengan progam komputer.
8. Contoh Bahasa Pemrograman Berbasis Teks, kecuali: Visual basic
9. Bahasa Pemrograman Visual Basic memiliki karakter utama yakni event driven yang bermakna : Program menunggu user menjalankan program
10. Berikut yang bukan termasuk Event adalah : Merubah tampilan window
11. Salah satu contoh Properties yakni : Bentuk tampilan di window dapat anda ubah melalui template(cetakan) yang disediakan.
12. Yang dimaksud dengan methode adalah : susunan perintah yang dikerjakan bila event dijalankan
13. Jelaskan tujuan program berikut : Private Sub Lblnama_DblClick()Lblnama.caption =“ Saya sedang Belajar Visual Basic”End Sub
Jika diklik 2 kali maka akan ditampilkan “Saya sedang Belajar Visual Basic.
14. Apa Perbedaan dari Combo Box dengan List Box :Combo box tampilannya hanya satu sedangkan List box menampilkan beberapa pilihan.
15. Property Alignment pada label berfungsi untuk :Mengatur tata letak teks.16. Tempat dimana kita membuat tampilan (user interface) dari program aplikasi dinamakan :properties17. Dengan melihat tampilan program diatas,komponen yang dibutuhkan adalah :
18. Dengan melihat gambar diatas, komponen yang ditunjuk oleh label A adalah :
19. Dengan melihat gambar diatas, komponen yang ditunjuk oleh label A adalah :
20. Dengan melihat gambar diatas, komponen yang ditunjuk oleh label A adalah :

Kamis, 21 Mei 2009

traffic light

20.46


he following constants are used to give the lights a certain color
Const Off = &H8000000F
Const Red = vbRed
Const Green = vbGreen
Const Orange = &H80C0FF

'a simple traffic junction of two perpendicular crossing streets
'consists of 4 traffic poles. Each traffic pole has a green, orange
'and red light. There is always just one light on per pole.

'The traffic lights control on one of those junctions has just 4
'statusses. The current status is stored in the variable "Status".
Dim Status As Integer

'The time a status lasts, is derived from the following constants, which
'indicate the time in seconds.
Const TimeForStatus1 = 5
Const TimeForStatus2 = 3
Const TimeForStatus3 = 5
Const TimeForStatus4 = 3

Private Sub SetStatus(ByVal intStatus As Integer)
'Set the status variable to the new status
Status = intStatus

'Turn off all the lights
shpLamp1Groen.FillColor = Off
shpLamp1Oranje.FillColor = Off
shpLamp1Rood.FillColor = Off
shpLamp2Groen.FillColor = Off
shpLamp2Oranje.FillColor = Off
shpLamp2Rood.FillColor = Off
shpLamp3Groen.FillColor = Off
shpLamp3Oranje.FillColor = Off
shpLamp3Rood.FillColor = Off
shpLamp4Groen.FillColor = Off
shpLamp4Oranje.FillColor = Off
shpLamp4Rood.FillColor = Off

'Turn on the appropriate lights with the correct color,
'depending on the current status
Select Case intStatus 'or "Select Case Status", won't make any difference
Case 1
shpLamp1Rood.FillColor = Red
shpLamp2Groen.FillColor = Green
shpLamp3Rood.FillColor = Red
shpLamp4Groen.FillColor = Green

Timer1.Interval = TimeForStatus1 * 1000
Case 2
shpLamp1Rood.FillColor = Red
shpLamp2Oranje.FillColor = Orange
shpLamp3Rood.FillColor = Red
shpLamp4Oranje.FillColor = Orange

Timer1.Interval = TimeForStatus2 * 1000
Case 3
shpLamp1Groen.FillColor = Green
shpLamp2Rood.FillColor = Red
shpLamp3Groen.FillColor = Green
shpLamp4Rood.FillColor = Red

Timer1.Interval = TimeForStatus3 * 1000
Case 4
shpLamp1Oranje.FillColor = Orange
shpLamp2Rood.FillColor = Red
shpLamp3Oranje.FillColor = Orange
shpLamp4Rood.FillColor = Red

Timer1.Interval = TimeForStatus4 * 1000
End Select

'We need to call the following subroutine
RefreshLights
End Sub

Private Sub RefreshLights()
'This subroutine makes sure that de data on the screen is
'displayed correctly
shpLamp1Groen.Refresh
shpLamp1Oranje.Refresh
shpLamp1Rood.Refresh
shpLamp2Groen.Refresh
shpLamp2Oranje.Refresh
shpLamp2Rood.Refresh
shpLamp3Groen.Refresh
shpLamp3Oranje.Refresh
shpLamp3Rood.Refresh
shpLamp4Groen.Refresh
shpLamp4Oranje.Refresh
shpLamp4Rood.Refresh
End Sub

Private Sub Form_Load()
'When the programs starts, it starts with status 1
SetStatus 1
'Initializing the timer will start the timer1_timer subroutine after the
'set interval has elapsed (in milliseconds)
Timer1.Interval = TimeForStatus1 * 1000
End Sub
Private Sub Timer1_Timer()
'Change to the next status
Status = Status + 1
'If the next status is 5 then we need to change it back to one
If Status = 5 Then Status = 1

SetStatus Status
End Sub

Selasa, 31 Maret 2009

cHaptER 5

01.02

Private Declare Function GetTickCount Lib "kernel32" () As Long 'this function lets us not use timer
'timers are bad :)

'main body... each part of the snake has X and Y
Private Type Part
X As Integer
Y As Integer
End Type

'Dynamic array to store part coordinates
Dim Part() As Part

'Velocity in X and Y direction of the snake
Dim vX As Integer, vY As Integer
Dim i As Integer 'for loops
Dim CS As Single 'cell size

Dim FX As Integer, FY As Integer 'food coordinates
Dim X As Integer, Y As Integer

Dim bRunning As Boolean, died As Boolean

Private Sub Form_Load()
Randomize 'random generation

'Initialize controls******************
Picture1.BackColor = vbWhite
Picture1.ScaleMode = 3 'pixels

CS = 20 'cell size in pixels
X = Int(Picture1.ScaleWidth / CS)
Y = Int(Picture1.ScaleHeight / CS)

Picture1.AutoRedraw = True
Picture1.ScaleWidth = X * CS
Picture1.ScaleHeight = Y * CS

Me.WindowState = 2
Me.Show

DrawGrid Picture1, CS
'*************************************

died = False
'set up the game
ReDim Part(0)
Part(0).X = 0
Part(0).Y = 0

FX = Int(Rnd * X)
FY = Int(Rnd * Y)
'go to main loop
bRunning = True
MainLoop
End Sub

Sub MainLoop()
Do While bRunning = True
Update
Draw
WAIT (50) 'increasing this number makes game slower
Loop

Unload Me
End Sub

Sub Update()
'MOVE PARTS
For i = UBound(Part) To 1 Step -1
Part(i).X = Part(i - 1).X
Part(i).Y = Part(i - 1).Y
Next i

'MOVE HEAD
Part(0).X = Part(0).X + vX
Part(0).Y = Part(0).Y + vY

'HAS HE GONE OUT OF BOUNDS ?
If Part(0).X <>= X Or Part(0).Y <>= Y Then
died = True
End If

'HAS HE CRASHED INTO HIMSELF ?
For i = 1 To UBound(Part)
If Part(i).X = Part(0).X And Part(i).Y = Part(0).Y Then
died = True
End If
Next i

'DID HE EAT FOOD ?
If Part(0).X = FX And Part(0).Y = FY Then
ReDim Preserve Part(UBound(Part) + 1)
Part(UBound(Part)).X = -CS
Part(UBound(Part)).Y = -CS
FX = Int(Rnd * X)
FY = Int(Rnd * Y)

Form1.Caption = "Parts: " & UBound(Part)
End If

'IS HE DEAD ?
If died = True Then NewGame
End Sub

Sub Draw()
'DRAW WHITENESS
Rectangle 0, 0, X * CS, Y * CS, vbWhite
'DRAW SNAKE. PARTS IN BLUE, HEAD IN GREEN
For i = 1 To UBound(Part)
Rectangle Part(i).X * CS, Part(i).Y * CS, Part(i).X * CS + CS, Part(i).Y * CS + CS, vbBlue
Next i
Rectangle Part(0).X * CS, Part(0).Y * CS, Part(0).X * CS + CS, Part(0).Y * CS + CS, vbGreen
'DRAW FOOD
Rectangle FX * CS, FY * CS, FX * CS + CS, FY * CS + CS, vbRed

DrawGrid Picture1, CS
End Sub

Sub Rectangle(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, color As Long)
Picture1.Line (X1, Y1)-(X2, Y2), color, BF
End Sub

Sub NewGame()
'SET UP NEW GAME
died = False

ReDim Part(0)
Part(0).X = 0
Part(0).Y = 0

vX = 0
vY = 0

FX = Int(Rnd * X)
FY = Int(Rnd * Y)
End Sub

Sub DrawGrid(Pic As Control, CS As Single)
'**************************************************************************
'DRAW GRID
'**************************************************************************
Dim i As Integer, Across As Single, Up As Single

Across = Pic.ScaleWidth / CS
Up = Pic.ScaleHeight / CS

For i = 0 To Across
Pic.Line (i * CS, 0)-(i * CS, Up * CS)
Next i

For i = 0 To Up
Pic.Line (0, i * CS)-(Across * CS, i * CS)
Next i
End Sub

Sub WAIT(Tim As Integer)
'**************************************************************************
'WAIT FUNCTION
'**************************************************************************
Dim LastWait As Long
LastWait = GetTickCount

Do While Tim > GetTickCount - LastWait
DoEvents
Loop
End Sub

Private Sub Picture1_KeyDown(KeyCode As Integer, Shift As Integer)
'USER KEYPRESSES HANDLED HERE
Select Case KeyCode
Case vbKeyRight
vX = 1
vY = 0
Case vbKeyLeft
vX = -1
vY = 0
Case vbKeyUp
vX = 0
vY = -1
Case vbKeyDown
vX = 0
vY = 1
End Select
End Sub

Private Sub Picture1_KeyPress(KeyAscii As Integer)
'27 is ESC. IF user presses ESC, QUIT
If KeyAscii = 27 Then bRunning = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
'This function can be left out
End
End Sub

cHaptER 4

00.59

Option Explicit
Dim days As Long '<-Stores the number of days elapsed from 1/1/1900 to current month and year
Dim i As Integer

Private Sub cmdGenerate_Click()
On Error GoTo Error_handle 'On error, goto to end of function
days = 0
For i = 0 To 34
Label1(i).Caption = "" 'Clear all the labels
Next i

For i = 1900 To txtYear.Text - 1
If i Mod 4 = 0 Then 'If leap year then count 366 days
days = days + 366
Else 'else 365 days
days = days + 365
End If
Next i

For i = 1 To txtMonth.Text - 1
If i = 1 Or i = 3 Or i = 5 Or i = 7 Or i = 8 Or i = 10 Or i = 12 Then 'For January,March,May....,December count 31 days
days = days + 31
ElseIf (i = 4 Or i = 6 Or i = 9 Or i = 11) Then 'For April,June,September,November count 30 days
days = days + 30
ElseIf (i = 2 And txtYear.Text Mod 4 = 0) Then 'If month is February and year is leap year count 29 days
days = days + 29
Else 'If month is February and year is not a leap year, count 28 days
days = days + 28
End If
Next i

If (i = 1 Or i = 3 Or i = 5 Or i = 7 Or i = 8 Or i = 10 Or i = 12) Then
show_calender 31 'Show calender with 31 days
ElseIf (i = 4 Or i = 6 Or i = 9 Or i = 11) Then
show_calender 30 'Show calender with 30 days
ElseIf (i = 2 And txtYear.Text Mod 4 = 0) Then
show_calender 29 'Show calender with 29 days
Else
show_calender 28 'Show calender with 28 days
End If
Error_handle:
End Sub

Private Function show_calender(n As Integer) '//<- n stores the number of days to display
Dim i, k As Integer
k = days Mod 7 'Divide days with 7, the remainder give the current day
For i = 1 To n
Label1(k).Caption = i 'Display the number in calender format
k = k + 1
If k = 35 Then k = 0
Next i
End Function

Private Sub txtMonth_Change()

End Sub