Click here to Skip to main content
15,885,032 members
Articles / Desktop Programming / Windows Forms

Interop Forms Toolkit 2.0 Tutorial

Rate me:
Please Sign up or sign in to vote.
4.84/5 (62 votes)
16 Jun 2007CPOL16 min read 484.4K   13.8K   149  
Interop Forms Toolkit 2.0 is a new bridging tool allowing developers to use .NET Forms and .NET UserControls in VB6. This tutorial demonstrates how to add webservices, multithreading, and XAML to VB6 projects. It also provides custom C# Interop UserControl templates for use with the Toolkit.
Option Strict On
Imports System.Windows.Forms
Imports System.ComponentModel

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class DilbertService
    Inherits System.Windows.Forms.UserControl

    'InteropUserControl overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    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.DilbertPictureBox = New System.Windows.Forms.PictureBox
        Me.RetrieveButton = New System.Windows.Forms.Button
        CType(Me.DilbertPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'DilbertPictureBox
        '
        Me.DilbertPictureBox.Location = New System.Drawing.Point(0, 0)
        Me.DilbertPictureBox.Name = "DilbertPictureBox"
        Me.DilbertPictureBox.Size = New System.Drawing.Size(650, 215)
        Me.DilbertPictureBox.TabIndex = 0
        Me.DilbertPictureBox.TabStop = False
        '
        'RetrieveButton
        '
        Me.RetrieveButton.Location = New System.Drawing.Point(4, 222)
        Me.RetrieveButton.Name = "RetrieveButton"
        Me.RetrieveButton.Size = New System.Drawing.Size(109, 23)
        Me.RetrieveButton.TabIndex = 1
        Me.RetrieveButton.Text = "Retrieve Cartoon"
        Me.RetrieveButton.UseVisualStyleBackColor = True
        '
        'DilbertService
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.Controls.Add(Me.RetrieveButton)
        Me.Controls.Add(Me.DilbertPictureBox)
        Me.Name = "DilbertService"
        Me.Size = New System.Drawing.Size(657, 254)
        CType(Me.DilbertPictureBox, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents DilbertPictureBox As System.Windows.Forms.PictureBox
    Friend WithEvents RetrieveButton As System.Windows.Forms.Button

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)
United States United States
James is a program writer for a respectable software company. He is also a Microsoft MVP.

Comments and Discussions