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. what is the difference between..

what is the difference between..

Scheduled Pinned Locked Moved Visual Basic
questionhelp
3 Posts 2 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.
  • Z Offline
    Z Offline
    zhoujun
    wrote on last edited by
    #1

    dim a as label dim a as new label dim a as new label() Can I use a.text immediately after one of the 3 dim ways? Or should I have to add a line "a=new label" before using a.text in the first dim way"dim a as label"? I hope you know my means. Thanks. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.

    B 1 Reply Last reply
    0
    • Z zhoujun

      dim a as label dim a as new label dim a as new label() Can I use a.text immediately after one of the 3 dim ways? Or should I have to add a line "a=new label" before using a.text in the first dim way"dim a as label"? I hope you know my means. Thanks. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.

      B Offline
      B Offline
      Black Cat
      wrote on last edited by
      #2

      After the first "dim", a is still nothing so you can't use a.text immediately. You can do so after the other two "dims", however. The recommended way is: dim a as label = new label() which is equivalent to the second and the third dim.

      Z 1 Reply Last reply
      0
      • B Black Cat

        After the first "dim", a is still nothing so you can't use a.text immediately. You can do so after the other two "dims", however. The recommended way is: dim a as label = new label() which is equivalent to the second and the third dim.

        Z Offline
        Z Offline
        zhoujun
        wrote on last edited by
        #3

        But in fact,I see such dim : dim form1 as form2(form2 is an user-defined class) and the app uses "form1.param1"(param1 is also defined in class form2) immediately,not use new pointer first. this is my signature for forums quoted from shog*9: I can't help but feel, somewhere deep within that withered, bitter, scheming person, there is a small child, frightened, looking a way out.

        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