如何链接不同的表单?

发布于 2024-07-17 19:02:20 字数 173 浏览 5 评论 0原文

我在第一个问题中得到了很大的帮助,希望有人能告诉我或让我参考有关该主题的早期问题。

我想链接不同的表单,就像我单击第一个表单上的按钮,它会打开第二个表单。基本上,我将为手机功能(如短信、通话等)制作一个菜单,所以我想要如果我单击“呼叫”,则会打开一个新表格,询问要拨打的号码等。

I got great help in my first question n hopefully someone will tell me or refer me to an earlier question about this topic.

I want to link different forms like I click on a button on first one and it opens the second one.Basically I'm going to make a Menu for cellphone functions like SMS,CALL etc. so I want that If I click on call a new form opens asking for Number to call etc.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

墨落成白 2024-07-24 19:02:20
void SomeInitializationFunction() {
      button.Click += new System.EventHandler(buttonClick);
}

private void buttonClick(object sender, System.EventArgs e)
{
    using(GetNumberForm getNumberForm = new GetNumberForm())
    {
        if(DialogResult.OK == getNumberForm.ShowDialog())
        {
            string phoneNumber = getNumberForm.PhoneNumber;
            // do something with the user input.
        }
    }
}
void SomeInitializationFunction() {
      button.Click += new System.EventHandler(buttonClick);
}

private void buttonClick(object sender, System.EventArgs e)
{
    using(GetNumberForm getNumberForm = new GetNumberForm())
    {
        if(DialogResult.OK == getNumberForm.ShowDialog())
        {
            string phoneNumber = getNumberForm.PhoneNumber;
            // do something with the user input.
        }
    }
}
骑趴 2024-07-24 19:02:20
var otherForm = new Form2();
otherForm.ShowDialog(); // To show a modal dialog, or...
otherForm.Show();  // To show it as a non-modal window
var otherForm = new Form2();
otherForm.ShowDialog(); // To show a modal dialog, or...
otherForm.Show();  // To show it as a non-modal window
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文