RE: Application.Run

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



In order to open the second form using the Application.Run, once the user
successfully logs in, exit from the thread on which login form is running
using
'Application.ExitThread()' and spawn a new thread. The thread will be
spawned using System.Threading.Thread. Now another form can be run using
Application.Run on newly spawned thread.

Sample Code:
The following code for the button click event of the 'login button' enables
the user to log in and run the second form using Application.Run as well.


System.Threading.Thread td;
private void button1_Click(object sender, EventArgs e)
{

if(this.textBox1.Text=="a" && this.textBox2.Text=="a")
{


Application.ExitThread();
Thread td = new Thread(new ThreadStart(ss));
td.Start();

}

}
protected void ss()
{
MessageBox.Show("new thread is running");
Application.Run(new Form2());
}




"VISHAL" wrote:

> I am developing a windows form with a login screen.Once a user succesfully
> logs in,I want to close the login screen and run the main application.
>
> I dont want to use show dialog box.I would like to use application.run for
> both the forms.
>
> Please let me know what is a good way to do it.
> Any help is highly appreciated.
>
> Thanks
.



Relevant Pages

  • Re: Auto Populating Blocked IPs List
    ... I just checked my security logs - which I save - and I see ... The earlies attacks were trying to almost invariably login as ... >IP blocks their ISP is handing out and allow only those. ... Bill Vermillion - bv @ wjv. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Last Login
    ... The table "tblLastLogin" gets updated when ... intCount gets successfully populated with the number of stories since last ... login but intLastLogin does not get updated, ... If it gets updated as soon as the publisher logs in, ...
    (microsoft.public.access.queries)
  • Re: sshd authentication failure message
    ... >> happen with every login, at least remote, although the user logs in ... > the rpm. ... > I think it is a function of how many people actually look at the logs ... > If there is a fix as well as stopping the login delay on a successful ...
    (RedHat)
  • Re: Account Lockout Policies
    ... Allowing accounts to remain dormat for 30 days ... If a technical solution is unavoidable due to a lack of management buy-in, ... Extract login details from the security logs. ...
    (microsoft.public.security)
  • RE: Failed admin logins
    ... Understanding that my suggestion may not always be possible - pull the plug and ... communicating with that box with the logs of when the login occurs. ... > I have a machine that is trying to log in as the domain administrator ...
    (Security-Basics)