如何使用c#中的窗口应用程序弹出窗口 [英] how to use pop up in window application in c#
问题描述
我在c#中进行窗口应用。我想在点击一个按钮时显示一个弹出窗口。在这个弹出窗口我输入一些东西并保存到数据库。我在消息框中尝试输入和保存。但我没有。我使用面板和另一种形式它完美但我想当弹出打开然后我不修改任何东西,直到弹出窗口关闭。但是面板和新的其他形式显示像弹出窗口,但我修改任何其他页面。所以请给出解决方案。
i require,在windows窗体中弹出按钮时单击按钮。之后我在文本框中输入内容并保存弹出窗口中的按钮。如何以窗口形式打开弹出窗口。 .not留言框
提前感谢
i doing window application in c#. i want to show a popup when a button is click.in this pop up i input something and save to the database.i tried in message box for input and save. but i didn't.i use panel and another form it perfectly but i want when popup is open then i am not modify anything until the popup is close. but incase of panel and new other form is show like popup but i modify any other page. so kindly give solution.
i require ,in windows form a popup is show when button is clicked.after that i input something in textbox and save button which is present in pop up .so how to open a pop up in window form. .not message box
thanks in advance
推荐答案
@会员11849346
你想要的是带有TextBox和保存按钮的弹出窗口
你可以按照以下步骤完成:
1.创建一个新表格假设frmPopUp.cs
2.放置TextBoxe(s),Button( s)
3.现在,假设您希望它从FOrmfrmMain.cs打开然后将此代码写入frmMain.cs
@ Member 11849346
What you want is "A popup with TextBox and Save button"
You can do it by just following these steps:
1. Create A New Form suppose frmPopUp.cs
2. Place TextBoxe(s), Button(s)
3. Now, Suppose that You want it to Open From the FOrm "frmMain.cs" then Write this Code in "frmMain.cs"
frmPopUp popupForm = new frmPopup();
popupForm.ShowDialog();
这将打开frmPopup并且在你关闭它之前不允许你与frmMaint交互...
试一试!!!
This Will Open frmPopup and would not allow you to interact with frmMaint until you close it...
Have a try!!!
您的具体要求是什么?
这篇关于如何使用c#中的窗口应用程序弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!