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

📄 frmphotomenu.frm

📁 这是一个国内通用的学生管理系统!包括院系,学生基本信息,照片,成绩,课程等多方面的管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FrmPhotoMenu 
   BackColor       =   &H00C0FFFF&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   930
   ClientLeft      =   15
   ClientTop       =   15
   ClientWidth     =   2655
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   930
   ScaleWidth      =   2655
   StartUpPosition =   3  '窗口缺省
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   1680
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Image Image1 
      Height          =   225
      Left            =   120
      Picture         =   "FrmPhotoMenu.frx":0000
      Stretch         =   -1  'True
      Top             =   120
      Width           =   225
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "设置照片..."
      Height          =   180
      Left            =   480
      MouseIcon       =   "FrmPhotoMenu.frx":0422
      MousePointer    =   99  'Custom
      TabIndex        =   1
      Top             =   135
      Width           =   990
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   2640
      Y1              =   480
      Y2              =   480
   End
   Begin VB.Line Line2 
      BorderColor     =   &H0080C0FF&
      X1              =   0
      X2              =   2640
      Y1              =   495
      Y2              =   495
   End
   Begin VB.Image Image2 
      Height          =   225
      Left            =   120
      Picture         =   "FrmPhotoMenu.frx":072C
      Stretch         =   -1  'True
      Top             =   600
      Width           =   225
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "删除照片..."
      Height          =   180
      Left            =   480
      MouseIcon       =   "FrmPhotoMenu.frx":0B4E
      MousePointer    =   99  'Custom
      TabIndex        =   0
      Top             =   615
      Width           =   990
   End
End
Attribute VB_Name = "FrmPhotoMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
  For e = 30 To 2610 Step 15
    Width = e
  Next e
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Label2.FontBold = False
  Label2.ForeColor = RGB(0, 0, 0)
  
  Label1.FontBold = False
  Label1.ForeColor = RGB(0, 0, 0)
End Sub

Private Sub Label1_Click()
  Dim DiskFile As String
  '如果没有选择学生,则返回
  If CurStu.Student_Id <= 0 Then
    MsgBox "请选择学生"
    Unload Me
    Exit Sub
  End If
  '使用CommonDialog控件读取图像文件
  CommonDialog1.Filter = "BMP文件(*.bmp)|*.bmp|JPEG文件(*.jpg)|*.jpg|GIF文件(*.gif)|*.gif"
  CommonDialog1.ShowOpen
  DiskFile = CommonDialog1.FileName
  If DiskFile = "" Then
    MsgBox "请选择照片文件"
    Unload Me
    Exit Sub
  End If
  '存储并显示照片
  Call SaveImage(DiskFile, FrmStuMan.AdoStuDetail)
  Call ShowImage(FrmStuMan.Image1, FrmStuMan.AdoStuDetail)
  Unload Me
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Label1.FontBold = True
  Label1.ForeColor = RGB(255, 0, 0)
  
  Label2.FontBold = False
  Label2.ForeColor = RGB(0, 0, 0)
End Sub

Private Sub Label2_Click()
  If CurStu.Student_Id <= 0 Then
    MsgBox "请选择学生"
    Unload Me
    Exit Sub
  End If
  '使用AppendChunk ""的方法删除图像
  FrmStuMan.AdoStuDetail.Recordset.Fields(2).AppendChunk ""
  FrmStuMan.AdoStuDetail.Recordset.Update
  FrmStuMan.Image1.Picture = LoadPicture("")
  Unload Me
End Sub

Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  Label2.FontBold = True
  Label2.ForeColor = RGB(255, 0, 0)
  
  Label1.FontBold = False
  Label1.ForeColor = RGB(0, 0, 0)
End Sub

⌨️ 快捷键说明

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