本文整理汇总了C#中System.Windows.Forms.WebBrowser类的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.WebBrowser类的具体用法?C# System.Windows.Forms.WebBrowser怎么用?C# System.Windows.Forms.WebBrowser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
System.Windows.Forms.WebBrowser类属于命名空间,在下文中一共展示了System.Windows.Forms.WebBrowser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(721, 544);
this.webBrowser1.TabIndex = 0;
//
// SWFViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(721, 544);
this.Controls.Add(this.webBrowser1);
this.Name = "SWFViewer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SWFViewer";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
}
示例2: InitializeComponent
private void InitializeComponent()
{
this.wBrowser = new System.Windows.Forms.WebBrowser();
this.Load += new System.EventHandler(this.Announcement_Load);
this.SuspendLayout();
//
//wBrowser
//
this.wBrowser.AllowWebBrowserDrop = false;
this.wBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
this.wBrowser.Location = new System.Drawing.Point(0, 0);
this.wBrowser.MinimumSize = new System.Drawing.Size(20, 20);
this.wBrowser.Name = "wBrowser";
this.wBrowser.Size = new System.Drawing.Size(549, 474);
this.wBrowser.TabIndex = 0;
//
//Announcement
//
this.ClientSize = new System.Drawing.Size(549, 474);
this.Controls.Add(this.wBrowser);
this.Name = "Announcement";
this.TabText = "Announcement";
this.Text = "Announcement";
this.Icon = global::My.Resources.Resources.News_Icon;
this.ResumeLayout(false);
}
示例3: IpcEventTreeModelAdapter
/// <summary>
/// Instantiates a new IpcEventTreeModelAdapter.
/// </summary>
/// <param name="formWindow"></param>
/// <param name="formTreeView"></param>
public IpcEventTreeModelAdapter(Forms.IpcTreeWebWindow formWindow, Forms.IpcEventMonitorMdiWindow mdiWindow, System.Windows.Forms.TreeView formTreeView)
{
_webURL = "file:///{0}/Html/IpcEventMonitorPane.html";
_formWindow = formWindow;
_mdiWindow = mdiWindow;
_formTreeView = formTreeView;
_webBrowser = _formWindow.WebBrowser1;
//create utility bus
_utilsBus = new Niawa.Utilities.UtilsServiceBus();
//set up ipc logging for this class (to log events that occur in the tree model)
_evtWriter = new Niawa.MsEventIpcEventAdapter.MsEventIpcEventWriter(_utilsBus);
_evtWriter.Start();
_evtWriter.AddIpcEventWriter(Niawa.IpcController.IpcFactory.CreateIpcEventWriter("IpcEventMonitor", true, "TreeModel", _utilsBus), "TreeModel");
//instantiate view
_view = new TreeModel.TreeModelViewImpl(_formWindow, _formTreeView);
//instantiate node view factory
_nodeViewFactory = new TreeModel.TreeModelNodeViewFactoryImpl(_webBrowser, _webURL);
//instantiate tree model controller
_treeModelController = new TreeModelNodeControls.TreeModelController(_view, _nodeViewFactory, _evtWriter.EvtConsumer, "IpcEventMonitor", string.Empty);
}
示例4: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScriptErrorsSuppressed = true;
this.webBrowser1.Size = new System.Drawing.Size(898, 594);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.NewWindow += new System.ComponentModel.CancelEventHandler(this.webBrowser1_NewWindow);
//
// WebForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(898, 594);
this.Controls.Add(this.webBrowser1);
this.Name = "WebForm";
this.Text = "WebForm";
this.Load += new System.EventHandler(this.WebForm_Load);
this.ResumeLayout(false);
}
示例5: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.wbFacebookLogin = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// wbFacebookLogin
//
this.wbFacebookLogin.Dock = System.Windows.Forms.DockStyle.Fill;
this.wbFacebookLogin.Location = new System.Drawing.Point(0, 0);
this.wbFacebookLogin.MinimumSize = new System.Drawing.Size(20, 20);
this.wbFacebookLogin.Name = "wbFacebookLogin";
this.wbFacebookLogin.ScrollBarsEnabled = false;
this.wbFacebookLogin.Size = new System.Drawing.Size(802, 617);
this.wbFacebookLogin.TabIndex = 0;
this.wbFacebookLogin.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.wbFacebookLogin_Navigated);
//
// FacebookExtendedPermission
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(802, 617);
this.Controls.Add(this.wbFacebookLogin);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.IsMdiContainer = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FacebookExtendedPermission";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Facebook Extended Permission";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FacebookAuthentication_FormClosed);
this.ResumeLayout(false);
}
开发者ID:jeffdeville,项目名称:FacebookDeveloperToolkit---Fork-at-37335,代码行数:36,代码来源:FacebookExtendedPermission.designer.cs
示例6: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Browser = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// Browser
//
this.Browser.Dock = System.Windows.Forms.DockStyle.Fill;
this.Browser.Location = new System.Drawing.Point(0, 0);
this.Browser.MinimumSize = new System.Drawing.Size(20, 20);
this.Browser.Name = "Browser";
this.Browser.Size = new System.Drawing.Size(794, 636);
this.Browser.TabIndex = 0;
this.Browser.Url = new System.Uri("", System.UriKind.Relative);
//
// ScrapeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(794, 636);
this.Controls.Add(this.Browser);
this.Name = "ScrapeForm";
this.Text = "Sammy HTML Scraping";
this.ResumeLayout(false);
}
示例7: SetWebBrowserDocumentMode
static void SetWebBrowserDocumentMode()
{
var browser = new System.Windows.Forms.WebBrowser();
var version = browser.Version;
var keys = new string[] { @"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION",
@"HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION" };
var processName = Process.GetCurrentProcess().ProcessName + ".exe";
var value = Registry.GetValue(keys[0], processName, null);
if (value == null)
{
int? v = null;
switch (version.Major)
{
case 11:
v = 11001;
break;
case 10:
v = 10001;
break;
case 9:
v = 9999;
break;
case 8:
v = 8888;
break;
}
if (v.HasValue)
{
foreach (var key in keys)
Registry.SetValue(key, processName, v.Value, RegistryValueKind.DWord);
}
}
}
示例8: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.webBrowser = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser
//
this.webBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser.Location = new System.Drawing.Point(0, 0);
this.webBrowser.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.webBrowser.MinimumSize = new System.Drawing.Size(27, 25);
this.webBrowser.Name = "webBrowser";
this.webBrowser.ScrollBarsEnabled = false;
this.webBrowser.Size = new System.Drawing.Size(881, 386);
this.webBrowser.TabIndex = 0;
this.webBrowser.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser_Navigated);
//
// FacebookLoginDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(881, 386);
this.Controls.Add(this.webBrowser);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FacebookLoginDialog";
this.ShowInTaskbar = false;
this.Text = "Login to Facebook ...";
this.Load += new System.EventHandler(this.FacebookLoginDialog_Load);
this.ResumeLayout(false);
}
示例9: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.helpBrowser = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// helpBrowser
//
this.helpBrowser.Dock = System.Windows.Forms.DockStyle.Fill;
this.helpBrowser.IsWebBrowserContextMenuEnabled = true;
this.helpBrowser.Location = new System.Drawing.Point(0, 0);
this.helpBrowser.MinimumSize = new System.Drawing.Size(20, 20);
this.helpBrowser.Name = "helpBrowser";
this.helpBrowser.Size = new System.Drawing.Size(1111, 708);
this.helpBrowser.TabIndex = 0;
//
// TitleSetupEditorHelp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1111, 708);
this.Controls.Add(this.helpBrowser);
this.Name = "TitleSetupEditorHelp";
this.Text = "Help: Title Setup";
this.ResumeLayout(false);
}
示例10: LoginSSO
public LoginSSO()
{
// Login to Support CS SSO - just use a browser control to hit the SSO page and then
// sniff for the Session Id and use that to login to the API
// started with the WPF browser control but was very buggy! searching the internet said
// the windows forms one was more stable, switched and seems to be fine
// TODO - timeout detection - when salesforce timesout, there is a javascript error from the control
// I think when SForce is trying to display the "You are about to be logged out due to inactivity"
// this should be trapped and a message shown to the user with a better logout message/process
InitializeComponent();
Utility.setTheme(this);
RadWindowInteropHelper.SetAllowTransparency(this, false);
_d = Globals.ThisAddIn.getData();
_settings = Globals.ThisAddIn.getSettings();
_local = Globals.ThisAddIn.GetLocalSettings();
// try the windows form browser
_webBrowser1 = new System.Windows.Forms.WebBrowser();
this.wfh1.Child = _webBrowser1;
_webBrowser1.Navigated += _webBrowser1_Navigated;
_webBrowser1.DocumentCompleted += _webBrowser1_DocumentCompleted;
// stop the reminders - salesforce puts up a reminder window - it doesn't work though
// we get an IE window with an error so just cancel it
_webBrowser1.NewWindow += _webBrowser1_NewWindow;
}
示例11: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(841, 421);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser1_Navigated);
//
// TrelloAuthorizeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(841, 421);
this.Controls.Add(this.webBrowser1);
this.Name = "TrelloAuthorizeForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Trello 授权";
this.TopMost = true;
this.Load += new System.EventHandler(this.TrelloAuthorizeForm_Load);
this.ResumeLayout(false);
}
示例12: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(579, 402);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.webBrowser1_Navigating);
this.webBrowser1.FileDownload += new System.EventHandler(this.webBrowser1_FileDownload);
this.webBrowser1.ControlAdded += new System.Windows.Forms.ControlEventHandler(this.webBrowser1_ControlAdded);
this.webBrowser1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown);
this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted);
this.webBrowser1.Navigated += new System.Windows.Forms.WebBrowserNavigatedEventHandler(this.webBrowser1_Navigated);
//
// WebPlayer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(579, 402);
this.Controls.Add(this.webBrowser1);
this.Name = "WebPlayer";
this.Text = "WebPlayer";
this.Load += new System.EventHandler(this.WebPlayer_Load);
this.ResumeLayout(false);
}
示例13: FontWindow
public FontWindow()
{
InitializeComponent();
backgroundColorPicker.SelectedColorChanged += new RoutedPropertyChangedEventHandler<Color>(backgroundColorPicker_SelectedColorChanged);
genericFontRadioButton.Checked += new RoutedEventHandler(genericFontRadioButton_Checked);
genericFontRadioButton.Unchecked += new RoutedEventHandler(genericFontRadioButton_Unchecked);
fontFamilyComboBox.SelectionChanged += new SelectionChangedEventHandler(fontFamilyComboBox_SelectionChanged);
fontSizeNumericBox.ValueChanged += new EventHandler(fontSizeNumericBox_ValueChanged);
fontVariantComboBox.SelectionChanged += new SelectionChangedEventHandler(fontVariantComboBox_SelectionChanged);
fontWeightComboBox.SelectionChanged += new SelectionChangedEventHandler(fontWeightComboBox_SelectionChanged);
fontStyleComboBox.SelectionChanged += new SelectionChangedEventHandler(fontStyleComboBox_SelectionChanged);
fontDecorationComboBox.SelectionChanged += new SelectionChangedEventHandler(fontDecorationComboBox_SelectionChanged);
fontTransformComboBox.SelectionChanged += new SelectionChangedEventHandler(fontTransformComboBox_SelectionChanged);
previewTextBox.TextChanged += new TextChangedEventHandler(previewTextBox_TextChanged);
// even IE version is 9, use polyfill for text shadow
var winFormBrowser = new System.Windows.Forms.WebBrowser();
int majorVersion = winFormBrowser.Version.Major;
if (majorVersion < 10)
{
useTextShadowPolyFill = true;
}
LoadCommonFontFamilies();
SetCopyCss();
SetPreviewSource();
}
示例14: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UpdateForm));
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.AllowWebBrowserDrop = false;
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.IsWebBrowserContextMenuEnabled = false;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScrollBarsEnabled = false;
this.webBrowser1.Size = new System.Drawing.Size(640, 480);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.WebBrowserShortcutsEnabled = false;
//
// UpdateForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(640, 480);
this.Controls.Add(this.webBrowser1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "UpdateForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "Multiverse Patcher";
this.ResumeLayout(false);
}
示例15: InitializeComponent
/// <summary>
/// 设计器支持所需的方法 - 请勿
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.webBrowserRss = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowserRss
//
this.webBrowserRss.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowserRss.Location = new System.Drawing.Point(0, 0);
this.webBrowserRss.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowserRss.Name = "webBrowserRss";
this.webBrowserRss.Size = new System.Drawing.Size(725, 525);
this.webBrowserRss.TabIndex = 0;
//
// RssPane
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.webBrowserRss);
this.Name = "RssPane";
this.Size = new System.Drawing.Size(725, 525);
this.FormRegionClosed += new System.EventHandler(this.RssPane_FormRegionClosed);
this.FormRegionShowing += new System.EventHandler(this.RssPane_FormRegionShowing);
this.ResumeLayout(false);
}