473,395 Members | 1,996 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.

Pop up a form with a temporary message

I want to define a form that has a textbox on it, and at some stages in my
program:

- create the form
- put a message in the textbox
- show the form
- do a time-consuming computation
- close the form

Currently, the form appears at the right time but the textbox always comes
out blank. What order should I be doing things in, and are some Update or
Refresh calls needed?

Thanks to all!
Apr 14 '07 #1
3 4166
There are a number of ways to skin this particular cat. One way:
Create an overload of the Form ctor that accepts a string message parameter
that gets stored in a private string field in the Form class.
In Form_Load, just set the Text value of the TextBox to the string message
field's value. When the form is shown, the text should be visible.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Michael A. Covington" wrote:
I want to define a form that has a textbox on it, and at some stages in my
program:

- create the form
- put a message in the textbox
- show the form
- do a time-consuming computation
- close the form

Currently, the form appears at the right time but the textbox always comes
out blank. What order should I be doing things in, and are some Update or
Refresh calls needed?

Thanks to all!
Apr 15 '07 #2
Many thanks. I'll try that.

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:5D**********************************@microsof t.com...
There are a number of ways to skin this particular cat. One way:
Create an overload of the Form ctor that accepts a string message
parameter
that gets stored in a private string field in the Form class.
In Form_Load, just set the Text value of the TextBox to the string message
field's value. When the form is shown, the text should be visible.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Michael A. Covington" wrote:
>I want to define a form that has a textbox on it, and at some stages in
my
program:

- create the form
- put a message in the textbox
- show the form
- do a time-consuming computation
- close the form

Currently, the form appears at the right time but the textbox always
comes
out blank. What order should I be doing things in, and are some Update
or
Refresh calls needed?

Thanks to all!

Apr 16 '07 #3
It works if I do an Application.DoEvents() right after formPopUp.Show().
Thanks.

"Michael A. Covington" <lo**@ai.uga.edu.for.addresswrote in message
news:eo**************@TK2MSFTNGP04.phx.gbl...
Many thanks. I'll try that.

"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:5D**********************************@microsof t.com...
>There are a number of ways to skin this particular cat. One way:
Create an overload of the Form ctor that accepts a string message
parameter
that gets stored in a private string field in the Form class.
In Form_Load, just set the Text value of the TextBox to the string
message
field's value. When the form is shown, the text should be visible.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Michael A. Covington" wrote:
>>I want to define a form that has a textbox on it, and at some stages in
my
program:

- create the form
- put a message in the textbox
- show the form
- do a time-consuming computation
- close the form

Currently, the form appears at the right time but the textbox always
comes
out blank. What order should I be doing things in, and are some Update
or
Refresh calls needed?

Thanks to all!


Apr 16 '07 #4

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

Similar topics

8
by: Reply Via Newsgroup | last post by:
Folks, I am using Apache 1.3.x with PHP 4.3.x and MySQL v4. Short question: Before I put my web form available on the internet, how can I test it from mis-use in such that special characters...
4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
19
by: Kai-Uwe Bux | last post by:
Hi folks, I have trouble writing a class, derving from stringstream, that collects item and once it's done will write them to std::cout in one go. It works fine except when I use it as a...
5
by: White Wolf | last post by:
Hi, I would like to double check how long a temporary returned by a function lives? Suppose I have an instance of a class type C, which has a member function returning some sort of...
3
by: Lyn | last post by:
I need some guidance for a technique that will allow me to accomplish the following... I have a table in which each record contains a photograph. I would like to display in a form a thumbnail...
2
by: Tom Edelbrok | last post by:
I've created a form on the fly at run-time as "new form". Works fine. I even add some controls to it (ie: a label control, etc). I then use "AddOwnedForm" to add my newly created form as an owned...
4
by: RSH | last post by:
Okay in my coninuing forms saga I have a situation where I am spawning a new form from my main form: ////////////////////////////////////////////////////////////////////////////////////// ...
1
by: Thom Little | last post by:
I have a NET 2.0 windows application that needs to send a "post" <form> to a website. That website opens a new browser window when it receives the command and establishes a dialog in that window....
5
by: Stuart | last post by:
Hi all, Iv'e got a page that has a mass amount of input fields, all of which require a decimal figure. To make it easier when it comes to inputting data, I'm trying to setup + and - links that...
2
by: =?Utf-8?B?S3J5c3RhbCBWQiBOZXdiaWU=?= | last post by:
I am brand new to programming and was hoping that someone could tell me how to take the next step in my windows application. I need to be able to email not just the contents of a form but an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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
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.