本文整理汇总了C#中System.Windows.Forms.WebBrowser.SizeTo方法的典型用法代码示例。如果您正苦于以下问题:C# WebBrowser.SizeTo方法的具体用法?C# WebBrowser.SizeTo怎么用?C# WebBrowser.SizeTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.WebBrowser
的用法示例。
在下文中一共展示了WebBrowser.SizeTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Invoke
//.........这里部分代码省略.........
that.InternalElement = (IHTMLIFrame)(object)webview;
// src was not copied for some reason. force it.
that.Size = that.Size;
that.Refresh();
};
#endregion
var css = Native.css[typeof(Form)][" .caption"];
(css.style as dynamic).webkitAppRegion = "drag";
// FormStyler.AtFormCreated = FormStylerLikeFloat.LikeFloat;
// only if the host does alpha?
var ShadowRightBottom = 8;
#region Form
var f = new Form
{
ShowIcon = false,
Text = Native.document.title,
//Text = Native.document.location.hash,
StartPosition = FormStartPosition.Manual
};
f.MoveTo(0, 0).SizeTo(
Native.window.Width - ShadowRightBottom,
Native.window.Height - ShadowRightBottom
);
//f.Opacity = 0.5;
f.Show();
#endregion
var w = new WebBrowser
{
// this wont work?
//Dock = DockStyle.Fill
}.AttachTo(f);
w.Navigate(
Native.document.title
);
f.FormClosing +=
(sender, e) =>
{
// X:\jsc.svn\examples\javascript\chrome\apps\ChromeWebviewFullscreen\ChromeWebviewFullscreen\Application.cs
if (chrome.app.window.current().isFullscreen())
{