2010-12-21, 19:27
the iewrap is just a windows form with a web browser control dropped on it and the title bar hidden, a button was added to the top left that closes the web browser control and exits the form. The keypress hooks aren't working right so i'll have to rework those
code:
and then in the forms init I added
code:
Code:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace iebrowser
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain(args));
}
}
}
Code:
string url = "";
foreach (string arg in ARGS)
{
if (arg.Contains("showscroll"))
{
webBrowser1.ScrollBarsEnabled = true;
}
if (arg.Contains("nobutton"))
{
btnExit.Visible = false;
}
if (arg.Contains("notop"))
{
this.TopMost = false;
}
if (arg.Contains(".htm"))
{
url = arg;
}
}
if (!string.IsNullOrEmpty(url))
{
webBrowser1.Navigate(url);
}