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. str Value question

str Value question

Scheduled Pinned Locked Moved Visual Basic
5 Posts 4 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.
  • H Offline
    H Offline
    harveyhanson
    wrote on last edited by
    #1

    In vb.net 2005. I am wanting to say at form load that if a global value (strName) has not been used (i.e. has not been entered into), then load another form, how can i do this, i have tried: If strName.length < 1 strName.Empty Help!!!

    N J 2 Replies Last reply
    0
    • H harveyhanson

      In vb.net 2005. I am wanting to say at form load that if a global value (strName) has not been used (i.e. has not been entered into), then load another form, how can i do this, i have tried: If strName.length < 1 strName.Empty Help!!!

      N Offline
      N Offline
      nlarson11
      wrote on last edited by
      #2

      Public Class Common public shared strName as string = String.Empty End Class Public Class Form1 private sub form_load(....) if common.strname = string.empty then common.strname = "hello" End if End Sub End Class

      1 Reply Last reply
      0
      • H harveyhanson

        In vb.net 2005. I am wanting to say at form load that if a global value (strName) has not been used (i.e. has not been entered into), then load another form, how can i do this, i have tried: If strName.length < 1 strName.Empty Help!!!

        J Offline
        J Offline
        jhoga
        wrote on last edited by
        #3

        I want to clarify what you are asking? Are you trying too check the value of a textbox control to see if it is null and if so then opening a different form? Or are checking to see if a control has been createded? Jhoga

        H 1 Reply Last reply
        0
        • J jhoga

          I want to clarify what you are asking? Are you trying too check the value of a textbox control to see if it is null and if so then opening a different form? Or are checking to see if a control has been createded? Jhoga

          H Offline
          H Offline
          harveyhanson
          wrote on last edited by
          #4

          Im trying something like this: If strName.IsNullOrEmpty Then frmTeachBasics.Show() The strName is a global, but it is coming up with an error asking me to replace "strName with String"

          M 1 Reply Last reply
          0
          • H harveyhanson

            Im trying something like this: If strName.IsNullOrEmpty Then frmTeachBasics.Show() The strName is a global, but it is coming up with an error asking me to replace "strName with String"

            M Offline
            M Offline
            M Hall
            wrote on last edited by
            #5

            Try If String.IsNullOrEmpty(strName) Then frmTeachBasics.Show

            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