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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "公交线路随点随改"
   ClientHeight    =   3945
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9060
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3945
   ScaleWidth      =   9060
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   435
      Left            =   7050
      TabIndex        =   2
      Top             =   3375
      Width           =   1890
   End
   Begin VB.Label Label3 
      Caption         =   "请用鼠标拖动图标的方法修改线路"
      Height          =   255
      Left            =   90
      TabIndex        =   8
      Top             =   3495
      Width           =   3210
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "长春站"
      Height          =   765
      Index           =   5
      Left            =   8190
      TabIndex        =   7
      Top             =   1725
      Width           =   270
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   5
      Left            =   7785
      Picture         =   "form1.frx":0000
      Top             =   1170
      Width           =   1050
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Index           =   4
      X1              =   7305
      X2              =   7800
      Y1              =   1425
      Y2              =   1440
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "一面街"
      Height          =   765
      Index           =   4
      Left            =   6645
      TabIndex        =   6
      Top             =   1725
      Width           =   270
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   4
      Left            =   6225
      Picture         =   "form1.frx":2081
      Top             =   1200
      Width           =   1050
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Index           =   3
      X1              =   5715
      X2              =   6210
      Y1              =   1335
      Y2              =   1350
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "八道街"
      Height          =   765
      Index           =   3
      Left            =   5055
      TabIndex        =   5
      Top             =   1665
      Width           =   270
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   3
      Left            =   4635
      Picture         =   "form1.frx":4102
      Top             =   1110
      Width           =   1050
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Index           =   2
      X1              =   4185
      X2              =   4680
      Y1              =   1380
      Y2              =   1395
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "东盛路"
      Height          =   765
      Index           =   2
      Left            =   3525
      TabIndex        =   4
      Top             =   1755
      Width           =   270
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   2
      Left            =   3120
      Picture         =   "form1.frx":6183
      Top             =   1170
      Width           =   1050
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Index           =   1
      X1              =   2610
      X2              =   3105
      Y1              =   1260
      Y2              =   1275
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "民丰街"
      Height          =   765
      Index           =   1
      Left            =   1920
      TabIndex        =   3
      Top             =   1455
      Width           =   270
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   1
      Left            =   1545
      Picture         =   "form1.frx":8204
      Top             =   885
      Width           =   1050
   End
   Begin VB.Label Label2 
      Caption         =   "1路车线路图"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   3345
      TabIndex        =   1
      Top             =   240
      Width           =   2385
   End
   Begin VB.Image Image1 
      Height          =   495
      Index           =   0
      Left            =   45
      Picture         =   "form1.frx":A285
      Top             =   1035
      Width           =   1050
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "乐群街"
      Height          =   765
      Index           =   0
      Left            =   435
      TabIndex        =   0
      Top             =   1590
      Width           =   270
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFC0C0&
      BorderWidth     =   2
      Index           =   0
      X1              =   1095
      X2              =   1590
      Y1              =   1290
      Y2              =   1305
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
  Dim x1 As Long
  Dim y1 As Long
  Dim j As Integer
  
Private Type POINTAPI
  X As Long
  Y As Long
End Type

Private Sub Image1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  j = Index
End Sub

Private Sub Image1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  Dim n As POINTAPI
  GetCursorPos n
  If j > 0 And j < 5 Then
     Image1(j).Left = n.X * 15 - Me.Left
     Image1(j).Top = n.Y * 15 - Me.Top
     Line1(j - 1).x1 = Image1(j - 1).Left + Image1(j - 1).Width
     Line1(j - 1).y1 = Image1(j - 1).Top + Image1(j - 1).Height / 2
     Line1(j - 1).X2 = Image1(j).Left
     Line1(j - 1).Y2 = Image1(j).Top + Image1(j).Height / 2
     Line1(j).x1 = Image1(j).Left + Image1(j).Width
     Line1(j).y1 = Image1(j).Top + Image1(j).Height / 2
     Line1(j).X2 = Image1(j + 1).Left
     Line1(j).Y2 = Image1(j + 1).Top + Image1(j + 1).Height / 2
     Label1(j).Top = Image1(j).Top + Image1(j).Height + 100
     Label1(j).Left = Image1(j).Left + Image1(j).Width / 2
  End If
End Sub

Private Sub Command1_Click()
  End
End Sub

⌨️ 快捷键说明

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