0% found this document useful (0 votes)
8 views34 pages

WebBrowser Demo and Customization Guide

The document describes code for building a custom web browser application using .NET and Windows Forms. It includes code to: - Define constants for special folder locations and error codes - Declare functions for adding URLs to favorites, organizing favorites, file downloads from DLLs - Handle auto-complete and auto-append functionality in the URL textbox - Set up the initial layout of the form, menu strip, panel, and web browser control - Resize components on form resize

Uploaded by

khursheed3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views34 pages

WebBrowser Demo and Customization Guide

The document describes code for building a custom web browser application using .NET and Windows Forms. It includes code to: - Define constants for special folder locations and error codes - Declare functions for adding URLs to favorites, organizing favorites, file downloads from DLLs - Handle auto-complete and auto-append functionality in the URL textbox - Set up the initial layout of the form, menu strip, panel, and web browser control - Resize components on form resize

Uploaded by

khursheed3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

14.43.1.

WebBrowser Demo

Imports [Link] public class WebBrowserDemo public Shared Sub Main [Link](New Form1) End Sub End class Public Class Form1 Private Sub txtURL_KeyDown(ByVal sender As Object, ByVal e As [Link] If ([Link] = [Link]) Then [Link]([Link]) End If End Sub

Private Sub btnBack_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub btnForward_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub btnHome_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub End Class <[Link]()> _ Partial Class Form1 Inherits [Link] 'Form overrides dispose to clean up the component list. <[Link]()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then [Link]() End If [Link](disposing) End Sub 'Required by the Windows Form Designer Private components As [Link] 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <[Link]()> _ Private Sub InitializeComponent() Me.ToolStrip1 = New [Link] Me.ToolStripLabel1 = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] Me.WebBrowser1 = New [Link] [Link]() [Link]() '

