📄 frmjsoption.frm
字号:
Else
hebinname = workb.name + Left$(jskbs(b + 1).js, 4) + "老师"
For i = 0 To Class - 1
For j = 0 To Day - 1
workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2) + Mid$(jskbs(b + 1).rkbiao(i, j), 7, 5) '+Left$(jskbs(b + 1).rkbiao(i, j), 2)+Left$(jskbs(b + 1).rkbiao(i, j), 2)
'workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2)
If Trim$(workb.biao(i, j)) = "0" Then workb.biao(i, j) = " "
Next j
Next i
Call printb2(xx, yy, ww, hh)
Printer.EndDoc
Exit For
End If
End If
Next b
End If
Case "js4b"
Printer.Orientation = 2
Gsizebt = 18
Gsize = 10
ww = Printer.ScaleWidth * 45 / 100
hh = Printer.ScaleHeight * 45 / 100
firstpage = True
biaonum = 0
For b = 0 To frmprint.Lstpjs.ListCount - 1
If frmprint.Lstpjs.Selected(b) = True Then
biaonum = biaonum + 1
If Not firstpage And (biaonum Mod 4) = 1 Then
Printer.NewPage
End If
Select Case (biaonum Mod 4)
Case Is = 1
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 2 * hh) / 4
Case Is = 3
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 2 * hh) * 3 / 4 + hh
Case Is = 2
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 2 * hh) / 4
Case Is = 0
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 2 * hh) * 3 / 4 + hh
End Select
workb.name = Left$(jskbs(b + 1).js, 8) + "老师"
For i = 0 To Class - 1
For j = 0 To Day - 1
workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2) + Mid$(jskbs(b + 1).rkbiao(i, j), 7, 5) '+Left$(jskbs(b + 1).rkbiao(i, j), 2)+Left$(jskbs(b + 1).rkbiao(i, j), 2)
If Trim$(workb.biao(i, j)) = "0" Then workb.biao(i, j) = " "
Next j
Next i
Call printb(xx, yy, ww, hh)
firstpage = False
End If
Next b
Printer.EndDoc
Case "js8b"
'Exit Sub
Printer.Orientation = 1
Gsizebt = 16
Gsize = 8
ww = Printer.ScaleWidth * 45 / 100
hh = Printer.ScaleHeight * 20 / 100
firstpage = True
biaonum = 0
For b = 0 To frmprint.Lstpjs.ListCount - 1
If frmprint.Lstpjs.Selected(b) = True Then
biaonum = biaonum + 1
If Not firstpage And (biaonum Mod 8) = 1 Then
Printer.NewPage
End If
Select Case (biaonum Mod 8)
Case Is = 1
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 3
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 5
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 7
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
Case Is = 2
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 4
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 6
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 0
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
End Select
workb.name = Left$(jskbs(b + 1).js, 8) + "老师"
For i = 0 To Class - 1
For j = 0 To Day - 1
workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2) + Mid$(jskbs(b + 1).rkbiao(i, j), 7, 5) '+Left$(jskbs(b + 1).rkbiao(i, j), 2)+Left$(jskbs(b + 1).rkbiao(i, j), 2)
'workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2)
If Trim$(workb.biao(i, j)) = "0" Then workb.biao(i, j) = " "
Next j
Next i
Call printb(xx, yy, ww, hh)
firstpage = False
End If
Next b
Printer.EndDoc
Case "jskd4b"
'MsgBox "jskd4b"
Printer.Orientation = 1
Gsizebt = 18
Gsize = 10
'MsgBox Printer.ScaleWidth
'MsgBox Printer.ScaleHeight
'Exit Sub
ww = Printer.ScaleWidth * 45 / 100
hh = Printer.ScaleHeight * 40 / 100
firstpage = True
biaonum = 0
For b = 0 To frmprint.Lstpjs.ListCount - 1
If frmprint.Lstpjs.Selected(b) = True Then
biaonum = biaonum + 1
If Not firstpage And (biaonum Mod 4) = 1 Then
Printer.NewPage
End If
Select Case (biaonum Mod 4)
Case Is = 1
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 2 * hh) / 4
Case Is = 3
xx = (Printer.ScaleWidth - 2 * ww) / 4
yy = (Printer.ScaleHeight - 2 * hh) * 3 / 4 + hh
Case Is = 2
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 2 * hh) / 4
Case Is = 0
xx = (Printer.ScaleWidth - 2 * ww) * 3 / 4 + ww
yy = (Printer.ScaleHeight - 2 * hh) * 3 / 4 + hh
End Select
workb.name = Left$(jskbs(b + 1).js, 8) + "老师"
For i = 0 To Class - 1
For j = 0 To Day - 1
workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2) + Mid$(jskbs(b + 1).rkbiao(i, j), 7, 5) '+Left$(jskbs(b + 1).rkbiao(i, j), 2)+Left$(jskbs(b + 1).rkbiao(i, j), 2)
If Trim$(workb.biao(i, j)) = "0" Then workb.biao(i, j) = " "
Next j
Next i
Call printb(xx, yy, ww, hh)
firstpage = False
End If
Next b
Printer.EndDoc
Case "jskd16b"
Printer.Orientation = 1
'MsgBox "jskd16b"
Gsizebt = 15
Gsize = 8
ww = Printer.ScaleWidth * 24 / 100
hh = Printer.ScaleHeight * 20 / 100
firstpage = True
biaonum = 0
For b = 0 To frmprint.Lstpjs.ListCount - 1
If frmprint.Lstpjs.Selected(b) = True Then
biaonum = biaonum + 1
If Not firstpage And (biaonum Mod 16) = 1 Then
Printer.NewPage
End If
Select Case (biaonum Mod 16)
Case Is = 1
xx = (Printer.ScaleWidth - 4 * ww) / 5
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 3
xx = (Printer.ScaleWidth - 4 * ww) / 5
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 5
xx = (Printer.ScaleWidth - 4 * ww) / 5
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 7
xx = (Printer.ScaleWidth - 4 * ww) / 5
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
Case Is = 9
xx = (Printer.ScaleWidth - 4 * ww) * 3 / 5 + 2 * ww
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 11
xx = (Printer.ScaleWidth - 4 * ww) * 3 / 5 + 2 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 13
xx = (Printer.ScaleWidth - 4 * ww) * 3 / 5 + 2 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 15
xx = (Printer.ScaleWidth - 4 * ww) * 3 / 5 + 2 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
Case Is = 2
xx = (Printer.ScaleWidth - 4 * ww) * 2 / 5 + ww
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 4
xx = (Printer.ScaleWidth - 4 * ww) * 2 / 5 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 6
xx = (Printer.ScaleWidth - 4 * ww) * 2 / 5 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 8
xx = (Printer.ScaleWidth - 4 * ww) * 2 / 5 + ww
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
Case Is = 10
xx = (Printer.ScaleWidth - 4 * ww) * 4 / 5 + 3 * ww
yy = (Printer.ScaleHeight - 4 * hh) / 5
Case Is = 12
xx = (Printer.ScaleWidth - 4 * ww) * 4 / 5 + 3 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 2 / 5 + hh
Case Is = 14
xx = (Printer.ScaleWidth - 4 * ww) * 4 / 5 + 3 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 3 / 5 + 2 * hh
Case Is = 0
xx = (Printer.ScaleWidth - 4 * ww) * 4 / 5 + 3 * ww
yy = (Printer.ScaleHeight - 4 * hh) * 4 / 5 + 3 * hh
End Select
workb.name = Left$(jskbs(b + 1).js, 8) + "老师"
For i = 0 To Class - 1
For j = 0 To Day - 1
workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2) + Mid$(jskbs(b + 1).rkbiao(i, j), 7, 5) '+Left$(jskbs(b + 1).rkbiao(i, j), 2)+Left$(jskbs(b + 1).rkbiao(i, j), 2)
'workb.biao(i, j) = Left$(jskbs(b + 1).rkbiao(i, j), 2)
If Trim$(workb.biao(i, j)) = "0" Then workb.biao(i, j) = " "
Next j
Next i
Call printb(xx, yy, ww, hh)
firstpage = False
End If
Next b
Printer.EndDoc
End Select
Unload frmjsoption
End Sub
Private Sub Cmdttcolor_Click()
dlgcolor.ShowColor
Gttcolor = dlgcolor.Color
Text2.ForeColor = Gttcolor
Text2.Text = "题头颜色"
End Sub
Private Sub cmdzwcolor_Click()
dlgcolor.ShowColor
Gzwcolor = dlgcolor.Color
Text3.ForeColor = Gzwcolor
Text3.Text = "正文颜色"
End Sub
Private Sub Comjsfont_Click()
'MsgBox Str(Comjsfont.Index)
Gjszt = Printer.Fonts(Comjsfont.ListIndex)
Texztyl.FontName = Gjszt
End Sub
Private Sub Form_Load()
On Error Resume Next
'If Printer.PaperSize = 9 Then
Opt4b.Enabled = True 'False
Opt2b.Enabled = True 'False
Opt8b.Enabled = True 'False
Optkd4b.Enabled = True
Optkd16b.Enabled = True
'Select Case Trim$(Gstrbshu)
' Case Is = "jskd4b"
' Optkd4b.Value = True
' Case Is <> "jskd16b"
' Optkd16b.Value = True
' End Select
'Else
' Opt2b.Enabled = False
' Opt4b.Enabled = False
' Opt8b.Enabled = False
'Select Case Trim$(Gstrbshu)
'Case Is = "js2b"
'Opt2b.Value = True
'Case Is = "js4b"
'Opt4b.Value = True
'Case Is = "js8b"
'Opt8b.Value = True
'Case Else
'Opt4b.Value = True
'End Select
' Optkd4b.Enabled = True
' Optkd16b.Enabled = True
'End If
Opt4b.Value = 1
If Ghebin = True Then
Opt2b.Value = 1
Opt4b.Enabled = False
Opt8b.Enabled = False
End If
'If chkhavejsbz = True Then
'Chkhavebz.Value = 1
'Texbz.Enabled = True
'Texbz.Text = Gstrjsbz
'Else
'Chkhavebz.Value = 0
'Texbz.Enabled = False
'Texbz.SetFocus
'End If
Texbt.Text = "教师课程表"
'If chkhavejsbt = True Then
Chkhavebt.Value = 1
Texbt.Enabled = True
'Texbt.Text = Trim$(Gstrjsbt)
'Texbt.SetFocus
'Else
'Chkhavebt.Value = 0
'Texbt.Enabled = False
'Texbt.Text = Gstrbjbt
'End If
'If chkhavejssj Then
Chkhavesj.Value = 1
'Else
'Chkhavesj.Value = 0
'End If
Dim i As Integer
For i = 0 To Printer.FontCount - 1
Comjsfont.List(i) = Printer.Fonts(i)
Next i
'If Gjszt = "" Then
Comjsfont.Text = "仿宋_GB2312" ' Combjfont.List(0) 'Printer.Fonts(0).FontName
Texztyl.FontName = "仿宋_GB2312" 'Printer.Fonts(0)
Gjszt = "仿宋_GB2312" 'Printer.Fonts(0) 'Combjfont.List(0)
'Else
'Comjsfont.Text = Gjszt
'Texztyl.FontName = Gjszt
'End If
On Error GoTo wei
If Printer.ColorMode = 2 Then
Label3.Caption = "请选择:"
Cmdbtcolor.Enabled = True
Cmdttcolor.Enabled = True
cmdzwcolor.Enabled = True
Cmdbgcolor.Enabled = True
'If Gjsbtcolor <> Null Then
'text1.ForeColor = Gjsbtcolor
'Else
Gbtcolor = &H80000008
'End If
'If Gjsttcolor <> Null Then
'Text2.ForeColor = Gjsttcolor
'Else
Gttcolor = &H80000008
'End If
'If Gjszwcolor <> Null Then
'Text3.ForeColor = Gjszwcolor
'Else
Gzwcolor = &H80000008
'End If
Gbgcolor = &H80000008
Else
wei:
Label3.Caption = "您的当前打印机不支持彩色打印模式,将使用单色打印。"
Cmdbtcolor.Enabled = False
Cmdttcolor.Enabled = False
cmdzwcolor.Enabled = False
Cmdbgcolor.Enabled = False
Gbtcolor = &H80000008
Gttcolor = &H80000008
Gzwcolor = &H80000008
Gbgcolor = &H80000008
Text1.ForeColor = Gbtcolor
Text2.ForeColor = Gttcolor
Text3.ForeColor = Gzwcolor
Texbg.ForeColor = Gbgcolor
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
'---------
'If Chkhavebz.Value = 1 Then
'Gstrbz = Trim$(Texbz.Text)
'Else
'Gstrbz = ""
'End If
'If Chkhavesj.Value = 1 Then
'Gstrsj = Str$(Now())
'Else
'Gstrsj = ""
'End If
'If Chkhavebt.Value = 1 Then
'Gstrbt = Trim$(Texbt.Text)
'Else
'Gstrbt = ""
'End If
'MsgBox "bt" + Gstrbt + "sj" + Gstrsj + "bz" + Gstrbz
End Sub
Private Sub Opt2b_Click()
Pic2b.Visible = True
Pic4b.Visible = False
Pic8b.Visible = False
Pic16b.Visible = False
'Opt2b.Value = True
Gstrbshu = "js2b"
Optkd16b.Value = 0
Optkd4b.Value = 0
End Sub
Private Sub Opt4b_Click()
Pic4b.Visible = True
Pic2b.Visible = False
Pic8b.Visible = False
Pic16b.Visible = False
'Opt1b.Value = True
Gstrbshu = "js4b"
Optkd16b.Value = 0
Optkd4b.Value = 0
End Sub
Private Sub Opt8b_Click()
Pic8b.Visible = True
Pic4b.Visible = False
Pic2b.Visible = False
Pic16b.Visible = False
Gstrbshu = "js8b"
Optkd16b.Value = 0
Optkd4b.Value = 0
End Sub
Private Sub Optkd16b_Click()
Gstrbshu = "jskd16b"
Opt2b.Value = 0
Opt4b.Value = 0
Opt8b.Value = 0
Pic16b.Visible = True
Pic4b.Visible = False
Pic8b.Visible = False
Pic2b.Visible = False
End Sub
Private Sub Optkd4b_Click()
Gstrbshu = "jskd4b"
Opt2b.Value = 0
Opt4b.Value = 0
Opt8b.Value = 0
Pic4b.Visible = True
Pic2b.Visible = False
Pic8b.Visible = False
Pic16b.Visible = False
End Sub
Private Sub Texbt_Change()
Gstrbt = Texbt.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -