Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. CHANGE FORMAT OF STIRNG

CHANGE FORMAT OF STIRNG

Scheduled Pinned Locked Moved Visual Basic
help
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr kilany
    wrote on last edited by
    #1

    dear all if i have : dim s as string="Welcome" and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how please help me to change the format of string

    kilany

    C P O 3 Replies Last reply
    0
    • M Mr kilany

      dear all if i have : dim s as string="Welcome" and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how please help me to change the format of string

      kilany

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Mr kilany wrote:

      and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how

      This is nothing to do with the format of the string. It is all to do with where you want to display the string. So, in order to answer your question we need to know where you want your string displayed.


      Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

      1 Reply Last reply
      0
      • M Mr kilany

        dear all if i have : dim s as string="Welcome" and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how please help me to change the format of string

        kilany

        P Offline
        P Offline
        PavanPareta
        wrote on last edited by
        #3

        its depend on the where do you want to print this variable. if you r displaying on label then you can set your own format like font name, font size, color etc.:)

        Pavan Pareta

        M 1 Reply Last reply
        0
        • P PavanPareta

          its depend on the where do you want to print this variable. if you r displaying on label then you can set your own format like font name, font size, color etc.:)

          Pavan Pareta

          M Offline
          M Offline
          Mr kilany
          wrote on last edited by
          #4

          if i have list view as : dim i1 as listviewitem if k=1 i1=new listviewitem("hi") else i1=new listviewitem("hi") end if listview1.item.add(i1) i need in the case (1) if k=1 add to listview hi as red color but if k<> 1 add it to listview1 hi as blue could you help me?

          kilany

          L 1 Reply Last reply
          0
          • M Mr kilany

            if i have list view as : dim i1 as listviewitem if k=1 i1=new listviewitem("hi") else i1=new listviewitem("hi") end if listview1.item.add(i1) i need in the case (1) if k=1 add to listview hi as red color but if k<> 1 add it to listview1 hi as blue could you help me?

            kilany

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            hi, if k=1 i1=new listviewitem("hi") i1.forecolor=color.red else i1=new listviewitem("hi") i1.forecolor=color.blue end if listview1.item.add(i1)

            Mohamad A. Flefel mflefel@hotmail.com +962 79 5963865 C#.net & VB.net Developer

            1 Reply Last reply
            0
            • M Mr kilany

              dear all if i have : dim s as string="Welcome" and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how please help me to change the format of string

              kilany

              O Offline
              O Offline
              Oskar net
              wrote on last edited by
              #6

              Strange question my friend...Strings are no more than a collection of characters, String Data Type do not have format. Display format is applied in visual controls like Labels, TextBoxes, RTFs.... Try creating a new Font object and setting it in the Font property of the visual control. Also, you can edit the font properties of the control in the VS .NET Designer

              ----------------- Solo hay 10 tipos de personas, las que saben binario y las que no

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups