Question: ```
<FORM METHOD=POST  NAME="WMLogon" ACTION=<?php echo "$_SERVER[PHP_SELF]?s=$s&t=$t"; ?>
<INPUT TYPE="hidden" NAME="current_page" value=0>
    <table class="bar-status" width="70%" border="0" cellspacing="1" cellpadding="2" align="center">
            <tbody>
            <tr>
    <td class="bar-search" align="center" bgcolor="#cddeff">
    <input tabindex="102" type="Submit"  name="Login" align="top" border="0" value="Login"/> </td></tr>
    </tbody></table>
</FORM>

```

i want to click on login button how can i do that please help me.......
i am not able to do this by using following code

```
Then /^I enter login details and press login button/ do
   fill_in "AUTH_USER", :with => "wmmpw@localhost"
   fill_in "AUTH_PW", :with => "wmmpw"
   click_button("Login")
end

```

Answer: 
> 
> Now after, the console application has done its task it closes but I
>  want to be able to execute it again through my Windows forms
>  application by pressing a button. How do I do this ?
> 
> 
> 

Just use [Process.Start](http://msdn.microsoft.com/it-it/library/system.diagnostics.process.start.aspx) with were you pass a path to your console executable. 

> 
> Also when I use Application.Exit() on my Windows Forms application
>  does that close both the projects or just the Windows Form one ?
> 
> 
> 

Application is an execution context of assembly, in other words it refers to `EXE` were code is executed. So in your case, it will only close your WindowsForms application.
As long as the methods you need in your console application are public, you should be able to call them directly from the other application. Just add a reference to it in the calling project. 

In fact, If you want common stuff like this, you migth consider placing the common logic in a separate project, built as a `.dll`, and have the console and winforms-projects both use this when needed.