Blog - programmervb.blog.com - Belajar Visual Basic
General Information:
Latest News:
Check For a File 1 Aug 2008 | 08:58 pm
Public Function FileExist(asPath as string) as Boolean If UCase(Dir(asPath))=Ucase(trimPath(asPath)) then FileExist=true Else FileExist=False End If End Function Public Function TrimPath(ByVal ...
Low and Upper Case 1 Jul 2008 | 07:11 pm
‘add 2 command buttons and 1 text Private Sub Command1_Click() Text1.Text = CapFirst$(Text1.Text) End Sub Private Sub Command2_Click() Text1.Text = LCase$(Text1.Text) End Sub ‘add 1 mod...
Show Your IP Address 1 Jul 2008 | 07:10 pm
Add Microsoft Winsock Control 6.0 component Insert 1 Textbox Insert 2 Command Buttons Rename Caption as Display and Clear Private Sub Command1_Click() If Text1.Text = “” Then Command1.Enabled...
Permutasi 17 May 2008 | 05:05 pm
Option Explicit Dim id As Integer Dim N As Integer Dim perm() As Integer Function Engine(i As Integer) Dim t As Integer Dim j As Integer id = id + 1 perm(i) = id If (id = N...
Enkripsi Searah 17 May 2008 | 04:58 pm
Public Function Hash(ByVal text As String) As String a = 1 For i = 1 To Len(text) a = Sqr(a * i * Asc(Mid(text, i, 1))) ‘Numeric Hash Next i Rnd (-1) Randomize a ‘seed PRNG For i = 1 To 16 ...
Enkripsi 17 May 2008 | 04:55 pm
Function EncDec(inData As Variant, Optional inPW As Variant = “”) As Variant On Error Resume Next Dim arrSBox(0 To 255) As Integer Dim arrPW(0 To 255) As Integer Dim Bi As Inte...
Menu Pop Up 14 May 2008 | 05:53 pm
Option Explicit Private Declare Function SendMessage Lib “user32″ Alias _ “SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long Private Cons...
Load Picture 14 May 2008 | 04:28 pm
Private Sub Command1_Click() With Me.CommonDialog1 .DialogTitle = “Ambil Gambar” .Filter = “JPEG|*.jpg” .ShowOpen If .FileName <> “” Then Set Me.Picture1.Picture = Nothing Me.Picture1.Picture =...
Sleep With Visual Basic 9 May 2008 | 08:18 pm
Option Explicit Private Declare Sub Sleep Lib “kernel32″ (ByVal dwMilliseconds As Long) Private Sub Form_Click() Me.Caption = “Sleeping” Call Sleep(20000) Me.Caption = “Awake” End Sub ...
Find Something 9 May 2008 | 07:27 pm
Form Option Explicit Private Declare Function GetWindowText Lib “user32″ Alias “GetWindowTextA” (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Sub cmdActivate_Cli...