Antes que nada me presento son Virginia y soy de Argentina, hace un par de
dias me instale el Visual Studio Net Enterprise Architect, hasta ahi todo
bien.
Mi consulta de principiante es la siguiente...(antes busque en google todo
tipo de ayuda hasta que dije voy al grupo y me explicaran mejor)
tengo 2 formularios
primer formulario
Prog1 (con una imagen y un boton que dice pulsar)
en el codigo del boton pulsar tengo lo siguiente
Option Explicit On
Public Class Prog1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
'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.
Friend WithEvents BTN As System.Windows.Forms.Button
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(Prog1))
Me.BTN = New System.Windows.Forms.Button()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.SuspendLayout()
'
'BTN
'
Me.BTN.BackColor = System.Drawing.Color.DarkCyan
Me.BTN.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.BTN.ForeColor = System.Drawing.SystemColors.ControlLightLight
Me.BTN.Location = New System.Drawing.Point(168, 192)
Me.BTN.Name = "BTN"
Me.BTN.Size = New System.Drawing.Size(112, 24)
Me.BTN.TabIndex = 1
Me.BTN.Text = "PULSAR"
'
'PictureBox1
'
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"),
System.Drawing.Bitmap)
Me.PictureBox1.Location = New System.Drawing.Point(16, 48)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(432, 112)
Me.PictureBox1.TabIndex = 2
Me.PictureBox1.TabStop = False
'
'Prog1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.SlateGray
Me.ClientSize = New System.Drawing.Size(456, 253)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.PictureBox1,
Me.BTN})
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "Prog1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Programa de Prueba"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub BTN_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTN.Click
Dim uno As Prog1
uno = New Prog1()
uno.Activate()
uno.Close()
Dim frm As panta2
frm = New panta2()
'frm.ShowDialog(Me)
frm.Show()
segundo formulario
Panta2 (con una imagen y un boton que dice cerrar)
en el codigo del boton cerrar tengo la sintaxis end para salir del programa
mi pregunta es la siguiente, yo lo que quiero es que al clickear el boton
pulsar del primer form aparezca el segundo formulario pero que desaparezca
el primero... porque no se va... queda abajo... no logro darme cuenta yo
en VB6 lo hacia perfectamente, pero no logro encontrar en donde haya un
ejemplo para VBNET.
Pido disculpas si mi pregunta es muy obvia, pero es mi primer programa en
VBNET y no logro hacerlo bien, si no es este grupo para mi consulta por
favor diganme adonde me tengo que dirigir porque me estoy volviendo loca...
Gracias
Lic Maria Virginia Dell'Arciprete
Bs As - Argentina
www.archisoft.com.ar
Leer las respuestas