Results 1 to 7 of 7

Thread: Property Windows

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43

    Smile Property Windows

    Dear All,

    I am trying to build Hieararchy in VB.net, but instead of creating new buttons while running the program, i've decided to create all what i need put it to invisible mode, then change it back when been used......

    but i've got a problem, is that, when user specify a textname for the button, and he saved the program,,,,, then if exit vb. net and running the program again, he's lost all info he entered, he got to do everything all over again..

    i got one way round it i guess, if i managed to change the properties of a button for example, what i mean by that, be able to access the window properties while running the program,, so when exiting the program and try to run it again, we wont' lose the data we've entered

    thank you very much

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43
    PLEASE ANYONE CAN HELP

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43
    PLEASE THAT'S QUESTIO IS REALLY IMPORTANT, I'VE GOT **** LOADS OF WORK TO DO, I AINT STARTED YET, ANYONE GOT ANY IDEAS

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Well then you'd better get started I guess. You need to create a way to save the properties of the different controls on application exit and reload those settings on application load. You can access the properties of any control the same as any object. There is no need for the actual window that you see at DesignTime.

    Button1.Visible=True

    You may also want to look at 'Dynamic Properties' in the help or experiment with them on your own. You can set properties to be Dynamic via the 'DynamicProperties' part at the top of the Properties window.

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    43
    But how can i save the properties of controls while running the program.


    that's the issue :


    at design time, if you specify for example,

    button1.text = "design time "

    but while running the program, u changed it to :
    button1.text = "modified value"


    so if u save the program, u exit vb .net, and u try to open the program, u always get the following,

    button1.text = "design time"

    and not the new value,

    so please help, that's very important for me

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    DynamicProperties will do that.

    Otherwise you have to make a way to save your control properties there isn't any default way.

  7. #7
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780
    As Edneeis said, you need to look into saving the data on exit and reloading it at application start. You have to do this manually but there are a variety of options. Already existing types like comma delimeted files, tab delimited, ini files, config files, databases, serialization or even your own home made format.

    I would suggest looking at using .config files. They are similar to ini files and a simple way to save the data. You can also edit them by hand.

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