
29/07/2005, 10:00
|
| | Fecha de Ingreso: julio-2005
Mensajes: 3
Antigüedad: 19 años, 7 meses Puntos: 0 | |
hola:
para que entiendas mi problema te mando el codigo que es muy cortito
por una parte tengo un modulo que contiene esto:
Module micodigo
Sub Main()
MessageBox.Show("esto queda muy bonito")
Dim nombre As String
Dim mensaje As String
Dim titulo As String
Dim respuesta As String
mensaje = "Escribe lo que quieras"
titulo = "PRUEBA"
nombre = InputBox(mensaje, titulo, respuesta)
MessageBox.Show(nombre)
End Sub
End Module
y luego tengo un form que tiene esto otro:
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New()
MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada.
InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Requerido por el Diseñador de Windows Forms
Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento
'Puede modificarse utilizando el Diseñador de Windows Forms.
'No lo modifique con el editor de código.
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents VScrollBar1 As System.Windows.Forms.VScrollBar
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.VScrollBar1 = New System.Windows.Forms.VScrollBar()
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(16, 88)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(248, 128)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "TextBox1"
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(136, 16)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(136, 20)
Me.TextBox2.TabIndex = 1
Me.TextBox2.Text = "TextBox2"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(24, 240)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 2
Me.Button1.Text = "Button1"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(192, 240)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 3
Me.Button2.Text = "Button2"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(0, 16)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 4
Me.Label1.Text = "Label1"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(0, 64)
Me.Label2.Name = "Label2"
Me.Label2.TabIndex = 5
Me.Label2.Text = "Label2"
'
'VScrollBar1
'
Me.VScrollBar1.Location = New System.Drawing.Point(248, 88)
Me.VScrollBar1.Name = "VScrollBar1"
Me.VScrollBar1.Size = New System.Drawing.Size(16, 128)
Me.VScrollBar1.TabIndex = 6
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.VScrollBar1, Me.Label2, Me.Label1, Me.Button2, Me.Button1, Me.TextBox2, Me.TextBox1})
Me.Name = "Form2"
Me.Text = "Form2"
Me.TopMost = True
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Me.Close()
End Sub
End Class
que es el tipico formulario con un par de botones, un par de label y dos cuadros de texto, lo que quiero es que primero se me ejecute el codigo del modulo y luego el codigo del formulario y no se como hacerlo.
muchas gracias |