473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

A popup form for windows forms app

Hello guys,

I am developing a Windows Forms application in C#, I am using PostgreSQL as the Database. The application is bassically using the database to store and lookup information, nothing so fancy about this. The lookup pages are designed to lookup data, and I would like to add a small popup like dialogue which gets invoked if the stated data does not exist in the database. Now I will take care of the event to be invoked, but the only issue I am having is getting a popup window.

I would like to allow users to add the data if it does not exists in the database, for this I would like a popup to appear in front of them and it should behave similar to a messagebox. Now about the similarities, the only similarity I aould like to have is not allow the user to click on any controls of the form while this popup is open such as when a MessageBox is open you are not able to use the app unless you close the MessageBox with any of the button. I would like to achieve similar abilities for the popup form and once the form is closed, the focus goes back to the app.

Is this possible to achieve, to be honest my mind tells me that it should be pretty straight forward. However because of my lack of experience with .Net and C# I have not idea about this.

Thanks in advanced.
Oct 23 '08 #1
2 8258
MrMancunian
569 Expert 512MB
Create a new form and call it using

Expand|Select|Wrap|Line Numbers
  1. Form.ShowDialog()
The ShowDialog part makes sure that it stays on top and disables the user to click on any control, untill it gets closed.

Steven
Oct 23 '08 #2
Nice this works great thanks!
Oct 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Nathan Bloomfield | last post by:
Hi All, I am hoping someone out there will be kind enough to find out where my code is going wrong. The current code is inefficiant but hopefully it will convey the data I require to be...
0
by: RookieCard | last post by:
I've been stuck on this for 2 days. Here's the deal. I am working (3 levels down/deep)in a subform within a tab object that is within another tab obeject. Everything works great! Except here: 1)...
9
by: Chuck Bowling | last post by:
I have an ASP.NET page with code behind that i'm trying to get to launch a modeless windows form on the IIS server. I tried creating a windows form in the web application project and adding a...
18
by: Colin McGuire | last post by:
Hi - this was posted last weekend and unfortunately not resolved. The solutions that were posted almost worked but after another 5 days of working on the code everynight, I am not further ahead....
7
by: Justin Hoffman | last post by:
I am new to vb.net programming and am just exploring the way databinding works with Windows forms and am having trouble with some fairly basic customization of data entry. The form uses the...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
1
by: Rykie | last post by:
I am primarily a web developer, but have to develop this windows app. It works a treat, but it has some places where it lags and some long running processes, which I want to provide user feedback...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
9
by: rousseaud | last post by:
I'm having some trouble getting popup forms to work properly. I have a main form that contains 4 fields that I want to fill in by using a series of 4 popup forms that I initiate by clicking a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.