المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Waiting until myclass.something() is finished



C# Programming
04-17-2010, 11:11 PM
Im new to c# and build building a program anyway ive moved the code to login to another class as it needs to be reused.

MessageBox.Show("Login Function runing");
LoginClass.DoLogin(this);
MessageBox.Show("Login finished");

however unlike everywhere else in c# the as soon as the class method is run the second messagebox is shown even though the login function code keeps executing.

Is there any way to make the login class execute but for the current class to pass until its finished ?