Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Post a winform to a specific position
Message
From
26/02/2014 02:43:38
 
 
To
25/02/2014 18:35:47
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB 9.0
OS:
Windows 8
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01595313
Message ID:
01595324
Views:
45
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform