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

📄 shelllnk.frm

📁 不错的一个VB菜单设计 界面和功能都不错
💻 FRM
字号:
VERSION 5.00
Object = "{75D4F767-8785-11D3-93AD-0000832EF44D}#2.6#0"; "FAST2001.ocx"
Object = "{75D4F148-8785-11D3-93AD-0000832EF44D}#3.1#0"; "FAST2003.ocx"
Object = "{75D4F666-8785-11D3-93AD-0000832EF44D}#3.0#0"; "FAST2006.ocx"
Begin VB.Form frmShellLink 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "FWShellLink"
   ClientHeight    =   2985
   ClientLeft      =   2520
   ClientTop       =   2205
   ClientWidth     =   7335
   Icon            =   "ShellLnk.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2985
   ScaleWidth      =   7335
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin FLWCtrls.FWNumericTextBox txtIconIndex 
      Height          =   315
      Left            =   1200
      TabIndex        =   15
      Top             =   2115
      Width           =   615
      _ExtentX        =   1085
      _ExtentY        =   556
      Value           =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483630
   End
   Begin VB.ComboBox cboShowMode 
      Height          =   315
      Left            =   3105
      Style           =   2  'Dropdown List
      TabIndex        =   14
      Top             =   2115
      Width           =   855
   End
   Begin VB.CommandButton cmdGetLinkInfo 
      Caption         =   "Get Link Info"
      Height          =   375
      Left            =   6000
      TabIndex        =   13
      Top             =   2520
      Width           =   1215
   End
   Begin VB.TextBox txtArguments 
      Height          =   315
      Left            =   1200
      TabIndex        =   10
      Top             =   1305
      Width           =   5745
   End
   Begin VB.TextBox txtIconFile 
      Height          =   315
      Left            =   1200
      TabIndex        =   8
      Top             =   1710
      Width           =   5745
   End
   Begin VB.TextBox txtWorkDirectory 
      Height          =   315
      Left            =   1200
      TabIndex        =   5
      Top             =   900
      Width           =   5745
   End
   Begin VB.TextBox txtProgram 
      Height          =   315
      Left            =   1200
      TabIndex        =   3
      Top             =   495
      Width           =   5745
   End
   Begin VB.TextBox txtLinkName 
      Height          =   315
      Left            =   1200
      TabIndex        =   1
      Top             =   90
      Width           =   5745
   End
   Begin VB.CommandButton cmdCreateLink 
      Caption         =   "Create Link"
      Height          =   375
      Left            =   4680
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   End
   Begin FLWSystem.FWSysInfo objSysInfo 
      Left            =   3870
      Top             =   2475
      _ExtentX        =   820
      _ExtentY        =   820
   End
   Begin FLWDiskFile.FWShellLink objShellLink 
      Left            =   3195
      Top             =   2475
      _ExtentX        =   820
      _ExtentY        =   820
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Show mode"
      Height          =   195
      Index           =   6
      Left            =   2205
      TabIndex        =   12
      Top             =   2160
      Width           =   840
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Arguments"
      Height          =   195
      Index           =   5
      Left            =   360
      TabIndex        =   11
      Top             =   1320
      Width           =   750
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Icon index"
      Height          =   195
      Index           =   4
      Left            =   375
      TabIndex        =   9
      Top             =   2160
      Width           =   735
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Icon filename"
      Height          =   195
      Index           =   3
      Left            =   165
      TabIndex        =   7
      Top             =   1755
      Width           =   945
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Work directory"
      Height          =   195
      Index           =   2
      Left            =   75
      TabIndex        =   6
      Top             =   960
      Width           =   1035
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Program"
      Height          =   195
      Index           =   1
      Left            =   525
      TabIndex        =   4
      Top             =   540
      Width           =   585
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Link filename"
      Height          =   195
      Index           =   0
      Left            =   180
      TabIndex        =   2
      Top             =   135
      Width           =   930
   End
End
Attribute VB_Name = "frmShellLink"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub Form_Load()
  Dim strPath As String

  strPath = App.Path & "\"
  strPath = Replace(strPath, "\\", "\")
  
  txtLinkName.Text = objSysInfo.Desktop & "\DemoLink.lnk"
  
  txtProgram = strPath & App.EXEName & ".exe"
  txtWorkDirectory = strPath
  txtArguments = "/argument"
  txtIconFile = txtProgram
  txtIconIndex.Value = 0
  
  Call cboShowMode.AddItem("Normal")
  Call cboShowMode.AddItem("Maximize")
  Call cboShowMode.AddItem("Minimize")
  cboShowMode.ItemData(0) = flwShowNormal
  cboShowMode.ItemData(1) = flwShowMaximize
  cboShowMode.ItemData(2) = flwShowMinimize
  cboShowMode.ListIndex = 0
End Sub

Private Sub cmdCreateLink_Click()
  With objShellLink
    .LinkFile = txtLinkName
    .Program = txtProgram
    .WorkDirectory = txtWorkDirectory
    .Arguments = txtArguments
    .IconFile = txtIconFile
    .IconIndex = txtIconIndex.Value
    .ShowCmd = cboShowMode.ItemData(cboShowMode.ListIndex)
    Call .CreateShellLink
  End With
End Sub

Private Sub cmdGetLinkInfo_Click()
  With objShellLink
    Call .GetShellLink
    
    txtLinkName = .LinkFile
    txtProgram = .Program
    txtWorkDirectory = .WorkDirectory
    txtArguments = .Arguments
    txtIconFile = .IconFile
    txtIconIndex.Value = .IconIndex
    Select Case .ShowCmd
      Case flwShowNormal
        cboShowMode.ListIndex = 0
      Case flwShowMaximize
        cboShowMode.ListIndex = 1
      Case flwShowMinimize
        cboShowMode.ListIndex = 2
    End Select
  End With
End Sub

⌨️ 快捷键说明

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