Results 1 to 2 of 2

Thread: Please have a look !

  1. #1

    Thread Starter
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Question

    I want to permenantly disable some controls at run time when some event occurs so that it remains disabledduring next execution. Can anyone help me?

  2. #2
    Member
    Join Date
    Mar 2000
    Posts
    62
    You might want to flirt around with the registry. It is a valuable place to save information from execution to execution. You could just save True or False and when the project loads look into the registry to enable or not. Take a look, it should help you, here are the commands.

    SaveSetting appname, section, key, setting

    GetSetting(appname, section, key[, default])

    I am not sure how your code works but here is a little sample I just threw together.

    Private Sub cmdOK_Click()

    SaveSetting App.Title, "Properties", "Button1Enabled", _
    Button1.Enabled

    End Sub

    Private Sub Form_Load()

    Button1.Enabled = GetSetting(App.Title, "Properties", _
    "Button1Enabled", True)

    End Sub

    That should do it. Good luck.

    JK


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