Adding new user control programmatically in windows forms

后端 未结 3 1550
礼貌的吻别
礼貌的吻别 2021-01-21 00:37

Hey so first off i would like to point out that I know that there are several other questions about this topic up here, I have even done this exact thing myself before. I am ask

3条回答
  •  有刺的猬
    2021-01-21 01:15

    You need to add your user control to the display surface of the main form (or another container already present)

        MainScreen home = new MainScreen();
        home.Show();
        EntrySuggestion t_ES = new EntrySuggestion();
        home.Controls.Add(t_ES);
    

提交回复
热议问题