Cara Menghitung Luas Dan Keliling Lingkaran dalam VB 6
Langkah pertama buat form baru..
Pilih 3 Label ; Jari-jari,
Luas Lingkaran, Keliling Lingkaran
Pilh 3 TextBox
Tulis ini Kedalam Listing ;
Private Sub
Text1_Change()
Dim p, j, l, k As
Single
p = 22 / 7
j = Val(Text1.Text)
k = 2 * p * j
l = p * j * j
Text3.Text = k
Text2.Text = l
End Sub
Mudah bukan dan sangat simple.. let the spirit!!!
Cara Membuat FORM Menjadi Tembus Pandang dalam VB 6
Langkah pertama buat form baru..
Simple ajah
Tulis ini Kedalam Listing ;
‘harus paling atas
Option Explicit
Private Declare
Function GetWindowLong Lib "User32" Alias _
"GetWindowLongA"
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare
Function SetWindowLong Lib "User32" Alias _
"SetWindowLongA"
(ByVal hwnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As
Long) As Long
Private Declare Function
SetLayeredWindowAttributes Lib "User32" _
(ByVal hwnd As Long,
ByVal crKey As Long, ByVal bAlpha As Byte, _
ByVal dwFlags As Long) As Long
Const WS_EX_LAYERED = &H80000
Const GWL_EXSTYLE = (-20)
Const LWA_ALPHA = &H2
Private Sub Form_Load()
Dim rtn As Long
rtn =
GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or
WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, 0, 200,
LWA_ALPHA
End Sub
'200 untuk menentukan seberapa
tembus pandangnya.. (bebas, semakin kurang semakin asik)
Keren Bukan…
Selamat Mencoba..
Cara Membuat Form Login Sederhana dalam VB 6
Langkah pertama buat form baru..
Pilih 3 Label ; AREA
LOGIN, ID, PASSWORD
Pilh 2 TextBox
Dan 2 CommondButton ;
LOGIN & EXIT
Tulis ini Kedalam Listing ;
Private Sub
Command1_Click()
If Text1.Text =
"putro" And Text2.Text = "pamungkas" Then
MsgBox "password
anda benar !!"
Me.Hide
MenuUtama.Show (selanjutnya
mw ke form mana)
Else
MsgBox "ID atau
Password Anda Salah"
Text1.Text =
""
Text2.Text =
""
Text1.SetFocus
End If
End Sub
Private Sub
Command2_Click()
End
End Sub
‘saran menggunakan 2 Listing yg
diatas dan dibawah utk di bisa juga di ENTER pada Keyboard
Private Sub
Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub
Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text =
"putro" And Text2.Text = "pamungkas" Then
MsgBox "password
anda benar !!"
Me.Hide
MenuUtama.Show ‘(selanjutnya
mw ke form mana)
Else
MsgBox "ID atau
Password Anda Salah"
Text1.Text =
""
Text2.Text =
""
Text1.SetFocus
End If
End If
End Sub
Mainkan Imajinasi Anda.. Good LUCK…
Langganan:
Postingan (Atom)