Search Results

Search found 1 results on 1 pages for 'shukhrat raimov'.

Page 1/1 | 1 

  • Multiple Windows Forms on one application

    - by Shukhrat Raimov
    I have two windows forms, first is initial and second is invoked when button on the first is pressed. It's two different windows, with different tasks. I programmed for both MVP pattern. But in the Main() I have this: static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ViewFirst viewFirst = new ViewFirst();//First Form PresenterFirst presenterFirst = new PresenterFirst(viewFirst); Application.Run(viewFirst); } And I Have Second Windows Form: ViewSecond viewSecond = new ViewSecond();//Second Form PresenterSecond presenterSecond = new PresenterSecond(viewSecond); I want to run it in this app as soon as the button on the first is clicked. How could I do this? My button on the first WF is: private void history_button_Click(object sender, EventArgs e) { ViewSecond db = new ViewSecond();//second Form where I have sepparate WF. db.Show(); }

    Read the article

1