Postingan

Menampilkan postingan dari Mei, 2010

Syntax MySql Pada Visual Basics 6

Perintah Insert Conn.BeginTrans MySqL = "INSERT INTO Nama_table (Filed1, Filed2, Filed3) Values ('" & String1 & "','" & String2 & "','" & String3 & "')" Conn.Execute MySqL Conn.CommitTrans Perintah Update Conn.BeginTrans MySqL = "UPDATE Nama_table SET Filed1 = '" & String1 & "', Filed2 = '" & String2 & "', Filed3 = '" & String3 & "' Where Field4 ='" & String4 & "'" Conn.Execute MySqL Conn.CommitTrans Perintah Delete Conn.BeginTrans MySqL = "DELETE from Nama_table where Field1 = '" & String1 & "' and Field2 = '" & String2 & "'" Conn.Execute MySqL Conn.CommitTrans ..... .....

Code Menset Isi Text Box Menjadi Sentence Case

Option Explicit Dim KP As Boolean Dim SpaceBar As String Dim strResult, strTemp As String Private Sub KeyPress(KeyAscii As Integer) On Error Resume Next If Len(Text1) = 1 Then strResult = T ext1 strResult = UCase$(Left$(strResult, 1)) & Mid$(strResult, 2) Text1 = strResult Text1.SelStart = Len(strResult) + 1 ElseIf SpaceBar = "Y" Then strTemp = UCase$(Right$(Text1, 1)) Text1 = strResult & strTemp Text1.SelStart = Len(strResult) + 1 SpaceBa r = "" End If strResult = Text1 If KeyAscii = 32 Then KP = True ElseIf KP = True Then SpaceBar = "Y" KP = False End If End Sub

MDI Minimized Form

Private Sub MDIForm_Resize() ' minimum width and height of the form Const conMinHeight = 3000 Const conMinWidth = 9000 ' differentials between the flexgrid and the ' forms dimensions Const conFlxWidthDiff = 240 Const conflxHeightDiff = 1200 Dim lngFormWidth As Long Dim lngFormHeight As Long With Me ' determine the dimensions of the form lngFormWidth = .Width If lngFormWidth < conMinWidth Then lngFormWidth = conMinWidth End If lngFormHeight = .Height If lngFormHeight < conMinHeight Then lngFormHeight = conMinHeight End If If Not ((Me.WindowState = vbMaximized) Or (Me.WindowState = vbMinimized)) Then ' set form dimensions .Width = lngFormWidth .Height = lngFormHeight End If End With ' set flexgrid dimensions 'With flx '.Width = lngFormWidth - conFlxWidthDiff '.Height = lngFormHeight - conflxHeightDiff 'End With End Sub ' Form_Resize