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

📄 form1.frm

📁 图标制作
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      ScaleWidth      =   720
      TabIndex        =   9
      Top             =   3360
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   7
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   8
      Top             =   3090
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   6
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   7
      Top             =   2820
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   5
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   6
      Top             =   2550
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   4
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   5
      Top             =   2280
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   3
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   4
      Top             =   2010
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   2
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   3
      Top             =   1740
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   1
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   2
      Top             =   1470
      Width           =   720
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   255
      Index           =   0
      Left            =   5040
      ScaleHeight     =   255
      ScaleWidth      =   720
      TabIndex        =   1
      Top             =   1200
      Width           =   720
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H00000000&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   480
      Left            =   2280
      ScaleHeight     =   32
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   32
      TabIndex        =   0
      Top             =   600
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   240
      Left            =   5520
      Picture         =   "Form1.frx":10BA
      Top             =   720
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Menu file 
      Caption         =   "文件(&F)"
      Begin VB.Menu op 
         Caption         =   "打开(&O)"
         Shortcut        =   ^O
      End
      Begin VB.Menu sva 
         Caption         =   "另存为(&S)"
         Shortcut        =   ^S
      End
      Begin VB.Menu hr 
         Caption         =   "-"
      End
      Begin VB.Menu ex 
         Caption         =   "退出(&X)"
         Shortcut        =   ^X
      End
   End
   Begin VB.Menu ed 
      Caption         =   "编辑(E&)"
      Begin VB.Menu und 
         Caption         =   "撤销(&U)"
         Enabled         =   0   'False
         Shortcut        =   ^U
      End
   End
   Begin VB.Menu effx 
      Caption         =   "特效(&E)"
      Begin VB.Menu flHor 
         Caption         =   "水平翻转(&H)"
         Shortcut        =   ^H
      End
      Begin VB.Menu flVer 
         Caption         =   "垂直旋转(&V)"
         Shortcut        =   ^V
      End
      Begin VB.Menu hr3 
         Caption         =   "-"
      End
      Begin VB.Menu Rotat 
         Caption         =   "旋转(&R)"
      End
      Begin VB.Menu hr2 
         Caption         =   "-"
      End
      Begin VB.Menu chCol 
         Caption         =   "改变颜色(&C)"
      End
   End
   Begin VB.Menu hlp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu abo 
         Caption         =   "关于(&A)"
      End
   End
End
Attribute VB_Name = "frmicon"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a
Dim b
Dim c
Dim d
Dim w
Dim lin
Dim UNL
Private Sub PaintDown()
Static Pont
Pont = Picture3.Point(0, 0)
Picture3.PaintPicture Picture1.Image, 0, 0, 321, 321
If Pont = &HFFC0FF Then
For F = 0 To Picture3.ScaleHeight Step 10
Picture3.Line (0, F)-(Picture3.ScaleWidth, F), &HFFC0FF
Next F
For F = 0 To Picture3.ScaleWidth Step 10
Picture3.Line (F, 0)-(F, Picture3.ScaleHeight), &HFFC0FF
Next F
Line (Picture1.Left - 1, Picture1.Top - 1)-(Picture1.Left + Picture1.Width, Picture1.Top + Picture1.Height), QBColor(15), B
Else
For F = 0 To Picture3.ScaleHeight Step 10
Picture3.Line (0, F)-(Picture3.ScaleWidth, F), &H4040&
Next F
For F = 0 To Picture3.ScaleWidth Step 10
Picture3.Line (F, 0)-(F, Picture3.ScaleHeight), &H4040&
Next F
Line (Picture1.Left - 1, Picture1.Top - 1)-(Picture1.Left + Picture1.Width, Picture1.Top + Picture1.Height), QBColor(0), B
End If
End Sub
Private Sub Undo1()
Picture6 = Picture1.Image
Picture7 = Picture3.Image

End Sub
Private Sub Undo2()
Picture8 = Picture1.Image
Picture9 = Picture3.Image
Picture10 = Picture1.Image

End Sub
Private Sub Fill()
UNL = 1

w = 0
Toolbar1.Buttons(6).Enabled = True
und.Enabled = True
Undo1
Picture1.Line (0, 0)-(31, 31), a, BF
Picture3.BackColor = a
If a = QBColor(0) Or a = QBColor(1) Then
For F = 0 To Picture3.ScaleHeight Step 10
Picture3.Line (0, F)-(Picture3.ScaleWidth, F), &HFFC0FF
Next F
For F = 0 To Picture3.ScaleWidth Step 10
Picture3.Line (F, 0)-(F, Picture3.ScaleHeight), &HFFC0FF
Next F
Line (Picture1.Left - 1, Picture1.Top - 1)-(Picture1.Left + Picture1.Width, Picture1.Top + Picture1.Height), QBColor(15), B
Else
For F = 0 To Picture3.ScaleHeight Step 10
Picture3.Line (0, F)-(Picture3.ScaleWidth, F), &H4040&
Next F
For F = 0 To Picture3.ScaleWidth Step 10
Picture3.Line (F, 0)-(F, Picture3.ScaleHeight), &H4040&
Next F
Line (Picture1.Left - 1, Picture1.Top - 1)-(Picture1.Left + Picture1.Width, Picture1.Top + Picture1.Height), QBColor(0), B
End If
Undo2
End Sub

