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

📄 单据打印设置.frm

📁 新世纪ERP系统管理源代码
💻 FRM
📖 第 1 页 / 共 5 页
字号:
    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 + -