Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Visual Basic, Italics
New Posts  All Forums:Forum Nav:

Visual Basic, Italics

post #1 of 2
Thread Starter 
Hey, I am trying to make a certein variable have italics when i display it in a RichTextBox. However i only want the 1 Varaible to be in Italics and the rest the remain the same
Code:
Dim j As String = jj.Text
        Dim k As String = kk.Text
        Dim m As String = mm.Text
        Dim l As String = ll.Text
        Dim p As String = pp.Text

        RTB1.Text = j+ ", " + k+ ", " + m+ ", " + l+ ", " + p

So i want 'm' to be in Italics but the others just normal, Any help =D
Getting there
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k Asrock Extreme3 Gen 3 Inno3D GTX 460SE 8GB G. Skill Sniper 1333 
Hard DriveHard DriveOptical DriveCooling
Seagate Seagate DVD-CD Burner Stock Intel cooler 
OSMonitorKeyboardPower
Windows 7 Pro x64 21.5" LG Leopold (Brown) Corsair TX650W 
CaseMouseMouse Pad
Coolermaster CM690 Advance II Thermaltake Black Element Thermaltake Conkor 
  hide details  
Reply
Getting there
(15 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k Asrock Extreme3 Gen 3 Inno3D GTX 460SE 8GB G. Skill Sniper 1333 
Hard DriveHard DriveOptical DriveCooling
Seagate Seagate DVD-CD Burner Stock Intel cooler 
OSMonitorKeyboardPower
Windows 7 Pro x64 21.5" LG Leopold (Brown) Corsair TX650W 
CaseMouseMouse Pad
Coolermaster CM690 Advance II Thermaltake Black Element Thermaltake Conkor 
  hide details  
Reply
post #2 of 2
Not the best way, but works.
Code:

        Dim j As String = "AAAA"
        Dim k As String = "BBBB"
        Dim m As String = "CCCC"
        Dim l As String = "DDDD"
        Dim p As String = "EEEE"

        RTB1.Text = j + ", " + k + ", " + m + ", " + l + ", " + p
        RTB1.SelectionStart = (j + ", " + k + ", ").Length
        RTB1.SelectionLength = m.Length
        RTB1.SelectionFont = New Font(RTB1.Font.Name, RTB1.Font.Size, FontStyle.Italic)

My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASUS - P8Z68-V/GEN3 GTX 770 DDR3 - 8G 
Hard DriveOSMonitorPower
WD Green Win 7 x64 Dell ST2320L Corsair 750TX 
CaseMouse
Coolermaster 310 Logitech G502 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500k ASUS - P8Z68-V/GEN3 GTX 770 DDR3 - 8G 
Hard DriveOSMonitorPower
WD Green Win 7 x64 Dell ST2320L Corsair 750TX 
CaseMouse
Coolermaster 310 Logitech G502 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Visual Basic, Italics