2015-05-02 20:51 GMT+02:00 ML <d4t4f...@gmail.com>: > Abbat, > > I'd go like this instead: > > * Private _active As Boolean = False** 'This private form > variable will hold the form's state > ** Public Property Read IsActive As Boolean 'This property will > return the private variable value** > > ** Private Function IsActive_Read() As Boolean 'The function > declaration for reading the property** > ** Return _active ' the current form > state is returned** > ** End** > ** > Public Sub Form_Activate() 'This sub will change the > **private variable value to Active. > ** _active = True** ' flag the state as > Active. > ** End** > ** > Public Sub Form_Deactivate()** 'This sub will change > the **private variable value to Inactive.** > ** _active = False** ' flag the state as > Inactive.** > ** End* > > >From any other form, module or class you can now check the new > *IsActive* form property: > > * Dim myForm As New frmWithProperty 'Assume frmWithProperty has the > above property code > [... code ...] > ** If myForm.IsActive Then > [... code for when the form is active...] > Else > ** [... code for when the form is not active...] > Endif > [... even more code ...]* > > The property can be added the same way to a single, some, or all forms > in the project. > > Regards,
To informate By convention : Private $bIsActive as Boolean $ = Private globale b = boolean _ = hidden public Property Variable or Procedure. The Ide hide the Names beginning by '_' ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user