Visual.Basic.NET实用编程百例-47.6M.zip

源代码在线查看: form1.vb

软件大小: 19562 K
上传用户: huanzhudev
关键词: Visual Basic 47.6 NET
下载地址: 免注册下载 普通下载 VIP

相关代码

				Imports VB = Microsoft.VisualBasic
				Friend Class Form1
				    Inherits System.Windows.Forms.Form
				#Region "Windows 窗体设计器生成的代码"
				    Public Sub New()
				        MyBase.New()
				        '此调用是 Windows 窗体设计器所必需的。
				        InitializeComponent()
				    End Sub
				    '窗体重写处置,以清理组件列表。
				    Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
				        If Disposing Then
				            If Not components Is Nothing Then
				                components.Dispose()
				            End If
				        End If
				        MyBase.Dispose(Disposing)
				    End Sub
				    'Windows 窗体设计器所必需的
				    Private components As System.ComponentModel.IContainer
				    Public ToolTip1 As System.Windows.Forms.ToolTip
				    '注意: 以下过程是 Windows 窗体设计器所必需的
				    '可以使用 Windows 窗体设计器来修改它。
				    '不要使用代码编辑器修改它。
				    Public WithEvents Button1 As System.Windows.Forms.Button
				     Private Sub InitializeComponent()
				        Me.components = New System.ComponentModel.Container
				        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
				        Me.Button1 = New System.Windows.Forms.Button
				        Me.SuspendLayout()
				        '
				        'Button1
				        '
				        Me.Button1.BackColor = System.Drawing.SystemColors.Control
				        Me.Button1.Cursor = System.Windows.Forms.Cursors.Default
				        Me.Button1.ForeColor = System.Drawing.SystemColors.ControlText
				        Me.Button1.Location = New System.Drawing.Point(26, 16)
				        Me.Button1.Name = "Button1"
				        Me.Button1.RightToLeft = System.Windows.Forms.RightToLeft.No
				        Me.Button1.Size = New System.Drawing.Size(113, 37)
				        Me.Button1.TabIndex = 0
				        Me.Button1.Text = "整理收藏夹"
				        '
				        'Form1
				        '
				        Me.AcceptButton = Me.Button1
				        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
				        Me.BackColor = System.Drawing.SystemColors.Control
				        Me.ClientSize = New System.Drawing.Size(164, 69)
				        Me.Controls.Add(Me.Button1)
				        Me.Cursor = System.Windows.Forms.Cursors.Default
				        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
				        Me.Location = New System.Drawing.Point(196, 123)
				        Me.MaximizeBox = False
				        Me.MinimizeBox = False
				        Me.Name = "Form1"
				        Me.RightToLeft = System.Windows.Forms.RightToLeft.No
				        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
				        Me.Text = "整理收藏夹"
				        Me.ResumeLayout(False)
				
				    End Sub
				#End Region
				    '  整理收藏夹
				    Private Sub Button1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button1.Click
				        Dim lpszRootFolder As String
				        Dim lpszPath As String
				        Dim dwReturn As Integer
				
				        lpszPath = Space(256)
				        '  取得收藏夹的路径
				        dwReturn = SHGetFolderPath(Me.Handle.ToInt32, CSIDL_FAVORITES, 0, &H0S, lpszPath)
				        If dwReturn = 0 Then
				            lpszRootFolder = VB.Left(lpszPath, InStr(lpszPath, vbNullChar) - 1)
				        End If
				
				        '  打开“整理收藏夹”对话框
				        DoOrganizeFavDlg(Handle.ToInt32, lpszRootFolder)
				    End Sub
				
				    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
				
				    End Sub
				End Class			

相关资源