'ToolStrip1 ' [Link](New [Link]() {[Link] [Link] = New [Link](0, 0) [Link] = "ToolStrip1" [Link] = New [Link](703, 25) [Link] = 0 [Link] = "ToolStrip1" ' 'ToolStripLabel1 ' [Link] = "ToolStripLabel1" [Link] = New [Link](50, 22) [Link] = "Address:" ' 'txtURL ' [Link] = "txtURL" [Link] = New [Link](200, 25) ' 'btnBack ' [Link] = [Link] [Link] = [Link] [Link] = "btnBack" [Link] = New [Link](33, 22) [Link] = "Back" ' 'btnForward ' [Link] = [Link] [Link] = [Link] [Link] = "btnForward" [Link] = New [Link](51, 22) [Link] = "Forward" ' 'btnHome ' [Link] = [Link] [Link] = [Link] [Link] = "btnHome" [Link] = New [Link](38, 22) [Link] = "Home" ' 'WebBrowser1 ' [Link] = [Link] [Link] = New [Link](0, 25) [Link] = New [Link](20, 20) [Link] = "WebBrowser1" [Link] = New [Link](703, 429) [Link] = 1 ' 'Form1 ' [Link] = New [Link](6.0!, 13.0!)

[Link] = [Link] [Link] = New [Link](703, 454) [Link](Me.WebBrowser1) [Link](Me.ToolStrip1) [Link] = "Form1" [Link] = [Link] [Link] = "MyBrowser" [Link](False) [Link]() [Link](False) [Link]() End Sub Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents End Class ToolStrip1 As [Link] WebBrowser1 As [Link] ToolStripLabel1 As [Link] txtURL As [Link] btnBack As [Link] btnForward As [Link] btnHome As [Link]

[Link] Your own browser based on DLL

Imports [Link] Imports [Link] public class CreateYourOwnBrowserBasedOnDLL public Shared Sub Main [Link](New Form1) End Sub End class Public Class Form1 Dim szPath As String ' Start\Program Public Const CSIDL_PROGRAMS As Short = &H2S ' My Documents Public Const CSIDL_PERSONAL As Short = &H5S ' {User}\Bookmark Windows NT Public Const CSIDL_FAVORITES As Short = &H6S ' Start\Program\Boot Public Const CSIDL_STARTUP As Short = &H7S ' {User}\Start Windows NT Public Const CSIDL_STARTMENU As Short = &HBS ' {User}\Desktop Windows NT Public Const CSIDL_DESKTOPDIRECTORY As Short = &H10S ' {Windows}\ShellNew Public Const CSIDL_TEMPLATES As Short = &H15S

' All Users\Start Windows NT Public Const CSIDL_COMMON_STARTMENU As Short = &H16S ' All Users\Program Windows NT Public Const CSIDL_COMMON_PROGRAMS As Short = &H17S ' All Users\Boot Windows NT Public Const CSIDL_COMMON_STARTUP As Short = &H18S ' All Users\Desktop Windows NT Public Const CSIDL_COMMON_DESKTOPDIRECTORY As Short = &H19S ' {Windows}\Application Data Public Const CSIDL_APPDATA As Short = &H1AS ' All Users\Bookmark Windows NT Public Const CSIDL_COMMON_FAVORITES As Short = &H1FS ' All Users\Application Data Windows NT Public Const CSIDL_COMMON_APPDATA As Short = &H23S ' nShowCmd Public Const Public Const Public Const Public Const Public Const Public Const Public Const Public Const Public Const Public Const Public Const SW_HIDE As Short = 0 SW_SHOWNORMAL As Short = 1 SW_SHOWMINIMIZED As Short = 2 SW_SHOWMAXIMIZED As Short = 3 SW_MAXIMIZE As Short = 3 SW_SHOWNOACTIVATE As Short = 4 SW_SHOW As Short = 5 SW_MINIMIZE As Short = 6 SW_SHOWMINNOACTIVE As Short = 7 SW_SHOWNA As Short = 8 SW_RESTORE As Short = 9

' Error Code Public Const ERROR_FILE_NOT_FOUND As Short = 2 Public Const ERROR_PATH_NOT_FOUND As Short = 3 Public Const ERROR_BAD_FORMAT As Short = 11 Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Public Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const Const SE_ERR_FNF As Short = 2 SE_ERR_PNF As Short = 3 SE_ERR_ACCESSDENIED As Short = 5 SE_ERR_OOM As Short = 8 SE_ERR_SHARE As Short = 26 SE_ERR_ASSOCINCOMPLETE As Short = 27 SE_ERR_DDETIMEOUT As Short = 28 SE_ERR_DDEFAIL As Short = 29 SE_ERR_DDEBUSY As Short = 30 SE_ERR_NOASSOC As Short = 31 SE_ERR_DLLNOTFOUND As Short = 32 SHACF_DEFAULT As Integer = &H0S SHACF_FILESYSTEM As Integer = &H1S SHACF_URLHISTORY As Integer = &H2S SHACF_URLMRU As Integer = &H4S SHACF_USETAB As Integer = &H8S SHACF_FILESYS_ONLY As Integer = &H10S SHACF_AUTOSUGGEST_FORCE_ON As Integer = &H10000000 SHACF_AUTOSUGGEST_FORCE_OFF As Integer = &H20000000 SHACF_AUTOAPPEND_FORCE_ON As Integer = &H40000000 SHACF_AUTOAPPEND_FORCE_OFF As Integer = &H80000000 SHACF_URLALL As Integer = (SHACF_URLHISTORY Or SHACF_URLMRU)

Public Declare Function SHAutoComplete Lib "[Link]" _ (ByVal hwndEdit As Integer, _ ByVal dwFlags As Integer) As Integer Public Declare Function DoAddToFavDlg _ Lib "[Link]" _ (ByVal hwnd As Integer, _ ByVal szPath As String, _ ByVal nSizeOfPath As Integer, _ ByVal szTitle As String, _ ByVal nSizeOfTitle As Integer, _ ByVal pidl As Integer) As Integer Public Declare Function SHGetSpecialFolderLocation _ Lib "[Link]" _ (ByVal hwndOwner As Integer, _ ByVal nFolder As Integer, _ ByRef pidl As Integer) As Integer Private Declare Function DoFileDownload Lib "[Link]" _ (ByVal lpszFile As String) As Integer Public Declare Function WritePrivateProfileString _ Lib "kernel32" Alias "WritePrivateProfileStringA" _ (ByVal lpSectionName As String, _ ByVal lpKeyName As String, _ ByVal lpString As String, _ ByVal lpFileName As String) As Integer Public Declare Function DoOrganizeFavDlg _ Lib "[Link]" _ (ByVal hWnd As Integer, _ ByVal lpszRootFolder As String) As Integer Public Declare Function SHGetFolderPath _ Lib "[Link]" Alias "SHGetFolderPathA" _ (ByVal hwndOwner As Integer, _ ByVal nFolder As Integer, _ ByVal hToken As Integer, _ ByVal dwReserved As Integer, _ ByVal lpszPath As String) As Integer Private Sub AutoComplete(ByVal check1 As Boolean, ByVal check2 As Boolean) Dim dwFlags As Integer If check1 Then dwFlags = SHACF_URLALL Or SHACF_FILESYSTEM Or _ SHACF_AUTOSUGGEST_FORCE_ON If check2 Then dwFlags = dwFlags Or SHACF_AUTOAPPEND_FORCE_ON Else dwFlags = dwFlags Or SHACF_AUTOAPPEND_FORCE_OFF End If

Else dwFlags = SHACF_URLALL Or SHACF_FILESYSTEM Or _ SHACF_AUTOSUGGEST_FORCE_OFF If check2 Then dwFlags = dwFlags Or SHACF_AUTOAPPEND_FORCE_ON Else dwFlags = dwFlags Or SHACF_AUTOAPPEND_FORCE_OFF End If End If SHAutoComplete([Link].ToInt32, dwFlags) End Sub

Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) [Link] = 0 [Link] = 0 [Link] = [Link] [Link] = 0 [Link] = [Link] [Link] = [Link] - [Link] - 5 [Link] = [Link] + [Link] [Link] = 0 [Link] = [Link] [Link] = [Link] - [Link] - [Link] [Link]("c:\") End Sub

Private Sub Form1_Resize(ByVal sender As [Link], ByVal e As [Link] [Link] = 0 [Link] = 0 [Link] = [Link] [Link] = 0 [Link] = [Link] [Link] = [Link] - [Link] - 5 [Link] = [Link] + [Link] [Link] = 0 [Link] = [Link] [Link] = [Link] - [Link] - [Link] End Sub

Private Sub BackBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub ForwardBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub StopBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub RefreshBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub HomeBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub SearchBtn_Click(ByVal sender As [Link], ByVal e As [Link] [Link]() End Sub

Private Sub TextBox1_KeyPress(ByVal sender As [Link], ByVal e As [Link] If [Link] = [Link](13) Then [Link]([Link]) End If End Sub

Private Sub WebBrowser1_Navigated(ByVal sender As [Link], ByVal e As System. [Link] = [Link] [Link] = [Link] End Sub

Private Sub ToolStripMenuItem1_Click(ByVal sender As [Link], ByVal e As Syst Dim NewForm As New Form1() Dim strURL As String = [Link] [Link]() [Link]() [Link](strURL) End Sub

Private Sub ToolStripMenuItem2_Click(ByVal sender As [Link], ByVal e As Syst [Link] = "All Files (*.*)|*.*" [Link] = "Open" If [Link]() = [Link] Then [Link]([Link]) End If End Sub

Private Sub ToolStripMenuItem3_Click(ByVal sender As [Link], ByVal e As Syst Dim proc As New [Link]() Dim SystemDir As String = [Link] [Link](SystemDir & "\[Link]") End Sub

Private Sub ToolStripMenuItem4_Click(ByVal sender As [Link], ByVal e As Syst Dim proc As New [Link]() Dim SystemDir As String = [Link] [Link]("[Link]", "[Link]") End Sub

Private Sub ToolStripMenuItem5_Click(ByVal sender As [Link], ByVal e As Syst If [Link] <> "" Then [Link]("view-source:" & [Link]) End If

End Sub

Private Sub ToolStripMenuItemMail_Click(ByVal sender As [Link], ByVal e As S [Link]("[Link] bcc=ccc@[Link]&su End Sub

Private Sub ToolStripMenuItem6_Click(ByVal sender As [Link], ByVal e As Syst [Link] = Not [Link] AutoComplete([Link], [Link]) End Sub

Private Sub ToolStripMenuItem7_Click(ByVal sender As [Link], ByVal e As Syst [Link] = Not [Link] AutoComplete([Link], [Link]) End Sub

Private Sub ToolStripMenuItem11_Click(ByVal sender As [Link], ByVal e As Sys Try DoFileDownload([Link]) Catch ex As Exception MsgBox([Link]()) End Try End Sub

Private Sub ToolStripMenuItem9_Click(ByVal sender As [Link], ByVal e As Syst Dim proc As New [Link]() Dim SystemDir As String = [Link] Dim szPath As String = "[Link] If szPath <> "" Then Try '[Link] [Link],OpenURL %l [Link]("[Link]", "[Link],OpenURL " & szPath) Catch ex As Exception [Link]([Link]()) End Try End If End Sub

Private Sub ToolStripMenuItem8_Click(ByVal sender As [Link], ByVal e As Syst Dim szTitle As String Dim dwReturn As Integer Dim pidl As Integer szTitle = "My Bookmark" & vbNullChar szPath = Space(256) & vbNullChar dwReturn = SHGetSpecialFolderLocation(Handle.ToInt32, _ CSIDL_FAVORITES, pidl) If dwReturn = 0 Then dwReturn = DoAddToFavDlg(Handle.ToInt32, szPath, _ Len(szPath), szTitle, Len(szTitle), pidl) If dwReturn = 1 Then szPath = [Link](0, [Link](vbNullChar)) WritePrivateProfileString("InternetShortcut", "URL", _ [Link], szPath) End If End If End Sub

Private Dim Dim Dim

Sub ToolStripMenuItem10_Click(ByVal sender As [Link], ByVal e As Sys lpszRootFolder As String lpszPath As String dwReturn As Integer

lpszPath = Space(256) dwReturn = SHGetFolderPath(Handle.ToInt32, _ CSIDL_FAVORITES, 0, &H0S, lpszPath) If dwReturn = 0 Then lpszRootFolder = [Link](0, _ [Link](vbNullChar)) End If DoOrganizeFavDlg(Handle.ToInt32, lpszRootFolder) End Sub End Class <[Link]()> _ Partial Class Form1 Inherits [Link] 'Form overrides dispose to clean up the component list. <[Link]()> _ Protected Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then [Link]() End If [Link](disposing) End Sub 'Required by the Windows Form Designer Private components As [Link] 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <[Link]()> _ Private Sub InitializeComponent() Me.Panel1 = New [Link] Me.ToolStrip1 = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] [Link] = New [Link] Me.Label1 = New [Link] Me.TextBox1 = New [Link] Me.ToolStripStatusLabel1 = New [Link] Me.StatusStrip1 = New [Link] Me.OpenFileDialog1 = New [Link] Me.ToolStripMenuItem4 = New [Link]

Me.ToolStripMenuItem3 = New [Link] [Link] = New [Link] Me.ToolStripMenuItem1 = New [Link] Me.ToolStripMenuItem2 = New [Link] Me.ToolStripMenuItem5 = New [Link] [Link] = New [Link] Me.ToolStripMenuItem6 = New [Link] Me.ToolStripMenuItem7 = New [Link] Me.MenuStrip1 = New [Link] [Link] = New [Link] Me.ToolStripMenuItem8 = New [Link] Me.ToolStripMenuItem9 = New [Link] Me.ToolStripMenuItem10 = New [Link] Me.ToolStripMenuItem11 = New [Link] Me.WebBrowser1 = New [Link] [Link]() [Link]() [Link]() [Link]() [Link]() ' 'Panel1 ' [Link](Me.ToolStrip1) [Link](Me.Label1) [Link](Me.TextBox1) [Link] = New [Link](-4, 27) [Link] = "Panel1" [Link] = New [Link](546, 59) [Link] = 11 ' 'ToolStrip1 ' [Link](New [Link]() {[Link] [Link] = New [Link](0, 0) [Link] = "ToolStrip1" [Link] = New [Link](546, 25) [Link] = 11 [Link] = "ToolStrip1" ' 'BackBtn ' [Link] = [Link] [Link] = [Link] [Link] = "BackBtn" [Link] = New [Link](45, 22) [Link] = "Back" ' 'ForwardBtn ' [Link] = [Link] [Link] = [Link] [Link] = "ForwardBtn" [Link] = New [Link](45, 22) [Link] = "Next" '

'StopBtn ' [Link] = [Link] [Link] = [Link] [Link] = "StopBtn" [Link] = New [Link](33, 22) [Link] = "Stop" ' 'RefreshBtn ' [Link] = [Link] [Link] = [Link] [Link] = "RefreshBtn" [Link] = New [Link](33, 22) [Link] = "Refresh" ' 'HomeBtn ' [Link] = [Link] [Link] = [Link] [Link] = "HomeBtn" [Link] = New [Link](45, 22) [Link] = "Home" ' 'SearchBtn ' [Link] = [Link] [Link] = [Link] [Link] = "SearchBtn" [Link] = New [Link](45, 22) [Link] = "Search" ' 'Label1 ' [Link] = New [Link](5, 28) [Link] = "Label1" [Link] = New [Link](60, 18) [Link] = 10 [Link] = "URL:" ' 'TextBox1 ' [Link] = New [Link](71, 28) [Link] = "TextBox1" [Link] = New [Link](463, 21) [Link] = 9 [Link] = "c:\" ' 'ToolStripStatusLabel1 ' [Link] = "ToolStripStatusLabel1" [Link] = New [Link](23, 17) [Link] = "c:\" ' 'StatusStrip1 '

[Link](New [Link]() {[Link] [Link] = New [Link](0, 228) [Link] = "StatusStrip1" [Link] = New [Link](541, 22) [Link] = 10 ' 'OpenFileDialog1 ' [Link] = "OpenFileDialog1" ' 'ToolStripMenuItem4 ' [Link] = "ToolStripMenuItem4" [Link] = New [Link](202, 22) [Link] = "IE Option" ' 'ToolStripMenuItem3 ' [Link] = "ToolStripMenuItem3" [Link] = New [Link](202, 22) [Link] = "Concurrent" ' 'MenuItemFile ' [Link](New [Link]() ripMenuItem7}) [Link] = "MenuItemFile" [Link] = New [Link](41, 20) [Link] = "File" ' 'ToolStripMenuItem1 ' [Link] = "ToolStripMenuItem1" [Link] = New [Link](202, 22) [Link] = "New" ' 'ToolStripMenuItem2 ' [Link] = "ToolStripMenuItem2" [Link] = New [Link](202, 22) [Link] = "Open" ' 'ToolStripMenuItem5 ' [Link] = "ToolStripMenuItem5" [Link] = New [Link](202, 22) [Link] = "Source" ' 'ToolStripMenuItemMail ' [Link] = "ToolStripMenuItemMail" [Link] = New [Link](202, 22) [Link] = "Email" ' 'ToolStripMenuItem6 '

[Link] = "ToolStripMenuItem6" [Link] = New [Link](202, 22) [Link] = "Suggestion" ' 'ToolStripMenuItem7 ' [Link] = "ToolStripMenuItem7" [Link] = New [Link](202, 22) [Link] = "Append" ' 'MenuStrip1 ' [Link](New [Link]() {[Link] [Link] = New [Link](0, 0) [Link] = "MenuStrip1" [Link] = New [Link](541, 24) [Link] = 9 [Link] = "MenuStrip1" ' 'ToolStripMenuItemFav ' [Link](New [Link] [Link] = "ToolStripMenuItemFav" [Link] = New [Link](53, 20) [Link] = "Bookmark" ' 'ToolStripMenuItem8 ' [Link] = "ToolStripMenuItem8" [Link] = New [Link](190, 22) [Link] = "Add Bookmark" ' 'ToolStripMenuItem9 ' [Link] = "ToolStripMenuItem9" [Link] = New [Link](190, 22) [Link] = "Internet URL Shortcut" ' 'ToolStripMenuItem10 ' [Link] = "ToolStripMenuItem10" [Link] = New [Link](190, 22) [Link] = "Organize" ' 'ToolStripMenuItem11 ' [Link] = "ToolStripMenuItem11" [Link] = New [Link](190, 22) [Link] = "Download File" ' 'WebBrowser1 ' [Link] = New [Link](5, 93) [Link] = New [Link](20, 20) [Link] = "WebBrowser1" [Link] = New [Link](536, 120)

[Link] = 12 ' 'Form1 ' [Link] = New [Link](6.0!, 12.0!) [Link] = [Link] [Link] = New [Link](541, 250) [Link](Me.WebBrowser1) [Link](Me.Panel1) [Link](Me.StatusStrip1) [Link](Me.MenuStrip1) [Link](False) [Link]() [Link](False) [Link]() [Link](False) [Link]() [Link](False) [Link]() [Link](False) [Link]() End Sub Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents End Class

Panel1 As [Link] ToolStrip1 As [Link] BackBtn As [Link] ForwardBtn As [Link] StopBtn As [Link] RefreshBtn As [Link] HomeBtn As [Link] SearchBtn As [Link] Label1 As [Link] TextBox1 As [Link] ToolStripStatusLabel1 As [Link] StatusStrip1 As [Link] OpenFileDialog1 As [Link] ToolStripMenuItem4 As [Link] ToolStripMenuItem3 As [Link] MenuItemFile As [Link] ToolStripMenuItem1 As [Link] ToolStripMenuItem2 As [Link] ToolStripMenuItem5 As [Link] MenuStrip1 As [Link] ToolStripMenuItem6 As [Link] ToolStripMenuItem7 As [Link] ToolStripMenuItemFav As [Link] ToolStripMenuItem8 As [Link] ToolStripMenuItem9 As [Link] ToolStripMenuItem10 As [Link] ToolStripMenuItem11 As [Link] WebBrowser1 As [Link] ToolStripMenuItemMail As [Link]

[Link] LinkLabel to start a browser

Imports [Link] public class LinkLableSample public Shared Sub Main [Link](New Form1) End Sub End class Public Class Form1 Inherits [Link] Public Sub New() [Link]() InitializeComponent() End Sub Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then [Link]() End If End If [Link](disposing) End Sub Private components As [Link]

Friend WithEvents LinkLabel1 As [Link] <[Link]()> Private Sub InitializeComponent() Me.LinkLabel1 = New [Link] [Link]() ' 'LinkLabel1 ' [Link] = New [Link]("Microsoft Sans Serif", 15.75!, Sy [Link] = New [Link](88, 32) [Link] = "LinkLabel1" [Link] = New [Link](112, 32) [Link] = 0 [Link] = True [Link] = "[Link]" ' 'Form1 ' [Link] = New [Link](5, 13) [Link] = New [Link](292, 102) [Link](Me.LinkLabel1) [Link](False)

End Sub

Private Sub LinkLabel1_LinkClicked(ByVal sender As [Link], ByVal e As System [Link] = True [Link]("[Link] End Sub End Class

[Link] 1

Imports [Link] Imports [Link].Drawing2D Imports [Link] public class Scribble public Shared Sub Main [Link](New frmScribble) End Sub End class

'Sams Teach Yourself Visual Basic .NET in 21 Days 'By Lowell Mauer 'Published 2001 'Sams Publishing 'ISBN 0672322714 Public Class frmScribble Inherits [Link] #Region " Windows Form Designer generated code " Public Sub New() [Link]() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then [Link]() End If

End If [Link](disposing) End Sub Private WithEvents pnlTools As [Link] Private WithEvents optPen As [Link] Private WithEvents picDraw As [Link] Private WithEvents optShape As [Link] Private WithEvents optText As [Link] Private WithEvents pnlOptions As [Link] Private WithEvents mnuMain As [Link] Private WithEvents mnuFile As [Link] Private WithEvents mnuFileNew As [Link] Private WithEvents mnuFileOpen As [Link] Private WithEvents mnuFileSave As [Link] Private WithEvents mnuFileSep As [Link] Private WithEvents mnuFileExit As [Link] Private WithEvents dlgOpen As [Link] Private WithEvents dlgSave As [Link] Private WithEvents pnlPenOptions As [Link] Private WithEvents lblColor As [Link] Private WithEvents cboColors As [Link] Private WithEvents lblPenWidth As [Link] Private WithEvents updPenWidth As [Link] Private WithEvents pnlShapeOptions As [Link] Private WithEvents pnlTextOptions As [Link] Private WithEvents lblText As [Link] Private WithEvents txtText As [Link] Private WithEvents lblTextFont As [Link] Private WithEvents cboTextFont As [Link] Private WithEvents lblFontSize As [Link] Private WithEvents updFontSize As [Link] Private WithEvents lblShapeType As [Link] Private WithEvents cboShapeType As [Link] Private WithEvents lblShapeHeight As [Link] Private WithEvents updShapeHeight As [Link] Private WithEvents updShapeWidth As [Link] Private WithEvents lblShapeWidth As [Link] 'Required by the Windows Form Designer Private components As [Link] 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <[Link]()> Private Sub InitializeComponent() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]()

[Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() [Link] = New [Link]() CType([Link], [Link]).BeginInit() [Link]() [Link]() CType([Link], [Link]).BeginInit() [Link]() CType([Link], [Link]).BeginInit() [Link]() [Link]() [Link]() CType([Link], [Link]).BeginInit() [Link]() [Link]() [Link]() [Link]() ' 'updShapeHeight ' [Link] = New [Link](64, 32) [Link] = New Decimal(New Integer() {1000, 0, 0, 0}) [Link] = New Decimal(New Integer() {1, 0, 0, 0}) [Link] = "updShapeHeight" [Link] = New [Link](48, 20) [Link] = 3 [Link] = New Decimal(New Integer() {20, 0, 0, 0}) ' 'cboColors ' [Link] = [Link] [Link] = 136 [Link] = New [Link](8, 24) [Link] = "cboColors" [Link] = New [Link](136, 21) [Link] = 2

' 'pnlShapeOptions ' [Link](New [Link]() {[Link] [Link] = New [Link](160, 8) [Link] = "pnlShapeOptions" [Link] = New [Link](274, 56) [Link] = 0 ' 'lblShapeWidth ' [Link] = New [Link](128, 32) [Link] = "lblShapeWidth" [Link] = New [Link](48, 16) [Link] = 2 [Link] = "Width:" ' 'updShapeWidth ' [Link] = New [Link](184, 32) [Link] = New Decimal(New Integer() {1000, 0, 0, 0}) [Link] = New Decimal(New Integer() {1, 0, 0, 0}) [Link] = "updShapeWidth" [Link] = New [Link](48, 20) [Link] = 3 [Link] = New Decimal(New Integer() {20, 0, 0, 0}) ' 'lblShapeHeight ' [Link] = New [Link](8, 32) [Link] = "lblShapeHeight" [Link] = New [Link](48, 16) [Link] = 2 [Link] = "Height:" ' 'cboShapeType ' [Link] = [Link] [Link] = 121 [Link] = New [Link](64, 8) [Link] = "cboShapeType" [Link] = New [Link](121, 21) [Link] = 1 ' 'lblShapeType ' [Link] = New [Link](8, 8) [Link] = "lblShapeType" [Link] = New [Link](48, 16) [Link] = 0 [Link] = "Type:" ' 'updPenWidth ' [Link] = New [Link](96, 8) [Link] = New Decimal(New Integer() {10, 0, 0, 0})

[Link] = New Decimal(New Integer() {1, 0, 0, 0}) [Link] = "updPenWidth" [Link] = New [Link](48, 20) [Link] = 1 [Link] = New Decimal(New Integer() {1, 0, 0, 0}) ' 'pnlTools ' [Link](New [Link]() {[Link], M [Link] = [Link] [Link] = "pnlTools" [Link] = New [Link](64, 332) [Link] = 0 ' 'optText ' [Link] = [Link] [Link] = New [Link](8, 88) [Link] = "optText" [Link] = New [Link](48, 36) [Link] = 0 [Link] = "Text" [Link] = [Link] ' 'optShape ' [Link] = [Link] [Link] = New [Link](8, 48) [Link] = "optShape" [Link] = New [Link](48, 36) [Link] = 0 [Link] = "Shape" [Link] = [Link] ' 'optPen ' [Link] = [Link] [Link] = True [Link] = New [Link](8, 8) [Link] = "optPen" [Link] = New [Link](48, 36) [Link] = 0 [Link] = True [Link] = "Pen" [Link] = [Link] ' 'picDraw ' [Link] = [Link] [Link] = [Link].Fixed3D [Link] = [Link] [Link] = New [Link](64, 0) [Link] = "picDraw" [Link] = New [Link](436, 260) [Link] = 2 [Link] = False

' 'pnlPenOptions ' [Link](New [Link]() {[Link] [Link] = New [Link](160, 8) [Link] = "pnlPenOptions" [Link] = New [Link](274, 56) [Link] = 0 ' 'lblPenWidth ' [Link] = New [Link](8, 8) [Link] = "lblPenWidth" [Link] = New [Link](80, 16) [Link] = 0 [Link] = "Pen Width:" ' 'mnuFileExit ' [Link] = 4 [Link] = [Link] [Link] = "E&xit" ' 'updFontSize ' [Link] = New [Link](208, 32) [Link] = New Decimal(New Integer() {72, 0, 0, 0}) [Link] = New Decimal(New Integer() {6, 0, 0, 0}) [Link] = "updFontSize" [Link] = New [Link](48, 20) [Link] = 5 [Link] = New Decimal(New Integer() {12, 0, 0, 0}) ' 'mnuMain ' [Link](New [Link]() {[Link]}) ' 'mnuFile ' [Link] = 0 [Link](New [Link]() {[Link] [Link] = "&File" ' 'mnuFileNew ' [Link] = 0 [Link] = [Link] [Link] = "&New" ' 'mnuFileOpen ' [Link] = 1 [Link] = [Link] [Link] = "&Open..." ' 'mnuFileSave

' [Link] = 2 [Link] = [Link] [Link] = "&Save" ' 'mnuFileSep ' [Link] = 3 [Link] = "-" ' 'cboTextFont ' [Link] = [Link] [Link] = 104 [Link] = New [Link](48, 32) [Link] = "cboTextFont" [Link] = New [Link](104, 21) [Link] = 3 ' 'pnlOptions ' [Link](New [Link]() {[Link] [Link] = [Link] [Link] = New [Link](64, 260) [Link] = "pnlOptions" [Link] = New [Link](436, 72) [Link] = 1 ' 'pnlTextOptions ' [Link](New [Link]() {[Link] [Link] = New [Link](160, 8) [Link] = "pnlTextOptions" [Link] = New [Link](274, 56) [Link] = 0 ' 'lblFontSize ' [Link] = New [Link](160, 32) [Link] = "lblFontSize" [Link] = New [Link](40, 16) [Link] = 4 [Link] = "Size:" ' 'lblTextFont ' [Link] = New [Link](8, 32) [Link] = "lblTextFont" [Link] = New [Link](40, 16) [Link] = 2 [Link] = "Font:" ' 'txtText ' [Link] = New [Link](48, 8) [Link] = "txtText"

[Link] = New [Link](208, 20) [Link] = 1 [Link] = "Scribble!" ' 'lblText ' [Link] = New [Link](8, 8) [Link] = "lblText" [Link] = New [Link](40, 16) [Link] = 0 [Link] = "Text:" ' 'lblColor ' [Link] = New [Link](8, 8) [Link] = "lblColor" [Link] = New [Link](48, 16) [Link] = 1 [Link] = "Color:" ' 'dlgSave ' [Link] = "bmp" [Link] = "Scribble1" [Link] = "Bitmap files|*.bmp|PNG files|*.png" ' 'dlgOpen ' [Link] = "bmp" [Link] = "Bitmap files|*.bmp|PNG files|*.png" ' 'frmScribble ' [Link] = New [Link](5, 13) [Link] = New [Link](500, 332) [Link](New [Link]() {[Link], [Link] [Link] = [Link] [Link] = [Link] [Link] = "frmScribble" [Link] = "Scribble" CType([Link], [Link]).EndInit() [Link](False) [Link](False) CType([Link], [Link]).EndInit() [Link](False) CType([Link], [Link]).EndInit() [Link](False) [Link](False) [Link](False) CType([Link], [Link]).EndInit() [Link](False) [Link](False) [Link](False) [Link](False) End Sub

#End Region #Region "Enumerations" Public Enum DrawingTools Pen Shape Text End Enum #End Region #Region "Member variables for properties" Private m_sFileName As String Private m_bDrawing As Boolean Private m_eCurrentTool As DrawingTools #End Region #Region "Private variables" Private oGraphics As [Link] Private oTool As Object Private sngX As Single Private sngY As Single #End Region #Region "Properties" Public Property FileName() As String Get Return m_sFileName End Get Set(ByVal Value As String) m_sFileName = Value End Set End Property Public Property Drawing() As Boolean Get Return m_bDrawing End Get Set(ByVal Value As Boolean) m_bDrawing = Value End Set End Property Public Property CurrentTool() As DrawingTools Get Return m_eCurrentTool End Get Set(ByVal Value As DrawingTools) m_eCurrentTool = Value 'destroy the existing tool If Not oTool Is Nothing Then CType(oTool, IDisposable).Dispose() End If End Set End Property

#End Region #Region "Menu commands" Private Sub mnuFileNew_Click(ByVal sender As [Link], _ ByVal e As [Link]) Handles [Link] [Link]([Link]) 'force the refresh [Link]() End Sub Private Sub mnuFileOpen_Click() If [Link] = [Link] Then [Link]([Link]) End If End Sub Private Sub mnuFileSave_Click(ByVal sender As Object, _ ByVal e As [Link]) Handles [Link] Dim sFileName As String Dim oFormat As [Link] 'get the filename to save to If [Link] = [Link] Then sFileName = [Link] Select Case [Link] Case 0 'save as bitmap oFormat = [Link] Case 1 'save as PNG oFormat = [Link] Case Else 'should never happen End Select 'possible exception on save Try [Link](sFileName, oFormat) Catch ex As Exception 'just display for now [Link]([Link], "Error saving file", _ [Link], [Link]) End Try End If End Sub Private Sub mnuFileExit_Click(ByVal sender As [Link], _ ByVal e As [Link]) Handles [Link] [Link]() End Sub #End Region #Region "PictureBox Event Handlers"

Private Sub picDraw_MouseMove(ByVal sender As Object, ByVal e As [Link] If [Link] Then 'this is only true if the current tool is a pen

[Link](oTool, sngX, sngY, e.X, e.Y) sngX = e.X sngY = e.Y 'force a redraw [Link]() End If End Sub

Private Sub picDraw_MouseUp(ByVal sender As Object, ByVal e As [Link] 'we can stop drawing now [Link] = False End Sub

Private Sub picDraw_MouseDown(ByVal sender As Object, ByVal e As [Link] 'start drawing 'Shape and Text are stamps, Pen works on MouseMove 'we need to create the tool and either draw it, or get ready to draw it Select Case [Link] Case [Link] Select Case [Link] Case "Rectangle" [Link](New SolidBrush([Link]([Link] e.X, _ e.Y, _ [Link], _ [Link]) Case "Ellipse" [Link](New SolidBrush([Link]([Link] e.X, _ e.Y, _ [Link], _ [Link]) Case Else End Select 'force a redraw [Link]() Case [Link] 'create a font oTool = New [Link]([Link], [Link] 'draw the text at the current mouse location [Link]([Link], _ oTool, New SolidBrush([Link]([Link])), _ e.X, e.Y) 'force a redraw [Link]() Case [Link] 'create the pen (for drawing in MouseMove) oTool = New [Link]([Link]([Link]), [Link] sngX = e.X sngY = e.Y [Link] = True End Select End Sub #End Region #Region "Other Event Handlers"

Private Sub frmScribble_Load(ByVal sender As Object, ByVal e As [Link]) H 'set up the Color ComboBox FillLists() 'create the graphics we'll be drawing on [Link] = New Bitmap([Link], [Link], [Link] [Link] = [Link]([Link]) 'set the background to white [Link]([Link]) 'set the initial tool to the Pen optPen_Click(Nothing, Nothing) End Sub

Private Sub optPen_Click(ByVal sender As Object, ByVal e As [Link]) Handl 'set the tool to a pen [Link] = [Link] 'hide all the other tool's panels [Link] = True [Link] = False [Link] = False End Sub

Private Sub optShape_Click(ByVal sender As Object, ByVal e As [Link]) Han 'set the tool to a Shape [Link] = [Link] 'hide all the other tool's panels [Link] = False [Link] = True [Link] = False End Sub

Private Sub optText_Click(ByVal sender As Object, ByVal e As [Link]) Hand 'set the tool to Text [Link] = [Link] 'hide all the other tool's panels [Link] = False [Link] = False [Link] = True End Sub #End Region #Region "Assorted methods" Private Sub FillLists() With [Link] .Add("Black") .Add("Red") .Add("Green") .Add("Blue") End With [Link] = 0 With [Link] .Add("Rectangle") .Add("Ellipse") End With [Link] = 0

With [Link] .Add("Arial") .Add("Times New Roman") .Add("Courier New") End With [Link] = 0 End Sub #End Region End Class

[Link] application buffered by Bitmap

Imports Imports Imports Imports

[Link] [Link].Drawing2D [Link] [Link]

public class ScribbleApplication public Shared Sub Main [Link](New Form1) End Sub End class Public Class Form1 Private m_Bitmap As Bitmap Private m_Graphics As Graphics Private m_Drawing As Boolean Private m_X As Integer Private m_Y As Integer Private Sub Form1_Load(ByVal sender As Object, ByVal e As [Link]) _ Handles [Link] MakeNewBitmap() End Sub Private Sub mnuFileClear_Click(ByVal sender As [Link], _ ByVal e As [Link]) Handles [Link] MakeNewBitmap() End Sub Private Sub MakeNewBitmap() Dim wid As Integer = [Link] Dim hgt As Integer = [Link] m_Bitmap = New Bitmap(wid, hgt) m_Graphics = [Link](m_Bitmap) m_Graphics.Clear([Link])

[Link] = m_Bitmap End Sub Private Sub picCanvas_MouseDown(ByVal sender As Object, _ ByVal e As [Link]) Handles [Link] m_Drawing = True m_X = e.X m_Y = e.Y End Sub Private Sub picCanvas_MouseMove(ByVal sender As Object, _ ByVal e As [Link]) Handles [Link] If Not m_Drawing Then Exit Sub m_Graphics.DrawLine([Link], m_X, m_Y, e.X, e.Y) m_X = e.X m_Y = e.Y [Link] = m_Bitmap End Sub Private Sub picCanvas_MouseUp(ByVal sender As Object, _ ByVal e As [Link]) Handles [Link] m_Drawing = False End Sub End Class <[Link]()> _ Partial Public Class Form1 Inherits [Link] 'Form overrides dispose to clean up the component list. <[Link]()> _ Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing AndAlso components IsNot Nothing Then [Link]() End If [Link](disposing) End Sub 'Required by the Windows Form Designer Private components As [Link] 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. <[Link]()> _ Private Sub InitializeComponent() [Link] = New [Link] Me.MenuStrip1 = New [Link] [Link] = New [Link] [Link] = New [Link] CType([Link], [Link]).BeginInit() [Link]() [Link]() ' 'picCanvas

' [Link] = [Link] [Link] = New [Link](0, 24) [Link] = "picCanvas" [Link] = New [Link](303, 246) [Link] = 0 [Link] = False ' 'MenuStrip1 ' [Link](New [Link]() {[Link] [Link] = New [Link](0, 0) [Link] = "MenuStrip1" [Link] = New [Link](303, 24) [Link] = 1 [Link] = "MenuStrip1" ' 'mnuFile ' [Link](New [Link]() {Me. [Link] = "mnuFile" [Link] = "&File" ' 'mnuFileClear ' [Link] = "mnuFileClear" [Link] = "&Clear" ' 'Form1 ' [Link] = New [Link](6.0!, 13.0!) [Link] = [Link] [Link] = New [Link](303, 270) [Link]([Link]) [Link](Me.MenuStrip1) [Link] = [Link] [Link] = Me.MenuStrip1 [Link] = "Form1" [Link] = "Scribble" CType([Link], [Link]).EndInit() [Link](False) [Link](False) [Link]() End Sub Friend WithEvents Friend WithEvents Friend WithEvents Friend WithEvents End Class picCanvas As [Link] MenuStrip1 As [Link] mnuFile As [Link] mnuFileClear As [Link]

[Link] Painter

'Sams Teach Yourself Microsoft Visual Basic .NET 2003 in 21 Days, Second Edition (Paper 'by Steve Holzner (Author) '# Publisher: Sams; 2 edition (April 21, 2003) '# Language: English '# ISBN-10: 0672325314 '# ISBN-13: 978-0672325311 Imports [Link] Imports [Link].Drawing2D Imports [Link] public class PainterShape public Shared Sub Main [Link](New Form1) End Sub End class Public Class Form1 Inherits [Link] #Region " Windows Form Designer generated code " Public Sub New() [Link]() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then [Link]() End If End If [Link](disposing) End Sub 'Required by the Windows Form Designer Private components As [Link] 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button1 As [Link] Friend WithEvents Button2 As [Link] Friend WithEvents Button3 As [Link] Friend WithEvents Label1 As [Link] Friend WithEvents Button4 As [Link] <[Link]()> Private Sub InitializeComponent() Me.Button1 = New [Link]

Me.Button2 = New [Link] Me.Button3 = New [Link] Me.Label1 = New [Link] Me.Button4 = New [Link] [Link]() ' 'Button1 ' [Link] = New [Link](0, 248) [Link] = "Button1" [Link] = 0 [Link] = "Rectangle" ' 'Button2 ' [Link] = New [Link](80, 248) [Link] = "Button2" [Link] = 1 [Link] = "Ellipse" ' 'Button3 ' [Link] = New [Link](160, 248) [Link] = "Button3" [Link] = 2 [Link] = "Line" ' 'Label1 ' [Link] = New [Link]("Microsoft Sans Serif", 24.0!, System. [Link] = New [Link](0, 0) [Link] = "Label1" [Link] = New [Link](152, 48) [Link] = 3 [Link] = "Graphics" ' 'Button4 ' [Link] = New [Link](240, 248) [Link] = "Button4" [Link] = 4 [Link] = "Freehand" ' 'Form1 ' [Link] = New [Link](5, 13) [Link] = New [Link](320, 273) [Link](Me.Button4) [Link](Me.Label1) [Link](Me.Button3) [Link](Me.Button2) [Link](Me.Button1) [Link] = "Form1" [Link] = "Form1" [Link](False)

End Sub #End Region Dim gphFormGraphics As Graphics Dim pt1, pt2 As Point Dim ptPointsArray() As Point Dim intNumberOfPoints As Integer = 0 Dim recDrawingRectangle As Rectangle Dim btnCurrentButton As Buttons Enum Buttons Rectangle Ellipse Line Freehand End Enum Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) gphFormGraphics = [Link]() End Sub

Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As [Link] pt1 = New Point(e.X, e.Y) End Sub

Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As [Link].M pt2 = New Point(e.X, e.Y) recDrawingRectangle = New Rectangle([Link](pt2.X, pt1.X), [Link](pt2.Y, pt1 [Link](pt2.X - pt1.X), [Link](pt2.Y - pt1.Y)) Select Case btnCurrentButton Case [Link] [Link]([Link], recDrawingRectangle) Case [Link] [Link]([Link], recDrawingRectangle) Case [Link] [Link]([Link], pt2, pt1) End Select End Sub

Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link] btnCurrentButton = [Link] End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link] btnCurrentButton = [Link] End Sub

Private Sub Button3_Click(ByVal sender As [Link], ByVal e As [Link] btnCurrentButton = [Link] End Sub

Private Sub Button4_Click(ByVal sender As [Link], ByVal e As [Link] btnCurrentButton = [Link] End Sub

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As [Link] If btnCurrentButton = [Link] And [Link] = [Link] Then

Dim ptNew As New Point(e.X, e.Y) ReDim Preserve ptPointsArray(intNumberOfPoints) ptPointsArray(intNumberOfPoints) = ptNew intNumberOfPoints += 1 If intNumberOfPoints >= 2 Then [Link]([Link], ptPointsArray) End If End If End Sub

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As [Link] Select Case btnCurrentButton Case [Link] [Link]([Link], recDrawingRectangle) Case [Link] [Link]([Link], recDrawingRectangle) Case [Link] [Link]([Link], pt2, pt1) Case [Link] If intNumberOfPoints >= 2 Then [Link]([Link], ptPointsArray) End If End Select End Sub End Class

You might also like