Private Sub leftt()
On Error GoTo ex
w = 0
Undo1
Picture1.PaintPicture Picture10, -1, 0
Picture1.PaintPicture Picture10, 31, 0
PaintDown
Undo2
ex:
End Sub

Private Sub rightt()
w = 0
Undo1
Picture1.PaintPicture Picture10, 1, 0
Picture1.PaintPicture Picture10, -31, 0
PaintDown
Undo2

End Sub

Private Sub upp()
w = 0
Undo1
Picture1.PaintPicture Picture10, 0, -1
Picture1.PaintPicture Picture10, 0, 31
PaintDown
Undo2

End Sub

Private Sub downn()
w = 0
Undo1
Picture1.PaintPicture Picture10, 0, 1
Picture1.PaintPicture Picture10, 0, -31
PaintDown
Undo2

End Sub

Private Sub abo_Click()
about.Show vbModal, Me
End Sub

Private Sub chCol_Click()
    Toolbar1.Buttons(4).Value = tbrUnpressed
    Toolbar1.Buttons(5).Value = tbrPressed
    Picture3.MousePointer = 10

End Sub




Private Sub ex_Click()
Unload Me
End Sub


Private Sub flHor_Click()
Undo1
Picture1.PaintPicture Picture10, Picture10.ScaleWidth - 1, 0, -Picture10.ScaleWidth, Picture10.ScaleHeight
PaintDown
Undo2

End Sub

Private Sub flVer_Click()
Undo1
Picture1.PaintPicture Picture10, 0, Picture10.ScaleHeight - 1, Picture10.ScaleWidth, -Picture10.ScaleHeight
PaintDown
Undo2

End Sub

Private Sub Form_Load()
Picture1.BackColor = &HFFC0C0
Picture3.BackColor = &HFFC0C0
Picture4.BackColor = &HFFC0C0
ImageList1.MaskColor = &HFFC0C0
For e = 0 To 15
Picture2(e).BackColor = QBColor(e)
Next e
For F = 0 To Picture3.ScaleHeight Step 10
Picture3.Line (0, F)-(Picture3.ScaleWidth, F), &H4040&
Next F
For F = 0 To Picture3.ScaleWidth Step 10
Picture3.Line (F, 0)-(F, Picture3.ScaleHeight), &H4040&
Next F
Line (Picture1.Left - 1, Picture1.Top - 1)-(Picture1.Left + Picture1.Width, Picture1.Top + Picture1.Height), QBColor(0), B
Picture4.Print "    Trpt"

Picture11 = Icon

Icon = Image1
For e = 1 To 15
Line (Picture2(e).Left - 1, Picture2(e).Top - 1)-(Picture2(e).Left + Picture2(e).Width, Picture2(e).Top + Picture2(e).Height), QBColor(0), B
Next e
Line (Picture4.Left - 1, Picture4.Top - 1)-(Picture4.Left + Picture4.Width, Picture4.Top + Picture4.Height), QBColor(0), B
Line (Picture2(0).Left - 1, Picture2(0).Top - 1)-(Picture2(0).Left + Picture2(0).Width, Picture2(0).Top + Picture2(0).Height), &HFFC0C0, B

Picture10 = Picture1.Image

End Sub


Private Sub Form_Unload(Cancel As Integer)
If UNL <> 0 Then
Dim Msg, Style, Resp
Msg = "Save icon?"
Style = vbYesNoCancel + vbExclamation
Resp = MsgBox(Msg, Style)
If Resp = vbYes Then sva_Click: If UNL <> 0 Then Cancel = True
If Resp = vbNo Then Cancel = False
If Resp = vbCancel Then Cancel = True
End If
End Sub

Private Sub op_Click()
CommonDialog1.CancelError = True
On Error GoTo ex
CommonDialog1.FileName = ""
CommonDialog1.Flags = cdlOFNFileMustExist
CommonDialog1.Filter = "Icons (*.ico)|*.ico"
CommonDialog1.ShowOpen
If FileLen(CommonDialog1.FileName) <> 766 Then
MsgBox "Ivalid or unsupported file format.", vbCritical
Exit Sub
End If
MousePointer = 11
w = 0
Toolbar1.Buttons(6).Enabled = True
und.Enabled = True
Undo1
Picture1.BackColor = &HFFC0C0
Picture1 = LoadPicture(CommonDialog1.FileName)
PaintDown
'+青腓怅

⌨️ 快捷键说明

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