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

📄 frmmain.frm

📁 本系统是一个报表分析查询系统
💻 FRM
字号:
VERSION 5.00
Object = "{709F7AE3-E049-11D2-9362-00403332E72F}#1.0#0"; "LEDGER50.OCX"
Begin VB.Form frmMain 
   Caption         =   "Form1"
   ClientHeight    =   4560
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   8325
   LinkTopic       =   "Form1"
   ScaleHeight     =   4560
   ScaleWidth      =   8325
   StartUpPosition =   3  '窗口缺省
   Begin LEDGER50Lib.Ledger50 frmRpt 
      Height          =   3495
      Left            =   240
      TabIndex        =   1
      Top             =   240
      Width           =   7815
      _Version        =   65536
      _ExtentX        =   13785
      _ExtentY        =   6165
      _StockProps     =   237
      ForeColor       =   0
      BackColor       =   16777215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   3120
      TabIndex        =   0
      Top             =   3960
      Width           =   1335
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
 Dim PrtString As String
 Call getXmlValue(App.Path & "\Cfg.xml", "PrintCfg/Heng", PrtString)
 frmRpt.Printer.PrinterSetting = PrtString
 frmRpt.Printer.Preview
End Sub

Private Sub Form_Load()
 frmRpt.Printer.Note.Text = "测试数据"
End Sub

Public Function getXmlValue(ByVal XmlFile As String, ByVal AppKey As String, ByRef AppValue As String) As Boolean
 On Error GoTo ErrHandle
 Dim objXml As New DOMDocument
 Dim objNode As IXMLDOMNode
 '//
 Call objXml.Load(XmlFile)
 '//
 Set objNode = objXml.selectSingleNode(AppKey)
 If objNode Is Nothing Then
  AppValue = ""
 Else
  AppValue = objNode.nodeTypedValue
 End If
 '//
 Set objNode = Nothing
 Set objXml = Nothing
 getXmlValue = True
 Exit Function
ErrHandle:
 getXmlValue = False
End Function

⌨️ 快捷键说明

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