suche fontdialog für privatefontcollection

  • VB.NET

Es gibt 4 Antworten in diesem Thema. Der letzte Beitrag () ist von ~blaze~.

    Wie wäre es mit selber machen?
    Eine RichTextBox zur Anzeige eines Textbeispiels für den Font
    Eine ComboBox für die Namen der Fonts, ==> SelectedIndexChange ==> RichTextBox updaten
    und einen Button zur Übernahme.
    5 Minuten Programmierung, die meiste Zeit geht drauf, den Dialog gut aussehen zu lassen.
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    Programmierfragen über PN / Konversation werden ignoriert!
    Vielleicht so (Font kann leider nicht geerbt werden):

    VB.NET-Quellcode

    1. Public Class MyFont
    2. Public Property Font As Font
    3. Public Overrides Function ToString() As String
    4. Return "MyFontString"
    5. End Function
    6. End Class
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    Programmierfragen über PN / Konversation werden ignoriert!
    Hi
    schau dir mal folgenden Code durch. Bitte kopier ihn aber nicht einfach nur, sondern versuche auch, ihn zu verstehen.
    Spoiler anzeigen

    Quellcode

    1. Public Class CustomFontDialogForm
    2. Inherits Form
    3. 'Standardnamen fuer Stile
    4. Private Shared ReadOnly strStyleNames() As String = New String() {"Regular", "Bold", "Italic", "Bold, Italic"}
    5. 'Um unnoetigen Updates vorzubeugen
    6. Private bUpdateFont As Boolean
    7. 'momentan ausgewaehlte Font-Familie
    8. Private ffSelectedFontFamily As FontFamily
    9. 'momentan ausgewaehlte Schriftgroesse
    10. Private sngSize As Single
    11. 'momentan ausgewaehlter Stil
    12. Private fsFontStyle As FontStyle
    13. 'Setze die angezeigten Schriftarten
    14. Public Sub SetFonts(ByVal fonts As IEnumerable(Of FontFamily))
    15. Dim sz As Single = lbFont.Font.Size
    16. lbFont.BeginUpdate()
    17. lbFont.Items.Clear()
    18. For Each f As FontFamily In fonts
    19. 'Alle anzuzeigenden Schriftarten unter Verwendung der durch die lbFont.Font.Size-Eigenschaft
    20. 'definierte Schriftgroesse in die lbFont-ListBox einreihen
    21. lbFont.Items.Add(New Font(f, sz, GetDefaultStyle(f)))
    22. Next
    23. lbFont.EndUpdate()
    24. End Sub
    25. 'Gibt den Standardstil der Schriftartenfamilie an, die zum Anzeigen in der Liste verwendet wird
    26. Protected Overridable Function GetDefaultStyle(ByVal font As FontFamily) As FontStyle
    27. If font.IsStyleAvailable(FontStyle.Regular) Then
    28. Return FontStyle.Regular
    29. ElseIf font.IsStyleAvailable(FontStyle.Bold) Then
    30. Return FontStyle.Bold
    31. ElseIf font.IsStyleAvailable(FontStyle.Italic) Then
    32. Return FontStyle.Italic
    33. ElseIf font.IsStyleAvailable(FontStyle.Italic Or FontStyle.Bold) Then
    34. Return FontStyle.Italic Or FontStyle.Bold
    35. Else
    36. Throw New NotSupportedException()
    37. End If
    38. End Function
    39. 'Setzt den aktuell gewaehlten Font
    40. Public Sub SetSelectedFont(ByVal font As Font)
    41. Dim tmp As Integer = -1
    42. bUpdateFont = True
    43. 'ausgewaehlte Schriftart finden und setzen
    44. For i As Integer = 0 To lbFont.Items.Count - 1
    45. If font.FontFamily.Name = DirectCast(lbFont.Items(i), Font).Name Then
    46. tmp = i
    47. Exit For
    48. End If
    49. Next
    50. lbFont.SelectedIndex = tmp
    51. 'Bold und Italic in der Style-ListBox setzen
    52. lbStyle.SelectedIndex = lbStyle.Items.IndexOf(font.Style And (FontStyle.Bold Or FontStyle.Italic Or FontStyle.Regular))
    53. tmp = lbStyle.Items.IndexOf(font.Size) 'Ermitteln, ob die Schriftgroesse in der Liste eingetragen ist
    54. 'entsprechend reagieren
    55. If tmp <> -1 Then
    56. cbTypeSize.SelectedIndex = tmp
    57. Else
    58. cbTypeSize.Text = font.Size.ToString()
    59. End If
    60. cbStrikeout.Checked = font.Strikeout
    61. cbUnderline.Checked = font.Underline
    62. bUpdateFont = False
    63. UpdateFont()
    64. End Sub
    65. Public Function GetSelectedFont() As Font
    66. Return New Font(ffSelectedFontFamily, sngSize, fsFontStyle)
    67. End Function
    68. Private Sub UpdateFont()
    69. If Not bUpdateFont Then
    70. Dim df As Font = SystemFonts.DefaultFont
    71. bUpdateFont = True
    72. 'Ungueltige Eingaben abfangen und entsprechend reagieren
    73. If sngSize = 0.0 Then
    74. sngSize = df.Size
    75. End If
    76. If lbFont.Items.Count = 0 Then
    77. SetFonts(FontFamily.Families)
    78. lbFont.SelectedIndex = lbFont.Items.IndexOf(df)
    79. ElseIf lbFont.SelectedIndex = -1 Then
    80. lbFont.SelectedIndex = Math.Max(0, lbFont.Items.IndexOf(df))
    81. End If
    82. If lbStyle.SelectedIndex = -1 Then
    83. lbStyle.SelectedIndex = 0
    84. End If
    85. If cbTypeSize.SelectedIndex = -1 AndAlso String.IsNullOrEmpty(cbTypeSize.Text) Then
    86. cbTypeSize.Text = df.Size.ToString()
    87. End If
    88. 'Beispiel-Label updaten
    89. lblExample.Font = New Font(ffSelectedFontFamily, sngSize, fsFontStyle)
    90. bUpdateFont = False
    91. End If
    92. End Sub
    93. Protected Overrides Sub OnVisibleChanged(ByVal e As System.EventArgs)
    94. 'Bei Sichtbarmachung Schriftart updaten
    95. If Visible Then UpdateFont()
    96. MyBase.OnVisibleChanged(e)
    97. End Sub
    98. Public Sub New()
    99. InitializeComponent()
    100. End Sub
    101. Private Sub lbFont_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lbFont.DrawItem
    102. Dim item As Font = DirectCast(lbFont.Items(e.Index), Font)
    103. e.DrawBackground()
    104. TextRenderer.DrawText(e.Graphics, lbFont.GetItemText(item), item, e.Bounds, e.ForeColor, TextFormatFlags.Left Or TextFormatFlags.VerticalCenter)
    105. If (e.State And DrawItemState.Focus) = DrawItemState.Focus Then
    106. e.DrawFocusRectangle()
    107. End If
    108. End Sub
    109. Private Sub lbFont_Format(ByVal sender As Object, ByVal e As System.Windows.Forms.ListControlConvertEventArgs) Handles lbFont.Format
    110. If e.DesiredType Is GetType(String) Then
    111. e.Value = DirectCast(e.ListItem, Font).Name
    112. End If
    113. End Sub
    114. Private Sub lbFont_MeasureItem(ByVal sender As Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles lbFont.MeasureItem
    115. Dim item As Font = DirectCast(lbFont.Items(e.Index), Font)
    116. Dim sz As Size = TextRenderer.MeasureText(lbFont.GetItemText(item), item)
    117. e.ItemHeight = sz.Height
    118. e.ItemWidth = sz.Width
    119. End Sub
    120. Private Sub lbFont_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbFont.SelectedIndexChanged
    121. 'Unterstuetzte Optionen bei einer Aenderung der Schriftart updaten
    122. ffSelectedFontFamily = DirectCast(lbFont.SelectedItem, Font).FontFamily
    123. bUpdateFont = True
    124. cbStrikeout.Checked = cbStrikeout.Checked AndAlso ffSelectedFontFamily.IsStyleAvailable(FontStyle.Strikeout)
    125. cbUnderline.Checked = cbUnderline.Checked AndAlso ffSelectedFontFamily.IsStyleAvailable(FontStyle.Underline)
    126. lbStyle.BeginUpdate()
    127. lbStyle.Items.Clear()
    128. 'Von Schriftarten unterstuetzte Stile hinzufuegen
    129. If ffSelectedFontFamily.IsStyleAvailable(FontStyle.Regular) Then
    130. lbStyle.Items.Add(FontStyle.Regular)
    131. End If
    132. If ffSelectedFontFamily.IsStyleAvailable(FontStyle.Bold) Then
    133. lbStyle.Items.Add(FontStyle.Bold)
    134. End If
    135. If ffSelectedFontFamily.IsStyleAvailable(FontStyle.Italic) Then
    136. lbStyle.Items.Add(FontStyle.Italic)
    137. End If
    138. If ffSelectedFontFamily.IsStyleAvailable(FontStyle.Bold Or FontStyle.Italic) Then
    139. lbStyle.Items.Add(FontStyle.Bold Or FontStyle.Italic)
    140. End If
    141. 'Ueberpruefen, ob der aktuell gewaehlte Stil unterstuetzt wird
    142. If ffSelectedFontFamily.IsStyleAvailable(fsFontStyle) Then
    143. Dim ind As Integer = lbStyle.Items.IndexOf(fsFontStyle And (FontStyle.Bold Or FontStyle.Italic Or FontStyle.Regular))
    144. lbStyle.SelectedIndex = ind
    145. Else
    146. fsFontStyle = DirectCast(lbStyle.Items(0), FontStyle)
    147. End If
    148. lbStyle.EndUpdate()
    149. bUpdateFont = False
    150. UpdateFont()
    151. End Sub
    152. Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
    153. DialogResult = Windows.Forms.DialogResult.Cancel
    154. Close()
    155. End Sub
    156. Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
    157. DialogResult = Windows.Forms.DialogResult.OK
    158. Close()
    159. End Sub
    160. Private Sub lbStyle_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lbStyle.DrawItem
    161. Dim fs As FontStyle = DirectCast(lbStyle.Items(e.Index), FontStyle)
    162. e.DrawBackground()
    163. TextRenderer.DrawText(e.Graphics, strStyleNames(CInt(fs)), New Font(ffSelectedFontFamily, e.Font.Size, fs), e.Bounds, e.ForeColor, TextFormatFlags.Left Or TextFormatFlags.VerticalCenter)
    164. End Sub
    165. Private Sub lbStyle_MeasureItem(ByVal sender As Object, ByVal e As System.Windows.Forms.MeasureItemEventArgs) Handles lbStyle.MeasureItem
    166. Dim fs As FontStyle = DirectCast(lbStyle.Items(e.Index), FontStyle)
    167. Dim sz As Size = TextRenderer.MeasureText(e.Graphics, strStyleNames(CInt(fs)), New Font(ffSelectedFontFamily, lbStyle.Font.Size, fs))
    168. e.ItemWidth = sz.Width
    169. e.ItemHeight = sz.Height
    170. End Sub
    171. Private Sub Style_Changed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbStyle.SelectedIndexChanged, cbStrikeout.CheckedChanged, cbUnderline.CheckedChanged
    172. 'Stil und Stilunterstuetzung updaten
    173. Dim fs As FontStyle = DirectCast(lbStyle.SelectedItem, FontStyle)
    174. If cbStrikeout.Checked Then
    175. fs = fs Or FontStyle.Strikeout
    176. End If
    177. If cbUnderline.Checked Then
    178. fs = fs Or FontStyle.Underline
    179. End If
    180. fsFontStyle = fs
    181. cbStrikeout.Enabled = ffSelectedFontFamily.IsStyleAvailable(fs Or FontStyle.Underline)
    182. cbStrikeout.Enabled = ffSelectedFontFamily.IsStyleAvailable(fs Or FontStyle.Strikeout)
    183. UpdateFont()
    184. End Sub
    185. Private Sub cbTypeSize_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbTypeSize.TextChanged
    186. cbTypeSize.BackColor = SystemColors.Window 'Farbaenderung bei Fehleingabe rueckgaengig machen
    187. End Sub
    188. Private Sub cbTypeSize_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbTypeSize.SelectedIndexChanged, cbTypeSize.Validated
    189. Dim sz As Single
    190. If Single.TryParse(cbTypeSize.Text, sz) AndAlso sngSize > 0.0F Then
    191. sngSize = sz
    192. UpdateFont()
    193. Else
    194. cbTypeSize.BackColor = Color.LightSalmon
    195. System.Media.SystemSounds.Beep.Play()
    196. cbTypeSize.Select()
    197. End If
    198. End Sub
    199. Private Sub cbTypeSize_Validating(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles cbTypeSize.Validating
    200. Dim sng As Single
    201. 'ungueltige Eingaben abfangen
    202. If Not Single.TryParse(cbTypeSize.Text, sng) OrElse sng <= 0.0F Then
    203. cbTypeSize.BackColor = Color.LightSalmon
    204. System.Media.SystemSounds.Beep.Play()
    205. e.Cancel = True
    206. End If
    207. End Sub
    208. #Region "Designer generated"
    209. Private WithEvents lblTypeSize As System.Windows.Forms.Label
    210. Private WithEvents lblExample As System.Windows.Forms.Label
    211. Private WithEvents btnCancel As System.Windows.Forms.Button
    212. Private WithEvents btnOK As System.Windows.Forms.Button
    213. Private WithEvents gpExample As System.Windows.Forms.GroupBox
    214. Private WithEvents gbEffect As System.Windows.Forms.GroupBox
    215. Private WithEvents cbTypeSize As System.Windows.Forms.ComboBox
    216. Private WithEvents lbStyle As System.Windows.Forms.ListBox
    217. Private WithEvents lblFontStyle As System.Windows.Forms.Label
    218. Private WithEvents lblFont As System.Windows.Forms.Label
    219. Friend WithEvents cbStrikeout As System.Windows.Forms.CheckBox
    220. Friend WithEvents cbUnderline As System.Windows.Forms.CheckBox
    221. Private WithEvents lbFont As System.Windows.Forms.ListBox
    222. Private Sub InitializeComponent()
    223. Me.lbFont = New System.Windows.Forms.ListBox()
    224. Me.lblFont = New System.Windows.Forms.Label()
    225. Me.lblFontStyle = New System.Windows.Forms.Label()
    226. Me.lbStyle = New System.Windows.Forms.ListBox()
    227. Me.cbTypeSize = New System.Windows.Forms.ComboBox()
    228. Me.lblTypeSize = New System.Windows.Forms.Label()
    229. Me.gbEffect = New System.Windows.Forms.GroupBox()
    230. Me.cbStrikeout = New System.Windows.Forms.CheckBox()
    231. Me.cbUnderline = New System.Windows.Forms.CheckBox()
    232. Me.gpExample = New System.Windows.Forms.GroupBox()
    233. Me.lblExample = New System.Windows.Forms.Label()
    234. Me.btnOK = New System.Windows.Forms.Button()
    235. Me.btnCancel = New System.Windows.Forms.Button()
    236. Me.gbEffect.SuspendLayout()
    237. Me.gpExample.SuspendLayout()
    238. Me.SuspendLayout()
    239. '
    240. 'lbFont
    241. '
    242. Me.lbFont.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
    243. Or System.Windows.Forms.AnchorStyles.Left) _
    244. Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    245. Me.lbFont.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable
    246. Me.lbFont.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    247. Me.lbFont.FormattingEnabled = True
    248. Me.lbFont.Location = New System.Drawing.Point(12, 28)
    249. Me.lbFont.Name = "lbFont"
    250. Me.lbFont.Size = New System.Drawing.Size(164, 118)
    251. Me.lbFont.TabIndex = 0
    252. '
    253. 'lblFont
    254. '
    255. Me.lblFont.AutoSize = True
    256. Me.lblFont.Location = New System.Drawing.Point(12, 12)
    257. Me.lblFont.Name = "lblFont"
    258. Me.lblFont.Size = New System.Drawing.Size(31, 13)
    259. Me.lblFont.TabIndex = 7
    260. Me.lblFont.Text = "Font:"
    261. '
    262. 'lblFontStyle
    263. '
    264. Me.lblFontStyle.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    265. Me.lblFontStyle.AutoSize = True
    266. Me.lblFontStyle.Location = New System.Drawing.Point(182, 12)
    267. Me.lblFontStyle.Name = "lblFontStyle"
    268. Me.lblFontStyle.Size = New System.Drawing.Size(33, 13)
    269. Me.lblFontStyle.TabIndex = 8
    270. Me.lblFontStyle.Text = "Style:"
    271. '
    272. 'lbStyle
    273. '
    274. Me.lbStyle.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
    275. Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    276. Me.lbStyle.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable
    277. Me.lbStyle.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
    278. Me.lbStyle.FormattingEnabled = True
    279. Me.lbStyle.Location = New System.Drawing.Point(182, 28)
    280. Me.lbStyle.Name = "lbStyle"
    281. Me.lbStyle.Size = New System.Drawing.Size(169, 118)
    282. Me.lbStyle.TabIndex = 1
    283. '
    284. 'cbTypeSize
    285. '
    286. Me.cbTypeSize.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
    287. Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    288. Me.cbTypeSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
    289. Me.cbTypeSize.FormattingEnabled = True
    290. Me.cbTypeSize.Items.AddRange(New Object() {"8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24", "26", "28", "36", "48", "72"})
    291. Me.cbTypeSize.Location = New System.Drawing.Point(360, 28)
    292. Me.cbTypeSize.Name = "cbTypeSize"
    293. Me.cbTypeSize.Size = New System.Drawing.Size(39, 133)
    294. Me.cbTypeSize.TabIndex = 2
    295. '
    296. 'lblTypeSize
    297. '
    298. Me.lblTypeSize.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    299. Me.lblTypeSize.AutoSize = True
    300. Me.lblTypeSize.Location = New System.Drawing.Point(357, 12)
    301. Me.lblTypeSize.Name = "lblTypeSize"
    302. Me.lblTypeSize.Size = New System.Drawing.Size(55, 13)
    303. Me.lblTypeSize.TabIndex = 9
    304. Me.lblTypeSize.Text = "Type size:"
    305. '
    306. 'gbEffect
    307. '
    308. Me.gbEffect.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
    309. Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    310. Me.gbEffect.Controls.Add(Me.cbStrikeout)
    311. Me.gbEffect.Controls.Add(Me.cbUnderline)
    312. Me.gbEffect.Location = New System.Drawing.Point(12, 164)
    313. Me.gbEffect.Name = "gbEffect"
    314. Me.gbEffect.Size = New System.Drawing.Size(199, 101)
    315. Me.gbEffect.TabIndex = 10
    316. Me.gbEffect.TabStop = False
    317. Me.gbEffect.Text = "Effect"
    318. '
    319. 'cbStrikeout
    320. '
    321. Me.cbStrikeout.AutoSize = True
    322. Me.cbStrikeout.Location = New System.Drawing.Point(6, 19)
    323. Me.cbStrikeout.Name = "cbStrikeout"
    324. Me.cbStrikeout.Size = New System.Drawing.Size(71, 17)
    325. Me.cbStrikeout.TabIndex = 3
    326. Me.cbStrikeout.Text = "Strike out"
    327. Me.cbStrikeout.UseVisualStyleBackColor = True
    328. '
    329. 'cbUnderline
    330. '
    331. Me.cbUnderline.AutoSize = True
    332. Me.cbUnderline.Location = New System.Drawing.Point(6, 42)
    333. Me.cbUnderline.Name = "cbUnderline"
    334. Me.cbUnderline.Size = New System.Drawing.Size(71, 17)
    335. Me.cbUnderline.TabIndex = 4
    336. Me.cbUnderline.Text = "Underline"
    337. Me.cbUnderline.UseVisualStyleBackColor = True
    338. '
    339. 'gpExample
    340. '
    341. Me.gpExample.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    342. Me.gpExample.Controls.Add(Me.lblExample)
    343. Me.gpExample.Location = New System.Drawing.Point(217, 164)
    344. Me.gpExample.Name = "gpExample"
    345. Me.gpExample.Size = New System.Drawing.Size(200, 101)
    346. Me.gpExample.TabIndex = 11
    347. Me.gpExample.TabStop = False
    348. Me.gpExample.Text = "Example"
    349. '
    350. 'lblExample
    351. '
    352. Me.lblExample.Dock = System.Windows.Forms.DockStyle.Fill
    353. Me.lblExample.Location = New System.Drawing.Point(3, 16)
    354. Me.lblExample.Name = "lblExample"
    355. Me.lblExample.Size = New System.Drawing.Size(194, 82)
    356. Me.lblExample.TabIndex = 12
    357. Me.lblExample.Text = "AaBbYyZz"
    358. Me.lblExample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
    359. '
    360. 'btnOK
    361. '
    362. Me.btnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    363. Me.btnOK.Location = New System.Drawing.Point(337, 277)
    364. Me.btnOK.Name = "btnOK"
    365. Me.btnOK.Size = New System.Drawing.Size(75, 23)
    366. Me.btnOK.TabIndex = 6
    367. Me.btnOK.Text = "&OK"
    368. Me.btnOK.UseVisualStyleBackColor = True
    369. '
    370. 'btnCancel
    371. '
    372. Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    373. Me.btnCancel.Location = New System.Drawing.Point(256, 277)
    374. Me.btnCancel.Name = "btnCancel"
    375. Me.btnCancel.Size = New System.Drawing.Size(75, 23)
    376. Me.btnCancel.TabIndex = 5
    377. Me.btnCancel.Text = "&Cancel"
    378. Me.btnCancel.UseVisualStyleBackColor = True
    379. '
    380. 'CustomFontDialogForm
    381. '
    382. Me.ClientSize = New System.Drawing.Size(424, 312)
    383. Me.Controls.Add(Me.btnCancel)
    384. Me.Controls.Add(Me.btnOK)
    385. Me.Controls.Add(Me.gpExample)
    386. Me.Controls.Add(Me.gbEffect)
    387. Me.Controls.Add(Me.cbTypeSize)
    388. Me.Controls.Add(Me.lblTypeSize)
    389. Me.Controls.Add(Me.lblFontStyle)
    390. Me.Controls.Add(Me.lbStyle)
    391. Me.Controls.Add(Me.lblFont)
    392. Me.Controls.Add(Me.lbFont)
    393. Me.MaximizeBox = False
    394. Me.MinimizeBox = False
    395. Me.MinimumSize = New System.Drawing.Size(440, 350)
    396. Me.Name = "CustomFontDialogForm"
    397. Me.ShowIcon = False
    398. Me.Text = "Select font..."
    399. Me.gbEffect.ResumeLayout(False)
    400. Me.gbEffect.PerformLayout()
    401. Me.gpExample.ResumeLayout(False)
    402. Me.ResumeLayout(False)
    403. Me.PerformLayout()
    404. End Sub
    405. #End Region
    406. End Class


    Gruß
    ~blaze~