473,508 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Silly user feedback question...

I've never really done a form-based application -- I've mostly done Web
stuff -- so I have a very basic question:

How do I provide simple text feedback to the user as the program runs?

I'm envisioning some kind of Response.Write(), Response.Flush()
scenario, except that the text will go to a control on the form, rather
than back to the browser. I've tried a multiline textbox, and a label
control, but in each instance, the code has to finish executing before
anything is displayed.

I appreciate your help!

--Brent
Nov 17 '05 #1
3 1271
messageBox.show

Brent wrote:
I've never really done a form-based application -- I've mostly done Web
stuff -- so I have a very basic question:

How do I provide simple text feedback to the user as the program runs?

I'm envisioning some kind of Response.Write(), Response.Flush()
scenario, except that the text will go to a control on the form, rather
than back to the browser. I've tried a multiline textbox, and a label
control, but in each instance, the code has to finish executing before
anything is displayed.

I appreciate your help!

--Brent

--
Message posted via http://www.dotnetmonster.com
Nov 17 '05 #2
Brent,

In this case, you will have to perform your work on another thread.
Then, as you want to update the UI, you would make calls to set the
appropriate UI elements.

Windows controls are picky about the context in which they are called,
though. Generally, anything affecting the UI has to be called from the
thread that created the UI itself. If you try and make a call to update the
text of a textbox from another thread, it won't work too well.

To get around this, you can create a delegate which matches the
signature of a method which will perform the update. You then pass this
delegate, along with any parameters to a call to Invoke on a control created
on the UI thread. It will then cause the method pointed to by the delegate
to be called on the UI thread.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Brent" <""b b i g l e r \"@ y a h o o . c o m"> wrote in message
news:11*************@corp.supernews.com...
I've never really done a form-based application -- I've mostly done Web
stuff -- so I have a very basic question:

How do I provide simple text feedback to the user as the program runs?

I'm envisioning some kind of Response.Write(), Response.Flush() scenario,
except that the text will go to a control on the form, rather than back to
the browser. I've tried a multiline textbox, and a label control, but in
each instance, the code has to finish executing before anything is
displayed.

I appreciate your help!

--Brent

Nov 17 '05 #3
Thanks, Nicholas. In that case, it's not worth the time to implement.
I've added a feedback bar, instead...

--Brent

Nicholas Paldino [.NET/C# MVP] wrote:
Brent,

In this case, you will have to perform your work on another thread.
Then, as you want to update the UI, you would make calls to set the
appropriate UI elements.

Windows controls are picky about the context in which they are called,
though. Generally, anything affecting the UI has to be called from the
thread that created the UI itself. If you try and make a call to update the
text of a textbox from another thread, it won't work too well.

To get around this, you can create a delegate which matches the
signature of a method which will perform the update. You then pass this
delegate, along with any parameters to a call to Invoke on a control created
on the UI thread. It will then cause the method pointed to by the delegate
to be called on the UI thread.

Hope this helps.

Nov 17 '05 #4

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

Similar topics

88
12320
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
3
1668
by: Martin Lacoste | last post by:
Wondering if people have suggestions as to good reference sources for Access 2000 for an (almost..) intermediate user? It appears as though books along the lines of 'Access for Dummies' are way...
5
2046
by: Norsoft | last post by:
I have a .Net 1.1 application which is downloaded into an aspx page. It is a dll which inherits from System.Windows.Forms.UserControl. It works fine on a PC with only the 1.1 Framework. However,...
6
1277
by: Gary Kahrau | last post by:
I am planning a very large project in vb.net and I want to make it modular. If the project needs 200-300 forms what do you think about creating a user control for each of these forms? The main...
7
3867
by: John.NET | last post by:
Hi, First please forgive that this is a repost as the first time I didn't have my proper nospam email configured... I'm writing a web service where one method will launch another .NET program...
1
2432
by: GCeaser | last post by:
So here is the desired functionality: When an error occurs anywhere in my application, I want an error section on the page to display the error information while still showing the actual page...
1
3209
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
3
1869
by: Gus Gassmann | last post by:
Hi all: I've been working with XML schemas for about a year now, strictly monkey-see-monkey-do so far. (For instance, I did not know about namespaces until yesterday.) My access to the internet...
4
1238
by: David Bonnell | last post by:
I have a Windows Forms app that is intended to launch via the SendTo feature. I want it to perform work (in the background) while updating a progress bar in the main window. The problem: I want...
0
7382
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...
1
7042
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
7495
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...
0
5627
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,...
0
4707
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...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
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 ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
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...

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.