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

📄 frmmain.vb

📁 Visual Basic Oracle数据库联接
💻 VB
📖 第 1 页 / 共 5 页
字号:
        Me.Label1.TextAlign = CType(resources.GetObject("Label1.TextAlign"), System.Drawing.ContentAlignment)
        Me.Label1.Visible = CType(resources.GetObject("Label1.Visible"), Boolean)
        '
        'dlgOpenWordFile
        '
        Me.dlgOpenWordFile.Filter = resources.GetString("dlgOpenWordFile.Filter")
        Me.dlgOpenWordFile.Title = resources.GetString("dlgOpenWordFile.Title")
        '
        'chkMerlinHide
        '
        Me.chkMerlinHide.AccessibleDescription = resources.GetString("chkMerlinHide.AccessibleDescription")
        Me.chkMerlinHide.AccessibleName = resources.GetString("chkMerlinHide.AccessibleName")
        Me.chkMerlinHide.Anchor = CType(resources.GetObject("chkMerlinHide.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.chkMerlinHide.Appearance = CType(resources.GetObject("chkMerlinHide.Appearance"), System.Windows.Forms.Appearance)
        Me.chkMerlinHide.BackgroundImage = CType(resources.GetObject("chkMerlinHide.BackgroundImage"), System.Drawing.Image)
        Me.chkMerlinHide.CheckAlign = CType(resources.GetObject("chkMerlinHide.CheckAlign"), System.Drawing.ContentAlignment)
        Me.chkMerlinHide.Dock = CType(resources.GetObject("chkMerlinHide.Dock"), System.Windows.Forms.DockStyle)
        Me.chkMerlinHide.Enabled = CType(resources.GetObject("chkMerlinHide.Enabled"), Boolean)
        Me.chkMerlinHide.FlatStyle = CType(resources.GetObject("chkMerlinHide.FlatStyle"), System.Windows.Forms.FlatStyle)
        Me.chkMerlinHide.Font = CType(resources.GetObject("chkMerlinHide.Font"), System.Drawing.Font)
        Me.chkMerlinHide.Image = CType(resources.GetObject("chkMerlinHide.Image"), System.Drawing.Image)
        Me.chkMerlinHide.ImageAlign = CType(resources.GetObject("chkMerlinHide.ImageAlign"), System.Drawing.ContentAlignment)
        Me.chkMerlinHide.ImageIndex = CType(resources.GetObject("chkMerlinHide.ImageIndex"), Integer)
        Me.chkMerlinHide.ImeMode = CType(resources.GetObject("chkMerlinHide.ImeMode"), System.Windows.Forms.ImeMode)
        Me.chkMerlinHide.Location = CType(resources.GetObject("chkMerlinHide.Location"), System.Drawing.Point)
        Me.chkMerlinHide.Name = "chkMerlinHide"
        Me.chkMerlinHide.RightToLeft = CType(resources.GetObject("chkMerlinHide.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.chkMerlinHide.Size = CType(resources.GetObject("chkMerlinHide.Size"), System.Drawing.Size)
        Me.chkMerlinHide.TabIndex = CType(resources.GetObject("chkMerlinHide.TabIndex"), Integer)
        Me.chkMerlinHide.Text = resources.GetString("chkMerlinHide.Text")
        Me.chkMerlinHide.TextAlign = CType(resources.GetObject("chkMerlinHide.TextAlign"), System.Drawing.ContentAlignment)
        Me.chkMerlinHide.Visible = CType(resources.GetObject("chkMerlinHide.Visible"), Boolean)
        '
        'StatusLabel
        '
        Me.StatusLabel.AccessibleDescription = CType(resources.GetObject("StatusLabel.AccessibleDescription"), String)
        Me.StatusLabel.AccessibleName = CType(resources.GetObject("StatusLabel.AccessibleName"), String)
        Me.StatusLabel.Anchor = CType(resources.GetObject("StatusLabel.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.StatusLabel.AutoSize = CType(resources.GetObject("StatusLabel.AutoSize"), Boolean)
        Me.StatusLabel.Dock = CType(resources.GetObject("StatusLabel.Dock"), System.Windows.Forms.DockStyle)
        Me.StatusLabel.Enabled = CType(resources.GetObject("StatusLabel.Enabled"), Boolean)
        Me.StatusLabel.Font = CType(resources.GetObject("StatusLabel.Font"), System.Drawing.Font)
        Me.StatusLabel.Image = CType(resources.GetObject("StatusLabel.Image"), System.Drawing.Image)
        Me.StatusLabel.ImageAlign = CType(resources.GetObject("StatusLabel.ImageAlign"), System.Drawing.ContentAlignment)
        Me.StatusLabel.ImageIndex = CType(resources.GetObject("StatusLabel.ImageIndex"), Integer)
        Me.StatusLabel.ImeMode = CType(resources.GetObject("StatusLabel.ImeMode"), System.Windows.Forms.ImeMode)
        Me.StatusLabel.Location = CType(resources.GetObject("StatusLabel.Location"), System.Drawing.Point)
        Me.StatusLabel.Name = "StatusLabel"
        Me.StatusLabel.RightToLeft = CType(resources.GetObject("StatusLabel.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.StatusLabel.Size = CType(resources.GetObject("StatusLabel.Size"), System.Drawing.Size)
        Me.StatusLabel.TabIndex = CType(resources.GetObject("StatusLabel.TabIndex"), Integer)
        Me.StatusLabel.Text = resources.GetString("StatusLabel.Text")
        Me.StatusLabel.TextAlign = CType(resources.GetObject("StatusLabel.TextAlign"), System.Drawing.ContentAlignment)
        Me.StatusLabel.Visible = CType(resources.GetObject("StatusLabel.Visible"), Boolean)
        '
        'frmMain
        '
        Me.AccessibleDescription = CType(resources.GetObject("$this.AccessibleDescription"), String)
        Me.AccessibleName = CType(resources.GetObject("$this.AccessibleName"), String)
        Me.Anchor = CType(resources.GetObject("$this.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.AutoScaleBaseSize = CType(resources.GetObject("$this.AutoScaleBaseSize"), System.Drawing.Size)
        Me.AutoScroll = CType(resources.GetObject("$this.AutoScroll"), Boolean)
        Me.AutoScrollMargin = CType(resources.GetObject("$this.AutoScrollMargin"), System.Drawing.Size)
        Me.AutoScrollMinSize = CType(resources.GetObject("$this.AutoScrollMinSize"), System.Drawing.Size)
        Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
        Me.ClientSize = CType(resources.GetObject("$this.ClientSize"), System.Drawing.Size)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.StatusLabel, Me.chkMerlinHide, Me.Label1, Me.tabOfficeDemo})
        Me.Dock = CType(resources.GetObject("$this.Dock"), System.Windows.Forms.DockStyle)
        Me.Enabled = CType(resources.GetObject("$this.Enabled"), Boolean)
        Me.Font = CType(resources.GetObject("$this.Font"), System.Drawing.Font)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.ImeMode = CType(resources.GetObject("$this.ImeMode"), System.Windows.Forms.ImeMode)
        Me.Location = CType(resources.GetObject("$this.Location"), System.Drawing.Point)
        Me.MaximizeBox = False
        Me.MaximumSize = CType(resources.GetObject("$this.MaximumSize"), System.Drawing.Size)
        Me.Menu = Me.mnuMain
        Me.MinimumSize = CType(resources.GetObject("$this.MinimumSize"), System.Drawing.Size)
        Me.Name = "frmMain"
        Me.RightToLeft = CType(resources.GetObject("$this.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.StartPosition = CType(resources.GetObject("$this.StartPosition"), System.Windows.Forms.FormStartPosition)
        Me.Text = resources.GetString("$this.Text")
        Me.Visible = CType(resources.GetObject("$this.Visible"), Boolean)
        Me.tabOfficeDemo.ResumeLayout(False)
        Me.pgeInvoice.ResumeLayout(False)
        Me.GroupBox1.ResumeLayout(False)
        CType(Me.grdInvoice, System.ComponentModel.ISupportInitialize).EndInit()
        Me.pgeInventory.ResumeLayout(False)
        Me.pgeExcel.ResumeLayout(False)
        CType(Me.grdProducts, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.dsNewRec, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

#Region " Standard Menu Code "
    ' <System.Diagnostics.DebuggerStepThrough()> has been added to some procedures since they are
    ' not the focus of the demo. Remove them if you wish to debug the procedures.
    ' This code simply shows the About form.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub mnuAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuAbout.Click
        ' Open the About form in Dialog Mode
        Dim frm As New frmAbout()
        frm.ShowDialog(Me)
        frm.Dispose()
    End Sub

    ' This code will close the form.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click
        ' Close the current form
        Me.Close()
    End Sub
#End Region

#Region "FrmMain Code"
    ' private variables
    Private WithEvents _PDoc As New System.Drawing.Printing.PrintDocument()
    Private _currentPage As Integer = 0
    ' these will be created in BeginPrint and 
    ' destroyed in EndPrint.
    Private _headerFont As Font
    Private _bodyFont As Font
    Private _defaultBrush As Brush = Brushes.Black
    Private _defaultPen As New Pen(Brushes.Black, 0.25F)

    Private agentController As AgentObjects.Agent
    Private agentCharacter As AgentObjects.IAgentCtlCharacter
    Private dsMenu As DataSet
    Public dsCustList As DataSet
    Public dsProdList As DataSet
    Public dsSuppList As DataSet
    Private styleAlreadyExists As Boolean = False
    Private InvTableCreated As Boolean = False


    ' Handles the Form load event, which fires when the form is first loaded.
    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Application.DoEvents()
            ' The Agent object is used to open a connection to the Agent server,
            ' load the character, and then associate the character with the 
            ' variable referencing the IAgentCtlCharacter interface. From then
            ' on you program against the agentCharacter.
            'Set directory path
            agentController = New AgentObjects.Agent
            With agentController
                .Connected = True
                .Characters.Load("merlin", "merlin.acs")
                agentCharacter = .Characters("merlin")
            End With
            GetListItems()
            ' Use the Location property to place Merlin relative to the upper left 
            ' corner of the Form. 
            With agentCharacter
                .MoveTo(CShort(Me.Location.X + 420), CShort(Me.Location.Y + 130))
                .Show()
                .Play("Announce")
                .Speak("Hello, my name is Merlin. " & _
                    "Welcome to the Order Automation Demo!")
                .Play("GestureRight")
                ' You can make Merlin's speech sound more natural by inserting speech
                ' output tags like Pau (Pause), Chr (Character of the Voice), 
                ' Emp (Emphasis) or Spd (Speed). Surround each name-value pair with a
                ' backslash character. 
                .Speak("Lets start by making a new invoice,\pau=300\or\pau=500\...")
                .MoveTo(CShort(Me.Location.X + 520), CShort(Me.Location.Y + 75))
                .Play("GestureRight")
                .Speak("...try out some of the other features of the program.")
            End With

            ' Hide the "Export to Excel>>" Button on the Excel tab until the 
            ' DataGrid is databound.
       

⌨️ 快捷键说明

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