本文整理匯總了Python中System.Windows.Forms.Form.FormBorderStyle方法的典型用法代碼示例。如果您正苦於以下問題:Python Form.FormBorderStyle方法的具體用法?Python Form.FormBorderStyle怎麽用?Python Form.FormBorderStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.Form
的用法示例。
在下文中一共展示了Form.FormBorderStyle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: EditValue
# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import FormBorderStyle [as 別名]
def EditValue(self, context, provider, value) :
service = provider.GetService(clr.GetClrType(IWindowsFormsEditorService))
if service != None :
from System.Windows.Forms import Form, TextBox, FormBorderStyle, DockStyle, DialogResult
tb = TextBox()
tb.Multiline = True
tb.Text = value
f = Form()
f.Controls.Add(tb)
f.FormBorderStyle = FormBorderStyle.None
f.TopLevel = False
tb.Dock = DockStyle.Fill
service.DropDownControl(f)
value = tb.Text
return value
示例2: import
# 需要導入模塊: from System.Windows.Forms import Form [as 別名]
# 或者: from System.Windows.Forms.Form import FormBorderStyle [as 別名]
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Windows.Forms import (
Application, Form,
FormBorderStyle, Label
)
from System.Drawing import (
Color, Font, FontStyle, Point
)
form = Form()
form.Text = "Hello World"
form.FormBorderStyle = FormBorderStyle.Fixed3D
form.Height = 150
newFont = Font("Verdana", 16,
FontStyle.Bold | FontStyle.Italic)
label = Label()
label.AutoSize = True
label.Text = "My Hello World Label"
label.Font = newFont
label.BackColor = Color.Aquamarine
label.ForeColor = Color.DarkMagenta
label.Location = Point(10, 50)
form.Controls.Add(label)
Application.Run(form)