Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Post a winform to a specific position
Message
De
26/02/2014 02:43:38
 
 
À
25/02/2014 18:35:47
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01595313
Message ID:
01595324
Vues:
46
>Greetings,
>I'm developing my first vb.net app, so I have a form which is the main of the application, it contains a few buttons on the right side and run it automaximiza for the user to work on the entire screen, I've become container, because I want all forms of application to run within the same form.
>
>But when I run a form that is located behind the (menu of the application), and buttons need to be displayed when the right side of the buttons to a height and width especific this behavior is the same for each type of display.
>
>Could you tell me or guide me on how to do this?
>
>My idea is that everything happens for the user in the same place.
>
>I hope I explained correctamentamente, many thanks ...
>
>TIA

One approach:
Use a Panel to contain your 'sub forms'. Create the content for each 'form' as a UserControl rather than a form. Then you can switch using something like:
Private Sub button1_Click(sender As Object, e As EventArgs)
	Dim f = New ClassLibrary1.UserControl1()
	panel1.Controls.Clear()
	panel1.Controls.Add(f)
End Sub

Private Sub button2_Click(sender As Object, e As EventArgs)
	Dim f = New ClassLibrary1.UserControl2()
	panel1.Controls.Clear()
	panel1.Controls.Add(f)
End Sub
You could also structure so that *all* UserControls are added to the Panel and the buttons just control which is currently visible. Tip: Put your UserControls in a separate project.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform