本文整理汇总了C#中FormBorderStyle类的典型用法代码示例。如果您正苦于以下问题:C# FormBorderStyle类的具体用法?C# FormBorderStyle怎么用?C# FormBorderStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormBorderStyle类属于命名空间,在下文中一共展示了FormBorderStyle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: BeginScreenDeviceChange
public override void BeginScreenDeviceChange(bool willBeFullScreen)
{
if (willBeFullScreen && !isFullScreenMaximized && form != null)
{
savedFormBorderStyle = form.FormBorderStyle;
}
if (willBeFullScreen != isFullScreenMaximized)
{
deviceChangeChangedVisible = true;
oldVisible = Visible;
Visible = false;
if (form != null)
form.SendToBack();
}
else
{
deviceChangeChangedVisible = false;
}
if (!willBeFullScreen && isFullScreenMaximized && form != null)
{
form.TopMost = false;
form.FormBorderStyle = savedFormBorderStyle;
}
deviceChangeWillBeFullScreen = willBeFullScreen;
}
开发者ID:ItayGal2,项目名称:paradox,代码行数:29,代码来源:GameWindowDesktop.cs
示例2: Save
public void Save(Form targetForm)
{
winState = targetForm.WindowState;
brdStyle = targetForm.FormBorderStyle;
topMost = targetForm.TopMost;
bounds = targetForm.Bounds;
}
开发者ID:icehokie,项目名称:DailyFive,代码行数:7,代码来源:FormState.cs
示例3: c000081
public c000081(Game p0, GraphicsDeviceManager p1)
{
this.f0000b5 = TextureFilter.Point;
this.f00000a = false;
this.f000051 = Color.Black;
this.f0000b6 = FormBorderStyle.Fixed3D;
this.f0000a1 = false;
this.f0000b5 = TextureFilter.Linear;
this.f00000b = 800;
this.f00000f = 600;
this.f000057 = false;
this.f0000b7 = MultiSampleType.TwoSamples;
if (p1 != null)
{
this.f000056 = p1.IsFullScreen;
}
this.m000001();
if (p0 != null)
{
this.m000004(p0.Window.ClientBounds.Width);
this.m00004b(p0.Window.ClientBounds.Height);
}
if ((p1 != null) && !p1.GraphicsDevice.CreationParameters.Adapter.CheckDeviceMultiSampleType(DeviceType.Hardware, SurfaceFormat.Color, this.m000008(), this.m0000ed()))
{
this.m0000ee(MultiSampleType.None);
}
this.m000003();
}
开发者ID:bing2008,项目名称:CastNetGame,代码行数:28,代码来源:c000081.cs
示例4: FormFURSCommunication
/****** End For DEBUG & TEST PURPOSES ***/
public FormFURSCommunication(usrc_FVI_SLO Parent, Thread_FVI_Message msg)
{
InitializeComponent();
if (Parent.FursTESTEnvironment)
{
lbl_TEST_Environment.Visible = true;
}
else
{
lbl_TEST_Environment.Visible = false;
}
m_usrc_FVI_SLO = Parent;
m_msg = msg;
iForm_Default_Height = this.Height;
iForm_Default_Width = this.Width;
/****** For DEBUG & TEST PURPOSES ***/
if (m_usrc_FVI_SLO.DEBUG)
{
default_FormBorderStyle = this.FormBorderStyle;
Show_usrc_DEBUG_MessagePreview();
}
/****** End For DEBUG & TEST PURPOSES ***/
// this.Location = m_parent.ParentForm.Location;
// Point p = new Point(m_parent.ParentForm.Width / 2 - this.Width / 2, m_parent.ParentForm.Height / 2 - this.Height / 2);
// this.Location = p;
}
开发者ID:dstrucl,项目名称:Tangenta40,代码行数:32,代码来源:FormFURSCommunication.cs
示例5: Launcher_Load
private void Launcher_Load(object sender, EventArgs e)
{
this.Icon = DnDCS.Win.Libs.Assets.AssetsLoader.LauncherIcon;
initialFormTopMost = this.TopMost;
initialFormBorderStyle = this.FormBorderStyle;
initialFormWindowState = this.WindowState;
if (this.runMode.HasValue)
{
switch (this.runMode.Value)
{
case Constants.RunMode.Client:
this.btnClient.PerformClick();
break;
case Constants.RunMode.Server:
this.btnServer.PerformClick();
break;
default:
break;
}
}
}
开发者ID:philazzi44,项目名称:DnDCS,代码行数:25,代码来源:Launcher.cs
示例6: WidgetModeManager
public WidgetModeManager(Form form)
{
this._form = form;
_defBackColor = form.BackColor;
_defTransparencyKey = form.TransparencyKey;
_defBorderStyle = form.FormBorderStyle;
//set middle-mouse form-wide for toggling modes
SetMouseEvents(form);
}
开发者ID:webba,项目名称:WurmAssistant2,代码行数:10,代码来源:WidgetModeManager.cs
示例7: OpenShowForm
public static Form OpenShowForm(Control pControl, FormBorderStyle pFormBorderStyle, FormStartPosition pFormStartPosition)
{
var frm = new Form();
frm.Width = pControl.Width;
frm.Height = pControl.Height;
frm.FormBorderStyle = pFormBorderStyle;
frm.StartPosition = pFormStartPosition;
frm.Controls.Add(pControl);
frm.ShowDialog();
return frm;
}
开发者ID:gacaromar,项目名称:Restaurant,代码行数:11,代码来源:GlobalHelper.cs
示例8: ThemeColorPickerWindow
/// <summary>
/// Create a new window for ThemeColorPicker.
/// </summary>
/// <param name="startLocation">The starting position on screen. Note: This is not location in Form.</param>
/// <param name="borderStyle">How the border should displayed.</param>
/// <param name="actionAfterColorSelected">The form action of 0o-.</param>
/// <param name="actionAfterLostFocus"></param>
public ThemeColorPickerWindow(Point startLocation, FormBorderStyle borderStyle, Action actionAfterColorSelected, Action actionAfterLostFocus)
{
InitializeComponent();
this.StartPosition = FormStartPosition.Manual;
this.Location = startLocation;
this.FormBorderStyle = borderStyle;
this.ActionAfterColorSelected = actionAfterColorSelected;
this.ActionAfterLostFocus = actionAfterLostFocus;
this.LostFocus += new EventHandler(ThemeColorPickerWindow_LostFocus);
this.Deactivate += new EventHandler(ThemeColorPickerWindow_Deactivate);
themeColorPicker1.ShowCustomMoreColorWindow += new ThemeColorPicker.moreColorWindowShow(themeColorPicker1_ShowCustomMoreColorWindow);
}
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:19,代码来源:ThemeColorPickerWindow.cs
示例9: SetUpFixture
public void SetUpFixture()
{
doc = new WixDocument();
doc.LoadXml(GetWixXml());
WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
using (Form simpleDialog = wixDialog.CreateDialog()) {
dialogName = simpleDialog.Name;
borderStyle = simpleDialog.FormBorderStyle;
clientSize = simpleDialog.ClientSize;
minimizeBox = simpleDialog.MinimizeBox;
maximizeBox = simpleDialog.MaximizeBox;
}
}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:SimpleDialogTestFixture.cs
示例10: createContainingForm
/// <summary>
/// Creates the form that contains the invoking user control as its only child component.
/// </summary>
public static Form createContainingForm(this UserControl ctrl, FormBorderStyle borderStyle = FormBorderStyle.Sizable)
{
Form obj = new Form();
Panel pane = new Panel();
pane.Parent = obj;
pane.Dock = DockStyle.Fill;
pane.MinimumSize = ctrl.MinimumSize;
pane.MaximumSize = ctrl.MaximumSize;
// determine minimum size for the form
if (!pane.MinimumSize.IsEmpty)
{
pane.Size = pane.MinimumSize;
obj.ClientSize = pane.Size;
obj.MinimumSize = obj.Size;
}
// determine maximum size for the form
if (!pane.MaximumSize.IsEmpty)
{
pane.Size = pane.MaximumSize;
obj.ClientSize = pane.Size;
obj.MaximumSize = obj.Size;
}
// set normal
pane.Size = ctrl.Size;
obj.ClientSize = pane.Size;
// make it.
ctrl.Parent = pane;
ctrl.Dock = DockStyle.Fill;
obj.FormBorderStyle = borderStyle;
obj.Text = ctrl.Text;
// keyboard events should be passed to the form now.
obj.KeyPreview = true;
return obj;
}
开发者ID:Kadavercian,项目名称:whitemath,代码行数:53,代码来源:ContainerExtensions.cs
示例11: Read
public void Read(Form form)
{
windowState = form.WindowState;
form.WindowState = FormWindowState.Normal;
clientSize = form.ClientSize;
left = form.Left;
top = form.Top;
topMost = form.TopMost;
borderStyle = form.FormBorderStyle;
form.WindowState = windowState;
}
开发者ID:Zulkir,项目名称:Beholder,代码行数:14,代码来源:WindowStateBuffer.cs
示例12: FormRtlLayout
public FormRtlLayout(FormBorderStyle borderStyle, Size minSize,
Icon icon, Color bgColor, string text)
{
InitializeComponent();
FormBorderStyle = borderStyle;
_minSize = minSize;
//_maxSize = maxSize;
Icon = icon;
_bgColor = bgColor;
_text = text;
//RightToLeft = RightToLeft.Yes;
//RightToLeftLayout = true;
}
开发者ID:haimon74,项目名称:KanNaim,代码行数:14,代码来源:FormRtlLayout.cs
示例13: Form
// Constructor.
public Form()
{
visible = false;
autoScale = true;
topLevel = true;
loaded=false;
borderStyle = FormBorderStyle.Sizable;
mdiChildren = new Form [0];
ownedForms = new Form [0];
opacity = 1.0;
windowFlags = ToolkitWindowFlags.Default;
formStartPosition = FormStartPosition.WindowsDefaultLocation;
windowState = FormWindowState.Normal;
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:15,代码来源:Form.cs
示例14: Show
public static ShowForm Show(Control c_,FormBorderStyle borderStyle_,Icon icon_, string title_)
{
ShowForm sf = new ShowForm();
sf.FormBorderStyle = borderStyle_;
sf.Text = title_;
sf.Create(c_);
sf.Icon = icon_;
if (icon_ == null && c_ is IFormIconProvider)
sf.Icon = ((IFormIconProvider)c_).FormIcon;
else
sf.Icon = DefaultIcon;
sf.Show();
sf.BringToFront();
return sf;
}
开发者ID:heimanhon,项目名称:researchwork,代码行数:18,代码来源:ShowForm.cs
示例15: SwitchFullscreen
public void SwitchFullscreen(FullscreenMode mode)
{
if (IsFullscreen) {
MoveToFullscreenMode(mode);
return;
}
if (!_mainForm.ThumbnailPanel.IsShowingThumbnail)
return;
//On switch, always hide side panels
_mainForm.CloseSidePanel();
//Store state
_preFullscreenLocation = _mainForm.Location;
_preFullscreenSize = _mainForm.ClientSize;
_preFullscreenBorderStyle = _mainForm.FormBorderStyle;
//Change state to fullscreen
_mainForm.FormBorderStyle = FormBorderStyle.None;
MoveToFullscreenMode(mode);
CommonCompleteSwitch(true);
}
开发者ID:Hiale,项目名称:ontopreplica,代码行数:24,代码来源:FullscreenFormManager.cs
示例16: Game1
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
this.gameForm = (Form)Form.FromHandle(this.Window.Handle);
this.defaultBorderStyle = this.gameForm.FormBorderStyle;
this.SetBorderStyle(null, null);
UserControl1.ToggleMenuWindowControlButtons += SetBorderStyle;
this.CreateNotifyicon();
graphics.PreferredBackBufferWidth = 400;
graphics.PreferredBackBufferHeight = 500;
// Create the screen manager component.
screenManager = new ScreenManager(this);
Components.Add(screenManager);
// Activate the first screens.
screenManager.AddScreen(new GamesMenuScreen(), null);
}
开发者ID:adamjarret,项目名称:Slauncha,代码行数:24,代码来源:Game1.cs
示例17: SetBorderStyle
internal override void SetBorderStyle(IntPtr handle, FormBorderStyle border_style)
{
Form form = Control.FromHandle (handle) as Form;
if (form != null && form.window_manager == null) {
CreateParams cp = form.GetCreateParams ();
if (border_style == FormBorderStyle.FixedToolWindow ||
border_style == FormBorderStyle.SizableToolWindow ||
cp.IsSet (WindowExStyles.WS_EX_TOOLWINDOW)) {
form.window_manager = new ToolWindowManager (form);
}
}
RequestNCRecalc(handle);
}
开发者ID:nlhepler,项目名称:mono,代码行数:14,代码来源:XplatUIX11.cs
示例18: BeginScreenDeviceChange
/// <inheritdoc />
public override void BeginScreenDeviceChange(bool willBeFullScreen)
{
if (gameForm != null)
oldClientSize = gameForm.ClientSize;
if (willBeFullScreen && !isFullScreenMaximized && gameForm != null)
{
savedFormBorderStyle = gameForm.FormBorderStyle;
savedWindowState = gameForm.WindowState;
savedBounds = gameForm.Bounds;
if (gameForm.WindowState == FormWindowState.Maximized)
savedRestoreBounds = gameForm.RestoreBounds;
}
if (willBeFullScreen != isFullScreenMaximized)
{
deviceChangeChangedVisible = true;
oldVisible = Visible;
Visible = false;
if (gameForm != null)
gameForm.SendToBack();
}
else
{
deviceChangeChangedVisible = false;
}
if (!willBeFullScreen && isFullScreenMaximized && gameForm != null)
{
gameForm.TopMost = false;
gameForm.FormBorderStyle = savedFormBorderStyle;
}
deviceChangeWillBeFullScreen = willBeFullScreen;
}
开发者ID:Keldrim,项目名称:SharpDX,代码行数:36,代码来源:GameWindowDesktop.cs
示例19: _Save
private void _Save(Form targetForm)
{
_BrdStyle = targetForm.FormBorderStyle;
_Bounds = targetForm.Bounds;
}
开发者ID:OpenJinglePlayer,项目名称:OpenJinglePlayer,代码行数:5,代码来源:VideoWindow.cs
示例20: InitializeEnvironment
/// <summary>
/// Initialize the graphics environment
/// </summary>
void InitializeEnvironment(bool fullScreen)
{
// Save normal form settings (or initial settings when starting up minimized/maximized)
if (!mFullScreen)
{
// Save form setting only when window state is normal
if (ParentForm.WindowState == FormWindowState.Normal
|| mFormRectangle.Size == new Size())
{
mFormBorderStyle = ParentForm.FormBorderStyle;
mFormRectangle.Location = ParentForm.Location;
mFormRectangle.Size = ParentForm.Size;
mFormMainMenu = ParentForm.Menu;
mFormVisible = ParentForm.Visible;
}
// Always save control settings before entering full screen mode
mControlRectangle.Location = this.Location;
mControlRectangle.Size = this.Size;
mControlVisible = this.Visible;
}
// Delete old Dx object
DeleteDirectxDevice();
// If switching from full screen mode to windowed mode, restore control and form scale
if (mFullScreen && !fullScreen)
{
// We need to force a redraw so the form is the correct size,
// and is not hidden by the task bar. Display a black form
// while doing this, so there is not as much annoying flicker.
Form blackForm = new Form();
blackForm.WindowState = FormWindowState.Maximized;
blackForm.ControlBox = false;
blackForm.MinimizeBox = false;
blackForm.MinimizeBox = false;
blackForm.ShowInTaskbar = false;
blackForm.BackColor = Color.Black;
blackForm.Show();
ParentForm.Visible = false;
// Restore form parameters
ParentForm.FormBorderStyle = mFormBorderStyle;
ParentForm.Location = mFormRectangle.Location;
ParentForm.Size = mFormRectangle.Size;
if (mFormMainMenu != null)
ParentForm.Menu = mFormMainMenu;
// Restore control parameters
Location = mControlRectangle.Location;
Size = mControlRectangle.Size;
Visible = mControlVisible;
// Restore owned forms
if (mFormOwnedForms != null)
for (int i = 0; i < mFormOwnedForms.Length; i++)
{
mFormOwnedForms[i].Owner = ParentForm;
mFormOwnedForms[i].BringToFront();
}
mFormOwnedForms = null;
// Display this form, and close the black form
ParentForm.Visible = mFormVisible;
ParentForm.BringToFront();
blackForm.Close();
}
GraphicsAdapterInfo adapterInfo = mGraphicsSettings.AdapterInfo;
GraphicsDeviceInfo deviceInfo = mGraphicsSettings.DeviceInfo;
// Set new full screen mode
//bool oldFullScreenMode = mFullScreen;
mFullScreen = fullScreen;
mGraphicsSettings.IsWindowed = !fullScreen;
// Set up presentation parameters from current settings
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = mGraphicsSettings.IsWindowed;
presentParams.MultiSample = mGraphicsSettings.MultisampleType;
presentParams.MultiSampleQuality = mGraphicsSettings.MultisampleQuality;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.EnableAutoDepthStencil = mEnumerationSettings.AppUsesDepthBuffer;
presentParams.AutoDepthStencilFormat = mGraphicsSettings.DepthStencilBufferFormat;
// If doing 2D graphics, allow a lockable back buffer.
if (this.DxRender2d == null)
presentParams.PresentFlag = PresentFlag.None;
else
presentParams.PresentFlag = PresentFlag.LockableBackBuffer;
if (!mFullScreen)
{
// Windowed mode parameters
presentParams.BackBufferCount = 1; // One back buffer OK
presentParams.BackBufferWidth = ClientRectangle.Right - ClientRectangle.Left;
presentParams.BackBufferHeight = ClientRectangle.Bottom - ClientRectangle.Top;
presentParams.BackBufferFormat = mGraphicsSettings.DeviceCombo.BackBufferFormat;
presentParams.FullScreenRefreshRateInHz = 0;
//.........这里部分代码省略.........
开发者ID:kasertim,项目名称:sentience,代码行数:101,代码来源:Direct3d.cs
注:本文中的FormBorderStyle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论