Skip to content

Instantly share code, notes, and snippets.

View facebookegypt's full-sized avatar

Ahmed Samir facebookegypt

View GitHub Profile
@facebookegypt
facebookegypt / gist:8124742
Created December 25, 2013 16:32
VB 2010 Node font
'Visual Basic Online Course
'VB 2010 Change the node Font
Dim ColRoot As treeNode
ColRoot.NodeFont = New System.Drawing.Font("Arial", 9, FontStyle.Underline)
ColRoot.ForeColor = Color.Brown
@facebookegypt
facebookegypt / gist:8032044
Last active December 31, 2015 19:09
Advantage Database in Visual Basic 2010 Get Columns DataType
'Visual Basic Online Course
'Advantage Database in VB2010
'Get Columns DataType or Field_Type Name
Private Sub Button1_Click(sender As System.Object, _
e As System.EventArgs) _
Handles Button1.Click
Dim CN1 As New OleDbConnection
CN1.ConnectionString = ("Your ConStr")
CN1.Open
Dim Tcmd As New OleDbCommand
@facebookegypt
facebookegypt / gist:8006419
Created December 17, 2013 15:11
VB 2010 Expand and Collapse two treeviews at the same time according to one another
'Visual Basic Online Course [adonetaccess2003.blogspot.com]
'Expand and Collapse Treeviews
'Find a node in one treeview that matches another node
'in another treeview.
Private Sub TV1_AfterCollapse(sender As Object, _
e As System.Windows.Forms.TreeViewEventArgs) _
Handles TV1.AfterCollapse
TV1.SelectedNode = e.Node
@facebookegypt
facebookegypt / gist:7977299
Created December 15, 2013 19:52
VB 2010 Compare Two Treeviews and return the differences result
'Visual Basic Online Course - Arrays
'http://www.evry1.net/VBNet/
'Compare Two Arrays and Return differences - Dec./2013
'By/ evry1falls [Google me]
Public Class Form1
Private Sub Form1_Load(sender As System.Object, _
e As System.EventArgs) Handles MyBase.Load
'Nothing to be done here
End Sub
'Visual Basic 2010 Advantage Data Dictionary
'AdsConnection from VB 2010
Imports Advantage.Data.Provider
Public Class Connection
Private Sub CreateNewTable()
Dim Con As New AdsConnection
Con.ConnectionString = _
("Data Source=D:\Project\Bin\Debug\MyDb.add;" & _
@facebookegypt
facebookegypt / gist:7832990
Created December 6, 2013 22:09
AdsConnection.GetSchema vb.net
'AdsConnection.GetSchema
'How to retrieve Ads Data Dictionary Tables, Columns in a treeview control
Imports Advantage.Data.Provider
'Create VB 2010 Project (MyProject)
Public Class MyProject
Dim CN As New AdsConnection
Dim CMD As New AdsCommand
Public Sub GetAllTables(con As AdsConnection, TrV As TreeView)
@facebookegypt
facebookegypt / gist:7650517
Created November 25, 2013 23:04
Visual Basic Online Course - Create VB6 Round and Transparent Form Part 3
Visual Basic Online Course
'Create VB6 Round and Transparent Form
'Http://vb6access2003.blogspot.com
'Move Form From Command0
Private Sub Command0_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> vbLeftButton Then
Exit Sub
End If
'Visual Basic Online Course
'VB6 Create Rounded and Transparent Form
'FrmShapedForm Code
Option Explicit
Dim mChildFormRegion As Long
Private Sub Form_Load()
Dim i
Me.WindowState = vbNormal
'Visual Basic Online Course
'VB6 Create Rounded and Transparent Form
'Move Form from any point on it.
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> vbLeftButton Then
Exit Sub
End If
ReleaseCapture
'visual Basic Online Course
'Create Rounded and Transparent Form
'Http://vb6access2003.blogspot.com
Dim w As Single, h As Single
Dim edge As Single, topEdge As Single
Dim i As Integer
Dim r As Long
Dim outer As Long, inner As Long