Skip to content

Instantly share code, notes, and snippets.

View facebookegypt's full-sized avatar

Ahmed Samir facebookegypt

View GitHub Profile
'Visual Basic Online Course - Create Rounded and Transparent Form
'http://vb6access2003.blogspot.com
If inEffect = 0 Then
mFormRegion = CreateRectRgn(0, 0, w, h)
SetWindowRgn hwnd, mFormRegion, True
Exit Sub
End If
@facebookegypt
facebookegypt / gist:7649821
Created November 25, 2013 22:09
VB6 - Rounded Form Part 2
WM_NCLBUTTONDOWN, HTCAPTION, 0&
@facebookegypt
facebookegypt / gist:7648687
Created November 25, 2013 20:52
VB6 - Prevent your application from running twice
'Visual Basic Online Course
'Prevent your application from running twice VB6
'http://vb6accesss2003.blogspot.com
'Add Module
'then, from Project => Properties =>
'Start up Object: => Sub Main
Private Sub main()
'Check for previous instance and exit if found.
@facebookegypt
facebookegypt / gist:7648422
Created November 25, 2013 20:36
VB6 - Prevent application from Running twice at the same time
'Visual Basic Online Course
'Prevent application from Running twice at the same time
'http://vb6access2003.blogspot.com
Option Explicit
Dim Retvalue, GD As String
Dim Reset As Integer
Private Sub Command1_Click()
DeleteSetting "A", "0", "RunCount"
GD = 0
'Visual Basic Online Course - Excel 2003 Part 2
'Automate Excel from Visual Basic
'Save Excel *.xls file using CommonDialog Box
Dim FileNm As String
Cdl1.Filter = "Microsoft Excel 2003 (.Xls)*.Xls"
Cdl1.ShowSave
FileNm = Cdl1.FileName
oWB.SaveAs FileNm
@facebookegypt
facebookegypt / gist:7617522
Created November 23, 2013 17:32
blackboard
'Visual Basic Online Course - Blackboard
'VB6 for beginners
If Button = vbLeftButton Then
DrawOn = True
PicDraw.CurrentX = X
PicDraw.CurrentY = Y
End If
@facebookegypt
facebookegypt / gist:7617490
Created November 23, 2013 17:29
blackboard
'Visual Basic Online Course - Blackboard
'VB6 for beginners
Dim Response As Integer
Response = MsgBox("Are you sure you want to start a new drawing?", _
vbYesNo + vbQuestion, _
"New Drawing")
If Response = vbYes Then PicDraw.Cls
@facebookegypt
facebookegypt / gist:7617470
Created November 23, 2013 17:28
blackboard
'Visual Basic Online Course - Blackboard
'VB6 for beginners
If Response = vbYes Then
Dim Response As Integer
Response = MsgBox("Are you sure you want to exit the Blackboard?", _
vbYesNo + vbCritical + vbDefaultButton2, _
"Exit Blackboard")
End If
@facebookegypt
facebookegypt / gist:7617439
Created November 23, 2013 17:25
blackboard
'Visual Basic Online Course - Blackboard
'Visual Basic 6.0 for beginners
Dim I As Integer
For I = 0 To 7
LblColor(I).BackColor = QBColor(I + 8)
Next I
PicDraw.ForeColor = QBColor(15) ' Bright White
PicDraw.BackColor = QBColor(0) ' Black
@facebookegypt
facebookegypt / gist:7617370
Created November 23, 2013 17:18
VB6 Excel2003 Part 2
'Visual Basic Online Course
'Automate Excel2003 from VB6
'Using CommonDialogBox to Save As ... new Excel *.xls
Dim FileNm As String
Cdl1.Filter = "Microsoft Excel 2003 (.Xls)*.Xls"
Cdl1.ShowSave
FileNm = Cdl1.FileName
oXL.DisplayAlerts = False
oXL.ActiveWorkbook.Close True, FileNm