none
VB.NET GUI Script RRS feed

  • Question

  • Hello all, I have a window form with a button created in Visual Studio. How do I import it out to be used as a vb.net script with the interface?Thanks~
    Wednesday, May 18, 2011 2:17 AM

All replies

  • Is it a custom control(Button) that you have made?

    You can import it from toolbox, and if its not there in toolbox, then right click and select choose item and add the dll for that control.

     


    Amit Govil(amit.govil@hotmail.com)
    Wednesday, May 18, 2011 3:13 AM
  • Actually I am writting a vb.net script for Manifold however I am unable to load the form properly. It only loads a blank form without the controls on it. Could someone give me some guidance on my code. Thanks~

     

     

    Imports Manifold.Interop.Scripts
    Imports Microsoft.VisualBasic
    Imports System.Windows.Forms

    Class Script
          Inherits System.Windows.Forms.Form


     
        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.Button1 = New System.Windows.Forms.Button
            Me.CheckedListBox1 = New System.Windows.Forms.CheckedListBox
            Me.SuspendLayout()
            '
            'Button1
            '
            Me.Button1.Location = New System.Drawing.Point(130, 112)
            Me.Button1.Name = "Button1"
            Me.Button1.Size = New System.Drawing.Size(75, 23)
            Me.Button1.TabIndex = 3
            Me.Button1.Text = "Run"
            Me.Button1.UseVisualStyleBackColor = True
            '
            'CheckedListBox1
            '
            Me.CheckedListBox1.FormattingEnabled = True
            Me.CheckedListBox1.Items.AddRange(New Object() {"1", "2", "3", "4"})
            Me.CheckedListBox1.Location = New System.Drawing.Point(12, 12)
            Me.CheckedListBox1.Name = "CheckedListBox1"
            Me.CheckedListBox1.Size = New System.Drawing.Size(342, 94)
            Me.CheckedListBox1.TabIndex = 2
            '
            'Form
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(367, 139)
            Me.Controls.Add(Me.Button1)
            Me.Controls.Add(Me.CheckedListBox1)
            Me.Name = "Form"
            Me.Text = "Script Selection"
            Me.ResumeLayout(False)

        End Sub
        Friend WithEvents Button1 As System.Windows.Forms.Button
        Friend WithEvents CheckedListBox1 As System.Windows.Forms.CheckedListBox

        Public Sub Main
            'MyBase.New()
            InitializeComponent()
            Application.Run(New Form)
         End Sub


    End Class

    Wednesday, May 18, 2011 6:34 AM