Results 1 to 2 of 2

Thread: Calling A button part 2

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2011
    Posts
    43

    Calling A button part 2

    I've figured out how to change a button from invisible to visible by btnWhatever.Visible = True, after clicking on the button.

    This only works if both buttons are in the same Class. I want the first button in class 1 to trigger the code above and allow the button in class 2 to now be visible.

    I've tried playing with the public/private indicator of each button but that doesn't seem to be working. Can a button in one class trigger an event for a button in another class, so that it can become visible?

  2. #2
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Calling A button part 2

    In your class modules you'll need to specify where your buttons are located. For example if you have Button1 and Button2 in Form1, you can work with one button in one class and have Form1.Button1.Visible = False, and Form1.Button2.Visible = False in another class. I wouldn't necessarily consider them events, but more like modifying the properties to the buttons. Triggering events are possible with different classes/modules but personally I use functions / subs rather than trigger what code is within my events to my objects.

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