Results 1 to 3 of 3

Thread: Code in String

  1. #1

    Thread Starter
    Hyperactive Member Dorothy's Avatar
    Join Date
    Feb 2001
    Posts
    310

    Question Code in String

    I need to run a string as a code?

    My string has the following value:

    Dim a as String="frm1.visibility=False"

    on Click of a button I need to execute the code in the string?

    Any solutions?

  2. #2
    Lively Member
    Join Date
    Aug 2001
    Posts
    65
    I can't think of anyway possible to do that because it's just a string, it's not a command, it wont run.

    Sorry, maybe someone else might be able to come up with something.

    What is it you are trying to do exactely? or should i say why?

  3. #3
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Why dont you put the string in a function?

    eg

    VB Code:
    1. sub ShowForm(dim frm1 as System.Windows.Form)
    2.         frm1.Visibility = false
    3. end sub
    4.  
    5. .....
    6.  
    7. ShowForm(frm1)
    Dont gain the world and lose your soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width