473,549 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make app responsive to windows but not to user during long process?


I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam
Nov 21 '05 #1
13 1483
Samual,

In an earlier situation about such a question as yours I once have given the
idea to set a panel (that holds all controls) on a form and too set that
panel to enable is false.

Is that maybe somehing you are looking for as well. The close and minimize
box is than still working so the user can minimize resize and move that
form.

I hope this helps

Cor

"Samuel R. Neff" <bl****@newsgro up.nospam>
..

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam

Nov 21 '05 #2

Thanks, but that still affects the visual display of the controls and
i want to avoid that (the wait cursor indicates that they can't click,
don't need disabled appearance as well).

Sam
On Fri, 7 Jan 2005 17:01:24 +0100, "Cor Ligthert"
<no************ @planet.nl> wrote:
Samual,

In an earlier situation about such a question as yours I once have given the
idea to set a panel (that holds all controls) on a form and too set that
panel to enable is false.

Is that maybe somehing you are looking for as well. The close and minimize
box is than still working so the user can minimize resize and move that
form.

I hope this helps

Cor

"Samuel R. Neff" <bl****@newsgro up.nospam>
.

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam


Nov 21 '05 #3
Samuel,

In that case they are still there, however a little bit shadowed, I think
this is extra good with a wait cursor.

However just my idea.

Cor
Nov 21 '05 #4
Can't you display a type of "Wait" form then is modal and closes itself when
the waiting period has ended?

"Samuel R. Neff" wrote:

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam

Nov 21 '05 #5
"Samuel R. Neff" <bl****@newsgro up.nospam> schrieb:
I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?


\\\
Private m_Busy As Boolean

Protected Property Busy() As Boolean
Get
Return m_Busy
End Get
Set(ByVal Value As Boolean)
m_Busy = Value
End Set
End Property
///

Inside the event handlers, check if the form is busy:

\\\
If Not Me.Busy Then
...
End If
///

Before starting the process, set 'Busy' to 'True' and set it back after the
process has been finished. For some controls, additional logic may be
added, for example, setting 'AutoCheck' to 'False' for checkboxes etc.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
Dennis schreef:
Can't you display a type of "Wait" form then is modal and closes itself when
the waiting period has ended?

"Samuel R. Neff" wrote:

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam

Can't you make all appropriate controls disabled? I think that makes it
clear to the user as well that no interaction is possible. You can leav
a cancel button enabled, if needed.
Nov 21 '05 #7
Can't you display a type of "Wait" form then is modal and closes itself when
the waiting period has ended?

"Samuel R. Neff" wrote:

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam

Nov 21 '05 #8
"Samuel R. Neff" <bl****@newsgro up.nospam> schrieb:
I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?


\\\
Private m_Busy As Boolean

Protected Property Busy() As Boolean
Get
Return m_Busy
End Get
Set(ByVal Value As Boolean)
m_Busy = Value
End Set
End Property
///

Inside the event handlers, check if the form is busy:

\\\
If Not Me.Busy Then
...
End If
///

Before starting the process, set 'Busy' to 'True' and set it back after the
process has been finished. For some controls, additional logic may be
added, for example, setting 'AutoCheck' to 'False' for checkboxes etc.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9
Dennis schreef:
Can't you display a type of "Wait" form then is modal and closes itself when
the waiting period has ended?

"Samuel R. Neff" wrote:

I want to make my app repaint and show a wait cursor during a long
running process but not actually respond to user events. What's the
best way to implement this?

If I just put the process on another thread, the user can continue to
interact with the form. For my own code, I can have a flag in all
event handlers, but what about interaction within a control (i.e.,
expand/collapse tree nodes in treeview). If I change the Enabled
property, that affects the visual appearance of the controls, which I
don't want to do.

Any suggestions/examples?

Thanks,

Sam

Can't you make all appropriate controls disabled? I think that makes it
clear to the user as well that no interaction is possible. You can leav
a cancel button enabled, if needed.
Nov 21 '05 #10

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

Similar topics

11
3738
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET...
2
2757
by: Russ McDaniel | last post by:
Originally posted to microsoft.public.dotnet.distributed_apps with no response. Reposted here with additional thoughts. --- Hello, I'm writing a Windows service which performs some potentially long-running, uninterruptable processes. When the service starts, I create a separate worker thread to perform the work so as to not block the...
7
2261
by: Pavils Jurjans | last post by:
Hello, I wanted to get some light in the subject. As I develop ASP.NET applications, it's necessary to understand how exactly the server- communication happens. It seems like initially application is "sleeping", and it is not loaded in the memory. Then, after very first request to the app, it is compiled (aspx files), loaded into memory, and...
4
1368
by: Urs Vogel | last post by:
Hi I would like to set a Windows.Form into a non responsive state, i.e. that it does not respond to user input of any kind, similar to the state a forms gets when another modal form is opened ontop with ShowDialog(). Form.Enabled = false is not what I'm looking for, it changes the look of the form by graying the window caption and the...
5
16443
by: Dean Slindee | last post by:
I have looked everywhere I can think of for the .exe name of the Windows Picture and Fax Viewer. Anybody know what it's named? Thanks, Dean Slindee
2
2680
by: blueturtle | last post by:
Hi, I'm newbie to C#, and I would like to know what is the common solution to a problem that I encounter. The scenario: Performing a long task, without blocking the UI thread, so it will stay responsive. The long task is done in a different thread.
15
4749
by: Angelo | last post by:
Hi all, I'm using a FileSystemWatcher to monitor a directory. I want the FSW to pop up my already instantiated but invisible form. However, I'm running into some problems with this. 1) In the FSW.Changed FileSystemEventhandler, I called the Show method 'frmMain.Show( )' on my form, the form appears but not completely painted and it...
2
1778
by: =?Utf-8?B?d2R1ZGVr?= | last post by:
I have a website using windows integrated security, with anonymous access turned off. The site is used to query orders from a database and when the search takes a long time, a windows login box appears. Regardless of what login the user enters into this, it does not accept it and the user is locked out of the system. Our network team and...
1
47381
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or...
0
7982
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...
1
7500
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7827
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6066
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5110
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3514
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1961
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
1
1079
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
783
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...

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.