R8VI
asked on
c# windows app open another form on load
Hi,
I am building a windows app in which I need to do this.
1) when the user clicks the icon to lauch the app I want it to load the form but also load another form "window" that displays certain information from the DB. Its like automatic reminders.
Question is how do i get another form to launch when openeing the main form.
Please help
Thanks,
R8VI
I am building a windows app in which I need to do this.
1) when the user clicks the icon to lauch the app I want it to load the form but also load another form "window" that displays certain information from the DB. Its like automatic reminders.
Question is how do i get another form to launch when openeing the main form.
Please help
Thanks,
R8VI
If you want to make sure your new form to stay on top of the other form, you might want to use .ShowDialog()
The code is almost the same as mentioned above:
FormReminders frmReminders = new FormReminders();
frmReminders.ShowDialog();
The code is almost the same as mentioned above:
FormReminders frmReminders = new FormReminders();
frmReminders.ShowDialog();
My bad, I intended to use preview...
An example of a basic class:
An example of a basic class:
public partial class frmMainForm : Form {
public frmIudexnet() {
InitializeComponent();
//You call your second form here (asuming you already created you form with the IDE)
FormName frm = new FormName();
frm.ShowDialog();
}
ASKER
Hi,
Sorry I should have been a bit more specfic, I want the second form (reminders) to load and be displayed top left for example but first form to be displayed in the middle on the screen and focus on the first form
Thanks for the help so far
Thanks,
R8VI
Sorry I should have been a bit more specfic, I want the second form (reminders) to load and be displayed top left for example but first form to be displayed in the middle on the screen and focus on the first form
Thanks for the help so far
Thanks,
R8VI
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window