Click here to Skip to main content
15,897,032 members
Articles / Programming Languages / Visual Basic

Linking Multiple Embedded Controls

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
17 Aug 2011CPOL15 min read 35.5K   572   6  
This article explores software architectural improvements for creating a library of controls deployed in Windows Forms, Wonderware InTouch, and WinCC.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.InteropSelectionControl2 = New InteropIsothermControl.MyCorp.InteropSelectionControl
        Me.InteropIsothermControl2 = New InteropIsothermControl.MyCorp.InteropIsothermControl
        Me.InteropFurnaceSelector1 = New InteropIsothermControl.MyCorp.InteropFurnaceSelector
        Me.InteropSelectionControl1 = New InteropIsothermControl.MyCorp.InteropSelectionControl
        Me.InteropIsothermControl1 = New InteropIsothermControl.MyCorp.InteropIsothermControl
        Me.SuspendLayout()
        '
        'InteropSelectionControl2
        '
        Me.InteropSelectionControl2.BackColor = System.Drawing.SystemColors.Control
        Me.InteropSelectionControl2.BackgroundColor = -2147483633
        Me.InteropSelectionControl2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InteropSelectionControl2.ForegroundColor = -2147483630
        Me.InteropSelectionControl2.FurnaceSelectionMethod = InteropIsothermControl.MyCorp.UpdateMethod.Fixed
        Me.InteropSelectionControl2.Location = New System.Drawing.Point(282, 221)
        Me.InteropSelectionControl2.Name = "InteropSelectionControl2"
        Me.InteropSelectionControl2.SelectedFurnace = 1
        Me.InteropSelectionControl2.Size = New System.Drawing.Size(150, 150)
        Me.InteropSelectionControl2.TabIndex = 4
        '
        'InteropIsothermControl2
        '
        Me.InteropIsothermControl2.BackColor = System.Drawing.Color.DimGray
        Me.InteropIsothermControl2.BackgroundColor = 6908265
        Me.InteropIsothermControl2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InteropIsothermControl2.ForegroundColor = -2147483630
        Me.InteropIsothermControl2.FurnaceSelectionUpdateMethod = InteropIsothermControl.MyCorp.UpdateMethod.Fixed
        Me.InteropIsothermControl2.Location = New System.Drawing.Point(12, 221)
        Me.InteropIsothermControl2.Name = "InteropIsothermControl2"
        Me.InteropIsothermControl2.PieceSelectionUpdateMethod = InteropIsothermControl.MyCorp.UpdateMethod.Selected
        Me.InteropIsothermControl2.SelectedFurnace = 1
        Me.InteropIsothermControl2.SelectedPiece = "Piece4"
        Me.InteropIsothermControl2.Size = New System.Drawing.Size(150, 150)
        Me.InteropIsothermControl2.TabIndex = 3
        '
        'InteropFurnaceSelector1
        '
        Me.InteropFurnaceSelector1.BackColor = System.Drawing.SystemColors.Control
        Me.InteropFurnaceSelector1.BackgroundColor = -2147483633
        Me.InteropFurnaceSelector1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InteropFurnaceSelector1.ForegroundColor = -2147483630
        Me.InteropFurnaceSelector1.Location = New System.Drawing.Point(168, 40)
        Me.InteropFurnaceSelector1.Name = "InteropFurnaceSelector1"
        Me.InteropFurnaceSelector1.Size = New System.Drawing.Size(108, 68)
        Me.InteropFurnaceSelector1.TabIndex = 2
        '
        'InteropSelectionControl1
        '
        Me.InteropSelectionControl1.BackColor = System.Drawing.SystemColors.Control
        Me.InteropSelectionControl1.BackgroundColor = -2147483633
        Me.InteropSelectionControl1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InteropSelectionControl1.ForegroundColor = -2147483630
        Me.InteropSelectionControl1.FurnaceSelectionMethod = InteropIsothermControl.MyCorp.UpdateMethod.Selected
        Me.InteropSelectionControl1.Location = New System.Drawing.Point(282, 12)
        Me.InteropSelectionControl1.Name = "InteropSelectionControl1"
        Me.InteropSelectionControl1.SelectedFurnace = 0
        Me.InteropSelectionControl1.Size = New System.Drawing.Size(150, 150)
        Me.InteropSelectionControl1.TabIndex = 1
        '
        'InteropIsothermControl1
        '
        Me.InteropIsothermControl1.BackColor = System.Drawing.Color.White
        Me.InteropIsothermControl1.BackgroundColor = 16777215
        Me.InteropIsothermControl1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.InteropIsothermControl1.ForegroundColor = -2147483630
        Me.InteropIsothermControl1.FurnaceSelectionUpdateMethod = InteropIsothermControl.MyCorp.UpdateMethod.Selected
        Me.InteropIsothermControl1.Location = New System.Drawing.Point(12, 12)
        Me.InteropIsothermControl1.Name = "InteropIsothermControl1"
        Me.InteropIsothermControl1.PieceSelectionUpdateMethod = InteropIsothermControl.MyCorp.UpdateMethod.Selected
        Me.InteropIsothermControl1.SelectedFurnace = 0
        Me.InteropIsothermControl1.SelectedPiece = "Piece1"
        Me.InteropIsothermControl1.Size = New System.Drawing.Size(150, 150)
        Me.InteropIsothermControl1.TabIndex = 0
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(447, 463)
        Me.Controls.Add(Me.InteropSelectionControl2)
        Me.Controls.Add(Me.InteropIsothermControl2)
        Me.Controls.Add(Me.InteropFurnaceSelector1)
        Me.Controls.Add(Me.InteropSelectionControl1)
        Me.Controls.Add(Me.InteropIsothermControl1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents InteropIsothermControl1 As InteropIsothermControl.MyCorp.InteropIsothermControl
    Friend WithEvents InteropSelectionControl1 As InteropIsothermControl.MyCorp.InteropSelectionControl
    Friend WithEvents InteropFurnaceSelector1 As InteropIsothermControl.MyCorp.InteropFurnaceSelector
    Friend WithEvents InteropIsothermControl2 As InteropIsothermControl.MyCorp.InteropIsothermControl
    Friend WithEvents InteropSelectionControl2 As InteropIsothermControl.MyCorp.InteropSelectionControl
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) TenovaCore
United States United States
Rod currently works in The Burgh using .Net technologies to create Human-Machine Interfaces for steel-making furnaces. He has 7 years in the steel industry, and 12 years of experience working in the nuclear industry at Savannah River Site in Aiken, SC. He enjoys riding his Honda Goldwing through the winding Pennsylvania farmlands, and taking his Jeep offroad.

Comments and Discussions