Results 1 to 3 of 3

Thread: CheckBox probleb

  1. #1

    Thread Starter
    Addicted Member Tiovital's Avatar
    Join Date
    Apr 2000
    Posts
    249

    CheckBox probleb

    Hi,
    When my Appication start up, I read the Init-parms from the registry, When i try programatcly to change any CheckBox in my project - the default Event CheckX_Click is Raised. How can i prevent this Event from raised within init program???


    Regards

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi
    It's just a matter of setting 'flags' so that the click event only fires when selected manually and not at the start

    Code:
    Dim fbooCheckActivate As Boolean
    
    Private Sub Form_Activate()
        On Error Resume Next
        fbooCheckActivate = False 'don't activate check box routines
        'Do ur normal processing, including setting check boxes
    
        fbooCheckActivate = True 'activate check box routines
    End Sub
    
    Private Sub Check1_Click()
        If fbooCheckActivate Then
               'Do the processing that is only done when user
               'actually selects the check box
       End If
    End sub
    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  3. #3

    Thread Starter
    Addicted Member Tiovital's Avatar
    Join Date
    Apr 2000
    Posts
    249
    Hi Beachbum,
    1ST - Thanks for the quick reply.
    2ND - Well i c that VB does not support that (fire up only manualy), So i think i will try your Method.


    Thanks

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