473,386 Members | 1,823 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,386 software developers and data experts.

All lines appearing at once

I wrote a program and when i click the button i want the lines that i want
print in an order

my code is like this


public void btn_clicked(object ob, EventArgs e)
{
this.btn.Visible = false;
this.txt1.Text = "Waiting For Username and Password....\n\n";//this
//This line writes on my progrram and then wait until query complete
if (sorgu(this.text1.Text, this.text2.Text))
{
if (client())
{
if (sylcontrol())
{
if (uobasic())
{
if (proccescheck())
{
this.txt1.Text += "Ultima Online Calistiriliyor.// This
line is..\n"; //This line must be written after theese functions completed
uocfg();
}
else
{
txt1.Text += "Yasakli Bir Program Bulundu....\n";
this.Close();
}

}
else
{
txt1.Text += "Dosya Bulunamadi....\n";
this.Close();
}
}
else
{
txt1.Text += "Sunucu Baglantisinda Hata Olustu....\n";
this.Close();
}
}
else
{
txt1.Text += "Yama Guncellemede Hata Olustu....\n";
this.Close();
}
}
else
{
txt1.Text += "Kullanici Adi veya Sifre Hatali....\n";
this.Close();
}
}



but in my program it waits until everythin has done than all messages
appering at once
how can i fix that?
Thanks
Nov 16 '05 #1
3 919
Tolga Tanriverdi <to***@sylveria.gen.tr> wrote:
I wrote a program and when i click the button i want the lines that i want
print in an order

my code is like this
<snip>
but in my program it waits until everythin has done than all messages
appering at once
how can i fix that?


Don't do processing in the UI thread.

See http://www.pobox.com/~skeet/csharp/t...winforms.shtml

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
> Jon Skeet [C# MVP]wrote:
"]Tolga Tanriverdi <to***@sylveria.gen.tr> wrote:
I wrote a program and when i click the button i want the lines that i want print in an order

my code is like this
<snip>
but in my program it waits until everythin has done than all messages appering at once
how can i fix that?

Don't do processing in the UI thread.

See http://www.pobox.com/~skeet/csharp/t...winforms.shtml

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me
too[/quote:365c6a1bda]

Sorry i didnt understand could you be more spesific
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #3
Dakkar <da****@sylveria.gen-dot-tr.no-spam.invalid> wrote:
Sorry i didnt understand could you be more spesific


All your code is running in the UI thread. It shouldn't be - the UI
thread is there to do UI things, that's all.

Read the whole of the article I linked to before for much more detail.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

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

Similar topics

11
by: QS Computing | last post by:
Hi, I'm trying to write a simple forum script and I want to include '>' at the start of lines in quoted text (like on USENET). How do I go about doing this? My post is stored in a MySQL DB text...
2
by: Jesse Noller | last post by:
I am a relative newbie to python and I am having issues trying to iterate over the lines of a file. I have a text file - foo.bar inside of this file are lines of text: x-3411342 y-1324123...
22
by: Ling Lee | last post by:
Hi all. I'm trying to write a program that: 1) Ask me what file I want to count number of lines in, and then counts the lines and writes the answear out. 2) I made the first part like this: ...
2
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain...
3
by: Mark | last post by:
Hello all - I'm creating an application that uses a datagridview control. My development environment is an HP Laptop with a NVIDIA Geforce 4 440 Go 64M. While using this object, a queer...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
7
by: peraklo | last post by:
Hello, there is another problem i am facing. i have a text file which is about 15000 lines big. i have to cut the last 27 lines from that file and create a new text file that contans those 27...
19
by: Pavan | last post by:
Hi, I want to know if there is any software for measuring lines of code of my c++ application. I found out a tool, sloccount, but it gives only physical lines of code. I found out one more...
5
by: AB3004 | last post by:
Hey there, Just wanted to say Hi. - I'm new on here & have drifted here as I'm having a minor problem I was hoping someone could assist ...? (for some reason I couldn't post this directly into the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.