|
using System;
using System.Windows.Forms;
namespace PopupTest
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
private void searchBox_Search(object sender, StringEventArgs e)
{
webBrowser.Navigate(e.String);
}
private void goButton_Click(object sender, EventArgs e)
{
webBrowser.Navigate(addressTextBox.Text);
}
private void webBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
addressTextBox.Text = e.Url.ToString();
}
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
e.Handled = false;
if (e.KeyChar == '\r')
{
e.Handled = true;
goButton_Click(null, EventArgs.Empty);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.