How to exit application or webrowser
Review Code below:
private void Service_OpenCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
if (e.Error != null)
{
ShowServiceWindow("EDAD SERVICE: Service Un-Available",e.Error.Message);
// I want to close the application below. In windows forms. we normally do this.close or application.close
}
}
Loading

VulpesRank #55 · 29.2K reputationPosted Aug 17, 2011, 1:56 PM EDT
Priya LingeRank #785 · 2.9K reputationPosted Aug 17, 2011, 8:19 PM EDT
Please try this,
Here i close the window on Button Click.
private void btnCancel_Click(object sender, RoutedEventArgs e)
{
HtmlPage.Window.Eval("window.close();");
}
HtmlPage.Window.Eval Method ,evaluates a string that contain JavaScript code.
Hope this will help you.
Thanks.
David SmithRank #999 · 2K reputationPosted Aug 18, 2011, 5:21 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 18, 2011, 5:27 AM EDT
David SmithRank #999 · 2K reputationPosted Aug 20, 2011, 9:19 PM EDT
I still working on the requirment to disable or not show the minimize or maximize buttons. cant seem to get that right for some reason