📄 frm_main.vb
字号:
'
'Button9
'
Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.Button9.Image = CType(resources.GetObject("Button9.Image"), System.Drawing.Image)
Me.Button9.Location = New System.Drawing.Point(784, 0)
Me.Button9.Name = "Button9"
Me.Button9.Size = New System.Drawing.Size(88, 96)
Me.Button9.TabIndex = 16
Me.ToolTip1.SetToolTip(Me.Button9, "HELP")
'
'Button1
'
Me.Button1.Enabled = False
Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Image)
Me.Button1.Location = New System.Drawing.Point(384, 0)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(120, 96)
Me.Button1.TabIndex = 17
'
'Button8
'
Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Popup
Me.Button8.Image = CType(resources.GetObject("Button8.Image"), System.Drawing.Image)
Me.Button8.Location = New System.Drawing.Point(696, 0)
Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(88, 96)
Me.Button8.TabIndex = 14
Me.ToolTip1.SetToolTip(Me.Button8, "BILLING")
'
'frm_main
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.SystemColors.Menu
Me.ClientSize = New System.Drawing.Size(874, 727)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Button9)
Me.Controls.Add(Me.Button8)
Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.Button6)
Me.Controls.Add(Me.Button5)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.ToolBar1)
Me.Controls.Add(Me.StatusBar1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.IsMdiContainer = True
Me.MaximizeBox = False
Me.Menu = Me.MainMenu1
Me.MinimizeBox = False
Me.Name = "frm_main"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "PrisLogix's PIS"
CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
#Region "CODE STARTS HERE"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
StatusBarPanel2.Text = currentTime.Now().ToLongTimeString()
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
End Sub
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
ref2 = New frm_ad
ref2.MdiParent = Me
Try
ref2.Show()
Catch c As Exception
MsgBox(c.ToString)
End Try
End Sub
Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
ref4 = New frm_room
ref4.MdiParent = Me
ref4.Show()
End Sub
Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click
ref3 = New frm_exa
ref3.MdiParent = Me
ref3.Show()
End Sub
Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click
ref5 = New frm_phy
ref5.MdiParent = Me
ref5.Show()
End Sub
Private Sub frm_main_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
End Sub
Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click
ref9 = New frm_prb
ref9.MdiParent = Me
ref9.show()
End Sub
Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click
ref7 = New frm_chk
ref7.MdiParent = Me
ref7.Show()
End Sub
Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click
Me.Close()
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click
ref6 = New frm_about
ref6.show()
End Sub
Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click
ref10 = New frm_bill
ref10.mdiparent = Me
Try
ref10.show()
Catch c As Exception
MsgBox(c.ToString)
Finally
End Try
End Sub
Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click
frmref = New frm_patinfo
' frmref = New frm_patinfo
frmref.MdiParent = Me
'frmref.ShowDialog()
frmref.Show()
'frmref.Visible = True
End Sub
Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click
ref11 = New frm_outpat
ref11.mdiparent = Me
Try
ref11.show()
Catch c As Exception
MsgBox(c.ToString)
End Try
End Sub
Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click
ref112 = New frm_emp
ref112.mdiparent = Me
ref112.show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Button1.Enabled = False
frmref = New frm_patinfo
' frmref = New frm_patinfo
frmref.MdiParent = Me
'frmref.ShowDialog()
frmref.Show()
'frmref.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Button1.Enabled = False
ref11 = New frm_outpat
ref11.mdiparent = Me
Try
ref11.show()
Catch c As Exception
MsgBox(c.ToString)
End Try
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Button1.Enabled = False
ref9 = New frm_prb
ref9.MdiParent = Me
ref9.show()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Button1.Enabled = False
ref5 = New frm_phy
ref5.MdiParent = Me
ref5.Show()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Button1.Enabled = False
ref3 = New frm_exa
ref3.MdiParent = Me
ref3.Show()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Button1.Enabled = False
ref2 = New frm_ad
ref2.MdiParent = Me
Try
ref2.Show()
Catch c As Exception
MsgBox(c.ToString)
End Try
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Button1.Enabled = False
ref10 = New frm_bill
ref10.mdiparent = Me
Try
ref10.show()
Catch c As Exception
MsgBox(c.ToString)
Finally
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click
Application.Exit()
End Sub
Dim refg
Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click
refg = New frm_docchk
refg.mdiparent = Me
refg.show()
End Sub
Dim ref222
Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click
ref222 = New frm_arh
ref222.mdiparent = Me
ref222.show()
End Sub
#End Region
#Region "GLOW CODE"
Private Sub MouseEnterEvent(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Button1.MouseEnter, Button2.MouseEnter, Button3.MouseEnter, Button4.MouseEnter, Button5.MouseEnter, Button6.MouseEnter, Button7.MouseEnter, Button8.MouseEnter, Button9.MouseEnter
' A simple event handler that fires when the user's mouse arrow rolls
' over any of the buttons. It passes the button's identity to the Glow sub.
Dim ctrl As Control = CType(sender, Control)
Glow(ctrl, True)
End Sub
Private Sub MouseLeaveEvent(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Button1.MouseLeave, Button2.MouseLeave, Button3.MouseLeave, Button4.MouseLeave, Button5.MouseLeave, Button6.MouseLeave, Button7.MouseLeave, Button8.MouseLeave, Button9.MouseLeave
' A simple event handler that fires when the user's mouse arrow leaves the
' area of any of the buttons. It passes the button's identity to the Glow sub.
Dim ctrl As Control = CType(sender, Control)
Glow(ctrl, False)
End Sub
Private Sub Glow(ByVal ctrl As Control, ByVal Hovering As Boolean)
Dim Sb_R, Sb_G, Sb_B As Int16 ' <--- RGB values for the starting backcolor
Dim Sf_R, Sf_G, Sf_B As Int16 ' <--- RGB values for the starting forecolor
Dim Eb_R, Eb_G, Eb_B As Int16 ' <--- RGB values for the ending backcolor
Dim Ef_R, Ef_G, Ef_B As Int16 ' <--- RGB values for the ending forecolor
Select Case Hovering ' True for MouseEnter, False for MouseLeave
Case True
Sb_R = SystemColors.Control.R ' Assign the variables the
Sb_G = SystemColors.Control.G ' appropriate values based
Sb_B = SystemColors.Control.B ' on system-defined colors
' for control and control
Sf_R = SystemColors.ControlText.R ' text.
Sf_G = SystemColors.ControlText.G
Sf_B = SystemColors.ControlText.B
Eb_R = SystemColors.ActiveCaption.R ' Assign the variables the
Eb_G = SystemColors.ActiveCaption.G ' appropriate values based
Eb_B = SystemColors.ActiveCaption.B ' on system-defined colors
' for the title bar and the
Ef_R = SystemColors.ActiveCaptionText.R ' title bar's text.
Ef_G = SystemColors.ActiveCaptionText.G
Ef_B = SystemColors.ActiveCaptionText.B
Case False
Sb_R = SystemColors.ActiveCaption.R ' Assign the variables the
Sb_G = SystemColors.ActiveCaption.G ' appropriate values based
Sb_B = SystemColors.ActiveCaption.B ' on system-defined colors
' for the title bar and the
Sf_R = SystemColors.ActiveCaptionText.R ' title bar's text.
Sf_G = SystemColors.ActiveCaptionText.G
Sf_B = SystemColors.ActiveCaptionText.B
Eb_R = SystemColors.Control.R ' Assign the variables the
Eb_G = SystemColors.Control.G ' appropriate values based
Eb_B = SystemColors.Control.B ' on system-defined colors
' for control and control
Ef_R = SystemColors.ControlText.R ' text.
Ef_G = SystemColors.ControlText.G
Ef_B = SystemColors.ControlText.B
End Select
Dim b_RIncrement As Int16 = Round(((Eb_R - Sb_R) / 16), 0) ' Find the increments that
Dim b_GIncrement As Int16 = Round(((Eb_G - Sb_G) / 16), 0) ' the RGB values will take;
Dim b_BIncrement As Int16 = Round(((Eb_B - Sb_B) / 16), 0) ' 1/16th of the difference
' between the start and end
Dim f_RIncrement As Int16 = Round(((Ef_R - Sf_R) / 16), 0) ' values, rounded to the
Dim f_GIncrement As Int16 = Round(((Ef_G - Sf_G) / 16), 0) ' nearest integer.
Dim f_BIncrement As Int16 = Round(((Ef_B - Sf_B) / 16), 0)
Dim bR As Int16 = Sb_R ' \
Dim bG As Int16 = Sb_G ' }-- the RGB values for the backcolor as it changes.
Dim bB As Int16 = Sb_B ' /
Dim fR As Int16 = Sf_R ' \
Dim fG As Int16 = Sf_G ' }-- the RGB values for the forecolor as it changes.
Dim fB As Int16 = Sf_B ' /
Dim count As Int16
For count = 0 To 14
bR += b_RIncrement ' Add the appropriate increments to the
bG += b_GIncrement ' RGB values. The result is a nifty
bB += b_BIncrement ' "cross-fade" effect.
fR += f_RIncrement
fG += f_GIncrement
fB += f_BIncrement
ctrl.BackColor = Color.FromArgb(bR, bG, bB) ' Repaint the button using the
ctrl.ForeColor = Color.FromArgb(fR, fG, fB) ' current RGB values, and refresh
ctrl.Refresh() ' the button.
Threading.Thread.Sleep(30 - (count * 2)) ' Wait a certain number of milliseconds,
' which is a factor of the current count.
' I tweaked these numbers to get a decent
' effect; feel free to adjust these
' numbers to achieve an effect you like.
Next
Select Case Hovering
Case True
ctrl.BackColor = SystemColors.ActiveCaption ' Finish the effect by painting
ctrl.ForeColor = SystemColors.ActiveCaptionText ' the control with it's final
Case False ' look, depending on whether
ctrl.BackColor = SystemColors.Control ' we're fading in or out.
ctrl.ForeColor = SystemColors.ControlText
End Select
End Sub
#End Region
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -