?? 單據打印設置.frm
字號:
Textindex = Index
Text_W.Left = LrText(Index).Left + LrText(Index).Width
Text_W.Top = LrText(Index).Top + LrText(Index).Height / 2 - Text_W.Height / 2
Text_W.Visible = True
End Sub
Private Sub PrintType_Click()
'Command1_Click
End Sub
Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "Save"
If Trim(Command1.Tag) = "" Then Exit Sub
Bill_Save
Case "SD"
If Trim(Command1.Tag) = "" Then Exit Sub
SD_Text
Case "sx"
If Trim(Command1.Tag) = "" Then Exit Sub
Command1_Click
Case "Item"
If Trim(Command1.Tag) = "" Then Exit Sub
XT_PrintTItem.Show 1
Case "HD"
If Trim(Command1.Tag) = "" Then Exit Sub
HD_Text
Case "sz"
If Trim(Command1.Tag) = "" Then Exit Sub
Dyymctbl.Show 1
Case "yl"
If Trim(Command1.Tag) <> "" Then
If WglrGrid.Visible = True Then
BillGridPrint WglrGrid, LrText, GridStr, Szzls, GridCode, TextGroupCode, XtReportCode, False, Trim(PrintType.Tag)
Else
BillTextPrint Lab_Title, LrText, TextGroupCode, XtReportCode, False, Trim(PrintType.Tag)
End If
End If
Case "Exit"
Unload Me
End Select
End Sub
Private Sub Text_W_LostFocus()
Text_W.Visible = False
End Sub
'調整文本框的寬度
Private Sub Text_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = True
Move_X = X
label_XY.Top = LrText(Textindex).Top + 200
label_XY.Left = LrText(Textindex).Left + LrText(Textindex).Width / 2
Caption_XY.Caption = "TextBox寬度=" & LrText(Textindex).Width
label_XY.Visible = True
End Sub
'調整文本框的寬度
Private Sub Text_W_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If TF = True Then
If (LrText(Textindex).Width - (Move_X - X) > 0) And (LrText(Textindex).Width - (Move_X - X) < (Pict.Width - LrText(Textindex).Left - 100)) Then
label_XY.Top = LrText(Textindex).Top + 200
label_XY.Left = LrText(Textindex).Left + LrText(Textindex).Width / 2
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
LrText(Textindex).Width = LrText(Textindex).Width - (Move_X - X)
Text_W.Left = LrText(Textindex).Width + LrText(Textindex).Left
Caption_XY.Caption = "TextBox寬度=" & LrText(Textindex).Width - (Move_X - X)
End If
End If
End Sub
'調整文本框的寬度
Private Sub Text_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = False
label_XY.Visible = False
End Sub
Private Sub WglrGrid_AfterUserResize(ByVal Row As Long, ByVal Col As Long)
'調整列寬
If HjGrid.Visible Then
With HjGrid
.ColWidth(Col) = WglrGrid.ColWidth(Col)
End With
End If
End Sub
Private Sub WglrGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)
'如果結束列小于用戶定義網格開始列,則結束列=用戶定義網格開始列
'因為開始列以前的列都是隱藏列,由于要把當前開始移動列移動到隱藏列上
'所以控件自動把隱藏列變為顯示列,這樣在刷新數據時,會把隱藏列上的數據
'顯示出來,并且,由于開始列以前的隱藏列在XT_Grid中,不對應邏輯值,所以在保存
'網格格式時會出錯
If Col > Position Then
If Position < GridInf(1) Then Position = GridInf(1)
Else
If Col < GridInf(1) Then Col = GridInf(1)
End If
Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
End Sub
Private Sub WglrGrid_Scroll()
'限制用戶在錄入過程中滾動鼠標
With WglrGrid
HjGrid.LeftCol = .LeftCol
End With
End Sub
'調整單據的高度
Private Sub Pict_H_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Move_X = X
End Sub
'調整單據的高度
Private Sub Pict_H_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Pict.Width > (Move_X - X)) And (Pict.Width - (Move_X - X) < (Me.Width - Pict.Left - 100)) Then
Pict.Width = Pict.Width - (Move_X - X)
Pict_H.Left = Pict.Width - Pict_H.Width
Pict_W.Width = Pict.Width
' If WglrGrid.Visible = False Then
'/ Lab_Title.Left = Pict.Width / 2 - Lab_Title.Width / 2
' End If
' Toolbar1.Width = Pict.Width
End If
End Sub
'調整單據的寬度
Private Sub Pict_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Move_Y = Y
End Sub
'調整單據的寬度
Private Sub Pict_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If (Pict.Height > (Move_Y - Y)) And ((Pict.Height - (Move_Y - Y) + Pict.Top) < (Me.Height - 500)) Then
Pict.Height = Pict.Height - (Move_Y - Y)
Pict_W.Top = Pict.Height - Pict_W.Height
Pict_H.Height = Pict.Height
End If
End Sub
'調整文本寬的位置
Private Sub TsLabel_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = True
Move_Y = Y: Move_X = X
label_XY.Top = TsLabel(Index).Top + 200
label_XY.Left = TsLabel(Index).Left + 200
Caption_XY.Caption = "X=" & TsLabel(Index).Left & ",Y=" & LrText(Index).Top
label_XY.Visible = True
End Sub
'調整文本寬的位置
Private Sub TsLabel_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If TF = True Then
If (TsLabel(Index).Top - (Move_Y - Y) >= 0) And ((TsLabel(Index).Top - (Move_Y - Y)) < (Pict.Height - TsLabel(Index).Height) - 175) Then
TsLabel(Index).Top = TsLabel(Index).Top - (Move_Y - Y)
label_XY.Top = label_XY.Top - (Move_Y - Y)
LrText(Index).Top = TsLabel(Index).Top - 30
End If
'------------------------
If (TsLabel(Index).Left - (Move_X - X) >= 0) And (TsLabel(Index).Left - (Move_X - X) < (Pict.Width - LrText(Index).Width - TsLabel(Index).Width - 75)) Then
TsLabel(Index).Left = TsLabel(Index).Left - (Move_X - X)
label_XY.Left = label_XY.Left - (Move_X - X)
LrText(Index).Left = TsLabel(Index).Left + TsLabel(Index).Width + 20
End If
If Textindex = Index Then
Text_W.Left = LrText(Index).Left + LrText(Index).Width
Text_W.Top = LrText(Index).Top + LrText(Index).Height / 2 - Text_W.Height / 2
End If
Caption_XY.Caption = "X=" & TsLabel(Index).Left & ",Y=" & LrText(Index).Top
End If
End Sub
'調整文本寬的位置
Private Sub TsLabel_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = False
label_XY.Visible = False
End Sub
'調整網格位置
Private Sub Grid_XY_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = True
Move_Y = Y
Move_X = X
label_XY.Top = Grid_XY.Top + 200
label_XY.Left = Grid_XY.Left + 200
Caption_XY.Caption = "X=" & Grid_XY.Left & ",Y=" & Grid_XY.Top
label_XY.Visible = True
End Sub
'調整網格位置
Private Sub Grid_XY_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If TF = True Then
If (Grid_XY.Top - (Move_Y - Y) >= 0) And (Grid_XY.Top - (Move_Y - Y) < Pict.Height - 150) Then
Grid_XY.Top = Grid_XY.Top - (Move_Y - Y)
label_XY.Top = label_XY.Top - (Move_Y - Y)
WglrGrid.Top = Grid_XY.Top
End If
If (Grid_XY.Left - (Move_X - X) >= 0) And (Grid_XY.Left - (Move_X - X) < Pict.Width - 200) Then
Grid_XY.Left = Grid_XY.Left - (Move_X - X)
label_XY.Left = label_XY.Left - (Move_X - X)
WglrGrid.Left = Grid_XY.Left + Grid_XY.Width
End If
Grid_W.Left = WglrGrid.Width + WglrGrid.Left
Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
Grid_H.Top = WglrGrid.Height + WglrGrid.Top
Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
Caption_XY.Caption = "X=" & Grid_XY.Left & ",Y=" & Grid_XY.Top
' Lab_Title.Left = WglrGrid.Width / 2 - Lab_Title.Width / 2 + WglrGrid.Left
End If
End Sub
'調整網格位置
Private Sub Grid_XY_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = False
label_XY.Visible = False
End Sub
'改變網格的寬度
Private Sub Grid_W_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = True
Move_X = X
label_XY.Top = Grid_W.Top + 200
label_XY.Left = Grid_W.Left - label_XY.Width
Caption_XY.Caption = "網格寬度=" & WglrGrid.Width
label_XY.Visible = True
End Sub
'改變網格的寬度
Private Sub Grid_W_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If TF = True Then
If (WglrGrid.Width - (Move_X - X) > 0) And (WglrGrid.Width - (Move_X - X) < (Pict.Width - WglrGrid.Left - 100)) Then
label_XY.Top = Grid_W.Top + 200
label_XY.Left = Grid_W.Left - label_XY.Width
Caption_XY.Caption = "網格寬度=" & WglrGrid.Width - (Move_X - X)
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
WglrGrid.Width = WglrGrid.Width - (Move_X - X)
Grid_W.Left = WglrGrid.Width + WglrGrid.Left
Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
Grid_H.Top = WglrGrid.Height + WglrGrid.Top
Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
' Lab_Title.Left = WglrGrid.Width / 2 - Lab_Title.Width / 2 + WglrGrid.Left
End If
End If
End Sub
'改變網格的寬度
Private Sub Grid_W_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = False
label_XY.Visible = False
End Sub
'改變網格的高度
Private Sub Grid_H_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
TF = True
Move_Y = Y
label_XY.Top = Grid_H.Top + 200
label_XY.Left = Grid_H.Left + 200
Caption_XY.Caption = "網格高度=" & WglrGrid.Height
label_XY.Visible = True
End Sub
'改變網格的高度
Private Sub Grid_H_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim gridheight As Integer
If WglrGrid.FixedRows = 1 Then
gridheight = WglrGrid.RowHeight(1) * 2 + WglrGrid.RowHeight(0)
Else
gridheight = WglrGrid.RowHeight(1) + WglrGrid.RowHeight(0) + WglrGrid.RowHeight(2) * 2
End If
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<
If TF = True Then
If (WglrGrid.Height > Move_Y - Y + gridheight) And ((WglrGrid.Height - (Move_Y - Y) + WglrGrid.Top) < Pict.Height - 130) Then
label_XY.Top = Grid_H.Top + 200
label_XY.Left = Grid_H.Left + 200
Caption_XY.Caption = "網格高度=" & WglrGrid.Height - (Move_Y - Y)
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
WglrGrid.Height = WglrGrid.Height - (Move_Y - Y)
Grid_W.Left = WglrGrid.Width + WglrGrid.Left
Grid_W.Top = WglrGrid.Top + WglrGrid.Height / 2 - 50
Grid_H.Top = WglrGrid.Height + WglrGrid.Top
Grid_H.Left = WglrGrid.Left + WglrGrid.Width / 2 - 50
End If
End If
End Sub
'改變網格的高度
Private Sub Grid_H_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -