473,395 Members | 1,936 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,395 software developers and data experts.

Modal forms and notification box

Hi,
I've a problem.
Our app has a main screen, a user logs in to the system using a smart card.
After login, several loops through a switch statement are performed to check
for certain conditions. One or more screens may be shown modally in
succession, finally ending in the user's work centre.The user is usually
encouraged to pull their card before reaching the work centre as this is
primarily a terminal (no keyboard/mouse) for logging in at reception.
I've been asked to add a notification to show the user that they have new
mail (one of the modules in the application) that they can see in the stages
prior to them hitting their work centre.
I thought of creating a small Topmost = true, non modal form that sits in
one of the corners of the screen. This works fine for displaying an alert,
but now the customer wants it clickable so that the user can skip screens
straight to their inbox.
The thought of trying to convert the main modal forms into non modal (yet
make them behave modally) is giving me nightmares, I can imagine the code
will become really messy and become unreliable.
Has anyone else come up against this? how did u overcome it?
I did think that my app could maybe run a small 2nd application just for
this screen, but I dont know if there'd be any security issues of one app
starting another with the OS. I've also not tried doing this so Im not sure
how easy it is to monitor and receive results from another app.

many thanks
Claire
Feb 13 '08 #1
1 2287
Not sure how good an idea this is, but perhaps show the second form on a
separate thread? You'd need to think about how they talk to eachother (and
sync), but it seems to work...

Like I say, this might be madness... you'd need to test it...

Marc

static void Main()
{
Application.EnableVisualStyles();
using (Form mainForm = new Form())
using (Button btn = new Button())
{
mainForm.Controls.Add(btn);
btn.Text = "Pretend they're now logged in";
btn.Click += delegate
{
btn.Enabled = false; // only once ;-p
StartWhatever();
};
Application.Run(mainForm);
}
}
static void StartWhatever()
{
Thread thd = new Thread(ShowEmail);
thd.Name = "Email";
thd.IsBackground = true;
thd.Start();
}
static void ShowEmail()
{
using (Form f = new Form())
{
Application.Run(f);
}
}
Feb 13 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
4
by: Greg Smith | last post by:
I have a user who likes to keep my application minimized. He wants to have a pop up of some sort come up to tell him he needs to return to the application to take action. I have used both...
3
by: =?Utf-8?B?aWxy?= | last post by:
Hi All I am developing an vb 2005 winforms application that connects to a database and displays a datagridview of the data. A user can select and then edit, or create a new entry by opening a...
2
by: Mike | last post by:
Hi, I'm having a problem with modal forms on windows. I've written a very short test program, with a main window and a form called from the main window. The form is set to modal with...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
1
by: Mohit | last post by:
Hi all, I am working on a windows based client server application with multiple forms. All forms are having custom title bars with no default bars. There is one main form. Some forms are opened up...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.