Skip to content

Display or Logging Message

MOHAMED JACKARIAH

Asked Jun 11, 2015, 5:20 AM EDT1 answer
Share
LinkedInX
Hi Friends,
 
I have create on windows application. When user fill the details and click the Install button. I want to show the activities in the same form. How to solve this tasks.
 
When user Click the Install button I validate the user inputs and pass all the values into another class. Also I am generating the below mentioned messages. 
 
For Exmaple
When User Click the Install Button in my form means I want to show the following messages.
 
Reading compressed file
Extracting file
Extracting Completed.
Reading application name 
.......... 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Manoj Bhoir
    0
    Hi,
     
    So what is the problem you are facing here. Just show this messaged as you proceed in your code. Only remember that you have to write Application.DoEvents() after each message. because it Processes all Windows messages currently in the message queue.
    Suppose you want to show this messages in multiline Textbox your code should be like this :
     
    TypeScript
    private void btnInstall_Click(object sender, EventArgs e)
            {
       txtProcessMessages.Text = "Reading Compressed Files..." + Environment.NewLine;
       Application.DoEvents();
       // your code to read files
       txtProcessMessages.Text = "Extracting file..." + Environment.NewLine;
       Application.DoEvents();
       // Code to extract files
       txtProcessMessages.Text = "Extracting Completed...." + Environment.NewLine;
       Application.DoEvents();
       // And so on
    } 
    For more details about Application.DoEvent Check this link :
    0