473,325 Members | 2,785 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,325 software developers and data experts.

URGENTCusom dialog boxes

Dear All,
I am writing an app that does some syncronization with a mobile device. I
use the
System.Threading.Thread.Sleep(15000);
to sleep the main app thread for 15 sec till the sync is finished.
I want to show a form "Please Wait... while syncronizing" and when it's done
i close that form.
how can this be done?
i tried the following:
private void Sync_Connection()
{
SyncWindow wSync = new SyncWindow("Please Wait...");
wSync.Show();
abc();
this.cmnuConnect.Enabled = false;
this.cmnuDisconnect.Enabled = true;
this.SyncFiles(); //i sleep here
wSync.Close();
}

but this doesn't always show on top of the main form and if the main form is
clicked it gets focus. I tired wSync.ShowDialog() but it carries the
control to the wSync form and waits till the wSync form is closed.

Thanks a lot for your help really appreciated

Mustafa Rabie
Mar 23 '06 #1
2 1004
oh using VS 2003 if makes a difference
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
Dear All,
I am writing an app that does some syncronization with a mobile device. I
use the
System.Threading.Thread.Sleep(15000);
to sleep the main app thread for 15 sec till the sync is finished.
I want to show a form "Please Wait... while syncronizing" and when it's
done i close that form.
how can this be done?
i tried the following:
private void Sync_Connection()
{
SyncWindow wSync = new SyncWindow("Please Wait...");
wSync.Show();
abc();
this.cmnuConnect.Enabled = false;
this.cmnuDisconnect.Enabled = true;
this.SyncFiles(); //i sleep here
wSync.Close();
}

but this doesn't always show on top of the main form and if the main form
is clicked it gets focus. I tired wSync.ShowDialog() but it carries the
control to the wSync form and waits till the wSync form is closed.

Thanks a lot for your help really appreciated

Mustafa Rabie

Mar 23 '06 #2
Mustafa,

In the properties of the form can you not just set the TopMost Property to
true?

Regards
Scott Blood
C# Developer

"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:eN**************@TK2MSFTNGP10.phx.gbl...
oh using VS 2003 if makes a difference
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:uy**************@TK2MSFTNGP10.phx.gbl...
Dear All,
I am writing an app that does some syncronization with a mobile device.
I use the
System.Threading.Thread.Sleep(15000);
to sleep the main app thread for 15 sec till the sync is finished.
I want to show a form "Please Wait... while syncronizing" and when it's
done i close that form.
how can this be done?
i tried the following:
private void Sync_Connection()
{
SyncWindow wSync = new SyncWindow("Please Wait...");
wSync.Show();
abc();
this.cmnuConnect.Enabled = false;
this.cmnuDisconnect.Enabled = true;
this.SyncFiles(); //i sleep here
wSync.Close();
}

but this doesn't always show on top of the main form and if the main form
is clicked it gets focus. I tired wSync.ShowDialog() but it carries the
control to the wSync form and waits till the wSync form is closed.

Thanks a lot for your help really appreciated

Mustafa Rabie


Mar 23 '06 #3

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

Similar topics

1
by: Laxmikant Rashinkar | last post by:
Hello, from inside a button handler, I am launching a dialog box that contains lables and text boxes. The dialog box is launched using dlg.Show(). In this situation the contents of the text...
23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
0
by: Dune | last post by:
Hi there, I have an aspx page that allows users to enter several parameters using drop downs and text boxes. The users then press a button that produces an extract based on the parameters they...
6
by: Fred | last post by:
I have implemented a dialog box (an aspx page) using showModalDialog. Because the dialog needs to process postbacks, I have implemented it in a frameset. In the top of the framset page, I have...
3
by: Tom McLaughlin | last post by:
I am having problems locating the "Find and Replace Dialog Boxes". My toolbox shows other Dialog Boxes. The Customize Toolbox dialog box displays a list of all .NET Framework components available...
2
by: Marco | last post by:
I have no idea what happened but for some odd reason the text in my dialog boxes isn't showing up. It's not just the message but also the text on the buttons. This only happens when the visual...
1
by: pw | last post by:
Hi, I have a form (with an ActiveX control on it - don't know if that is the problem) and I can not see the dialog/message boxes. There is an error with my form and I can not see what it is...
1
by: InfoDevGuy | last post by:
Hi: We are a software company. Our product (Dialogue) is very expansive with lots of menus, dialog boxes, etc in the GUI. We use unstructured FM 7.2. Every time we have a new release,...
2
by: one.1more | last post by:
I want to make a text game using javascript dialog boxes. i learned about confirm boxes but its not helpful(http:// www.javascriptmall.com/learn/lesson6.htm) 1. for ex, in the confirm boxes,...
1
by: =?Utf-8?B?QmVuIEM=?= | last post by:
I'm getting dialog boxes from a variety of applications appear very distorted. They are often extremely large covering all the screen whilst the main application appears normally. eg. This happens...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.