473,785 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2299
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.Ena bleVisualStyles ();
using (Form mainForm = new Form())
using (Button btn = new Button())
{
mainForm.Contro ls.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(ShowEmai l);
thd.Name = "Email";
thd.IsBackgroun d = 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
2561
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 bring up a modal dialog (MessageBox)
8
2738
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 thread to access the database and then displays a modal dialog which allows the user to cancel the task, if it is taking longer than they want, and shows them a display of how long the query has been running so far.
4
2759
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 message boxes and forms as pop ups but if the application is minimized it only comes up on the task bar. He wants to have system modal warning that will pop up and over ride all other applications open. Any help is greatly appreciated.
3
2448
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 modal form and editing the record. I would like the user to be able to hide either the parent form or the parent and modal form if they are currently editing in the modal form and unhide the parent or both forms from the notification icon. I seem...
2
2646
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 form.setModal(1) before calling form.show(). All works as expected on Linux. The form is modal, not allowing the main window to received the focus. If I call the form from within itself, the topmost form is modal, and not of the previous forms will...
2
4502
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 boxes (please see associated source code below): 1) Win32 API with context ("btnWin32WithContext_Click") 2) .NET Framework with context ("btnFrameworkWithContext_Click") 3) Win32 API withOUT context ("btnWin32WithOUTContext_Click")
2
3520
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 =ShowMainMenu("item") in the On Action event where ShowMainMenu is a public function in frmMain, and "item" is a string mapping to a button click event. (error trapping omitted) Public Function ShowMainMenu(strItem As String) As Boolean
4
4561
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 an option. I also need to check the values in a spread control on the forms before I close/dispose them. I'm using VB 2005. Is there some way for me to do this?
1
3564
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 as modal while others are opened up as modeless on this main form. Whenever some error occurs in client server communication we show it in modal message box. Now I ran into a case: a modal form is opened up on the main form. And some error...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10341
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.