⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get directorys.frm

📁 鼠标移动到richtext box中时查看单词(3KB)
💻 FRM
字号:
VERSION 4.00
Begin VB.Form Directorys 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Get Directorys"
   ClientHeight    =   1575
   ClientLeft      =   1635
   ClientTop       =   2085
   ClientWidth     =   4935
   Height          =   1980
   Icon            =   "Get Directorys.frx":0000
   Left            =   1575
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1575
   ScaleWidth      =   4935
   Top             =   1740
   Width           =   5055
   Begin VB.CommandButton Getsys 
      Caption         =   "Get &System Path..."
      Height          =   375
      Left            =   3120
      TabIndex        =   1
      Top             =   1080
      Width           =   1695
   End
   Begin VB.TextBox Winsysdir 
      Height          =   285
      Left            =   120
      TabIndex        =   5
      Top             =   1080
      Width           =   2895
   End
   Begin VB.TextBox Windir 
      Height          =   285
      Left            =   120
      TabIndex        =   3
      Top             =   360
      Width           =   2895
   End
   Begin VB.CommandButton Getwin 
      Caption         =   "Get &Windows Path..."
      Default         =   -1  'True
      Height          =   375
      Left            =   3120
      TabIndex        =   0
      Top             =   360
      Width           =   1695
   End
   Begin VB.Label Winsyspathlabel 
      Caption         =   "Windows System Path:"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   840
      Width           =   1695
   End
   Begin VB.Label Winpathlabel 
      Caption         =   "Windows Path:"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "Directorys"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub Command1_Click()

Dim Buffer As String

Buffer = Space(MAX_PATH)
rtn = GetSystemDirectory(Buffer, Len(Buffer))
WinSysPath = Left(Buffer, rtn)

End Sub


Private Sub Form_Load()

Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2 'centre the form on the screen
   
'This project was downloaded from
'
'http://www.brianharper.demon.co.uk/
'
'Please use this project and all of its source code however you want.
'
'UNZIPPING
'To unzip the project files you will need a 32Bit unzipper program that
'can handle long file names. If you have a latest copy of Winzip installed
'on your system then you may use that. If you however dont have a copy,
'then visit my web site, go into the files section and from there you can
'click on the Winzip link to goto their site and download a copy of the
'program. By doing this you will now beable to unzip the project files
'retaining their proper long file names.
'Once upzipped, load up your copy of Visual Basic and goto
'File/Open Project. Locate the project files to where ever you unzipped
'them, then click Open. The project files will be loaded and are now ready
'for use.
'
'THE PROJECT
'Through your many Visual Basic programming years you will some how need to
'know the full path of the users Windows or even the Windows System
'directorys when programming an application that you know many differnet
'people might and will be using. As this path can be different on some
'machines with the operating system installed, you will need to know where
'this path is located. This project uses two seperate Win API calls which
'are used to get the paths. Once the path has been retreived, it is then
'returned to the user in the global string "WinPath" and "WinSysPath".
'
'NOTES
'I have only provided the necessary project files with the zip. This keeps
'the size of the zip files down to a minimum and enables me to upload more
'prjects files to my site.
'
'I hope you find the project usful in what ever you are programming. I
'have tried to write out a small explanation of what each line of code
'does in the project, although most of it is pretty simple to understand.
'
'If you find any bugs in the code then please dont hesitate to Email me and
'I will get back to you as soon as possible. If you however need help on a
'different matter concerning Visual Basic then please please Email me as
'I like to here from people and here what they are programming.
'
'My Email address is:
'Brian@brianharper.demon.co.uk
'
'My web site is:
'http://www.brianharper.demon.co.uk/
'
'Please visit my web site and find many other useful projects like this.
'

End Sub


Private Sub Getsys_Click()

Dim Buffer As String 'declare the needed variables

Buffer = Space(MAX_PATH)
rtn = GetSystemDirectory(Buffer, Len(Buffer)) 'get the path
WinSysPath = Left(Buffer, rtn)                'parse the path into the global string

Winsysdir.Text = WinSysPath 'display the Windows System directory

End Sub


Private Sub Getwin_Click()

Dim Buffer As String 'declare the needed variables

Buffer = Space(MAX_PATH)
rtn = GetWindowsDirectory(Buffer, Len(Buffer)) 'get the path
WinPath = Left(Buffer, rtn)                    'parse the path to the global string

Windir.Text = WinPath 'display the Windows directory

End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -