RichTextBox1.font.size = combobox1.text ' not workin
This post has been edited by Yaroslav94: 23 July 2009 - 05:45 AM




2 Votes
Posted 22 July 2009 - 04:48 PM
RichTextBox1.font.size = combobox1.text ' not workin
This post has been edited by Yaroslav94: 23 July 2009 - 05:45 AM
Posted 22 July 2009 - 05:23 PM
Posted 22 July 2009 - 05:34 PM
Richtextbox1.Font = New Font(ComboBox1.SelectedItem, ComboBox2.SelectedItem, ComboBox3.SelectedItem)
This post has been edited by PDUNZ: 22 July 2009 - 05:37 PM
Posted 22 July 2009 - 05:39 PM
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Richtextbox1.Font = New Font(ComboBox1.SelectedItem, ComboBox2.SelectedItem, ComboBox3.SelectedItem) End Sub
This post has been edited by PDUNZ: 22 July 2009 - 05:40 PM
Posted 22 July 2009 - 05:40 PM
PDUNZ, on 22 Jul, 2009 - 04:34 PM, said:
Richtextbox1.Font = New Font(ComboBox1.SelectedItem, ComboBox2.SelectedItem, ComboBox3.SelectedItem)
Error 1 Overload resolution failed because no accessible 'New' can be called without a narrowing conversion: 'Public Sub New(familyName As String, emSize As Single, unit As System.Drawing.GraphicsUnit)': Argument matching parameter 'emSize' narrows from 'String' to 'Single'. 'Public Sub New(familyName As String, emSize As Single, unit As System.Drawing.GraphicsUnit)': Argument matching parameter 'unit' narrows from 'String' to 'System.Drawing.GraphicsUnit'. 'Public Sub New(familyName As String, emSize As Single, style As System.Drawing.FontStyle)': Argument matching parameter 'emSize' narrows from 'String' to 'Single'. 'Public Sub New(familyName As String, emSize As Single, style As System.Drawing.FontStyle)': Argument matching parameter 'style' narrows from 'String' to 'System.Drawing.FontStyle'. C:\Users\zzz\AppData\Local\Temporary Projects\zzz\Form1.vb 40 29 zzz
Posted 22 July 2009 - 06:11 PM
This post has been edited by PDUNZ: 22 July 2009 - 06:20 PM
Posted 22 July 2009 - 06:27 PM
RichTextBox1.font.size = combobox1.text
Quote
rtb.Font = New Font(cmbFName.SelectedItem.ToString, CSng(cmbFSize.SelectedItem))
Private Sub cmbFStyle_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbFStyle.SelectedIndexChanged Dim theStyle As FontStyle = FontStyle.Regular Select Case cmbFStyle.SelectedIndex Case 0 theStyle = FontStyle.Regular Case 1 theStyle = FontStyle.Bold Case 2 theStyle = FontStyle.Italic Case 3 theStyle = FontStyle.Underline Case 4 theStyle = FontStyle.Strikeout End Select rtb.Font = New Font(cmbFName.SelectedItem.ToString, CInt(cmbFSize.SelectedItem), theStyle) End Sub
theStyle = FontStyle.Bold Or FontStyle.Underline
This post has been edited by LoveIsNull: 22 July 2009 - 06:31 PM
Posted 22 July 2009 - 06:38 PM
Posted 22 July 2009 - 06:56 PM
Posted 23 July 2009 - 03:08 PM
Quote
Quote
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
