Sampaikanlah Walaupun Satu Ayat © Khoni Iswantomo

Archive for Nopember, 2010

Dir Exists function for VB 4 / 5 / 6

DirExists - Check that a directory exists
‘ Return True if a directory exists
‘ (the directory name can also include a trailing backslash)

Function DirExists(DirName As String) As Boolean
On Error GoTo ErrorHandler
‘ test the directory attribute
DirExists = GetAttr(DirName) And vbDirectory
‘ if […]

vb 6 Equivelant PHP explode()

Public Function Explode(Char As String, TheString As String) As Variant
Dim LastOccurence As Long, CurrentChar As String, i As Long
Dim OutputList() As String, SectionLength As Long, Section As String
ReDim OutputList(0) As String
LastOccurence = 0
For i = 1 To Len(Trim(TheString))
CurrentChar = Mid$(Trim(TheString), i, 1)
If CurrentChar = Char Then
SectionLength = i - (LastOccurence + 1)
Section = Mid$(Trim(TheString), LastOccurence […]

Print Screen Form dengan bahasa VB 6.0

Print screen form :
‘=== tulis di modul, deklasrasi fungsi dan variabel untuk print screen
Option Explicit
Private Declare Function GetDC Lib “user32″ _
(ByVal hwnd As Long) As Long
Private Declare Function GetWindowDC Lib “user32″ _
(ByVal hwnd As Long) As Long
Private Declare Function BitBlt Lib “gdi32″ _
(ByVal hDestDC As Long, _
ByVal x As Long, ByVal y As Long, _
ByVal […]