Re: [Gambas-user] R: How to know is my Form activated or not?
http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101559_1280x1024_scrot.png http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101344_1280x1024_scrot.png -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51457.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Il 05/05/2015 08:59, abbat81 ha scritto: http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101559_1280x1024_scrot.png http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101344_1280x1024_scrot.png -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51457.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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 Probably it will not work because your version is before 3.6 Regards Gianluigi -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
...very strange ! Mar 5/5/15, abbat81 abbat...@mail.ru ha scritto: Oggetto: Re: [Gambas-user] R: How to know is my Form activated or not? A: gambas-user@lists.sourceforge.net Data: Martedì 5 maggio 2015, 08:59 http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101559_1280x1024_scrot.png http://gambas.8142.n7.nabble.com/file/n51457/2015-05-05-101344_1280x1024_scrot.png -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51457.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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 -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Dim dw As DesktopWindow For Each dw In Desktop.Windows Print _ dw.VisibleName Next I got next: _ _ _ _ _ _ _ _ _ _ _ _ -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51453.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Abbat, I don't know if you got my reply to the list. I'd go like this instead (this is code to add to the form(s) you want to check): * Private $bActive 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 ***$bActive * ' the current form state is returned** ** End** ** Public Sub Form_Activate() 'This sub will change the **private variable value to Active. ****$bActive = True** ' flag the state as Active. ** End** ** Public Sub Form_Deactivate()** 'This sub will change the **private variable value to Inactive. ****$bActive**= False** ' flag the state as Inactive.** ** End* This works as follows: When you initially instance the form, the private variable *$bActive* is set to FALSE. When the form is activated, the *Form_Activate* event triggers and sets the private variable *$bActive* as TRUE; when the form is deactivated, the *Form_Deactivate* event triggers and sets the *$bActive* variable to FALSE. At any time, code external to the form can check the new form property *IsActive* to find out if the form is active or not. This new property will return the value TRUE or FALSE that has been set to the *$bActive*** variable. External code can check the new *IsActive* form property as follows: * Dim myForm As New frmWithProperty 'frmWithProperty is a form with the above new property code included [... 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, zxMarce. *On 04/May/2015 09:24, abbat81 wrote:* Dim dw As DesktopWindow For Each dw In Desktop.Windows Print _ dw.VisibleName Next I got next: _ _ _ _ _ _ _ _ _ _ _ _ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Activating gb.desktop: Public Sub Form_Open() Me.Caption = Novum Nomen End Public Sub Button1_Click() Dim dw As DesktopWindow For Each dw In Desktop.Windows Print _ dw.VisibleName Next End * Regards Lun 4/5/15, abbat81 abbat...@mail.ru ha scritto: Oggetto: Re: [Gambas-user] R: How to know is my Form activated or not? A: gambas-user@lists.sourceforge.net Data: Lunedì 4 maggio 2015, 14:24 Dim dw As DesktopWindow For Each dw In Desktop.Windows Print _ dw.VisibleName Next I got next: _ _ _ _ _ _ _ _ _ _ _ _ -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51453.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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 -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Does not work in my project. dw.VisibleName is empty (Gambas 5.4.1, I cannot update, Ub 12.04) -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51445.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Me.Caption = my visible name Dom 3/5/15, abbat81 abbat...@mail.ru ha scritto: Oggetto: Re: [Gambas-user] R: How to know is my Form activated or not? A: gambas-user@lists.sourceforge.net Data: Domenica 3 maggio 2015, 13:28 Does not work in my project. dw.VisibleName is empty (Gambas 5.4.1, I cannot update, Ub 12.04) -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426p51445.html Sent from the gambas-user mailing list archive at Nabble.com. -- 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 -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
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, *On 05/02/2015 01:24 PM, Ru Vuott wrote:* If you know visible-name of Form, you could use (gb.Desktop): Public Sub Button1_Click() Dim dw As DesktopWindow For Each dw In Desktop.Windows ' If the visible-name is the same as the name of the form that we seek, then it detects that: If dw.VisibleName = visible-name of Form then Print Form is active ! Next End *Sab 2/5/15, abbat81 abbat...@mail.ru ha scritto:* Oggetto: [Gambas-user] How to know is my Form activated or not? A: gambas-user@lists.sourceforge.net Data: Sabato 2 maggio 2015, 13:43 In Event I use *Form_Activate()* and *Form_Deactivate()* But I need to have boolean Y/N when I ask. -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-know-is-my-Form-activated-or-not-tp51426.html Sent from the gambas-user mailing list archive at Nabble.com. ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Fabien, Thanks for the clarification. Actually, as an old-time VB6 and more recently VBNet and Gambas developer, I tend to use camel-case and actually dropped the *b*/Boolean, *l*/Long, *s*/String, etc prefixes not long ago. Also, I normally used to go *m_variableName* for a module (local to the class) variable in VB6. But I found that Gambas can happily use the underscore without the *m* prefix, just as in VBNet. And, as an even older-time Sinclair Basic user, I tend to reserve the *$* sign for string suffixes :P Somehow it just looks strange to me to use the *$* as a prefix! Anyway, I don't quite understand what you mean by Private Global; to me it's either Private or Global, but not both. What I do is use a Private variable to hold a value that I will publish later via a Public Property. But the variable itself is Private while the Property is Public. I do make that distinction. And, as you say, the private variable is hidden by the IDE, so the only way to access it is via the property, which is the original intention. Nonetheless, I will try to remember and adhere to your specs if I give further examples to the list. Regards, *On 05/02/2015 05:35 PM, Fabien Bodard wrote:* *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 -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
Public Toto as String 'is public Public _Toto as string 'Is public but hidden Private $sToto as String 'Is Private Property _Toto as String 'Is public access but hidden Dim sToto as string 'Is Local In Fact it is the convention used on the gambas IDE and generally on my own projects. Even _MyClass is hidden by the ide Well generally the _Var means to not expert DO NOT TOUCH THAT WITHOUT MANY CARE ! 2015-05-02 22:52 GMT+02:00 ML d4t4f...@gmail.com: Fabien, Thanks for the clarification. Actually, as an old-time VB6 and more recently VBNet and Gambas developer, I tend to use camel-case and actually dropped the *b*/Boolean, *l*/Long, *s*/String, etc prefixes not long ago. Also, I normally used to go *m_variableName* for a module (local to the class) variable in VB6. But I found that Gambas can happily use the underscore without the *m* prefix, just as in VBNet. And, as an even older-time Sinclair Basic user, I tend to reserve the *$* sign for string suffixes :P Somehow it just looks strange to me to use the *$* as a prefix! Anyway, I don't quite understand what you mean by Private Global; to me it's either Private or Global, but not both. What I do is use a Private variable to hold a value that I will publish later via a Public Property. But the variable itself is Private while the Property is Public. I do make that distinction. And, as you say, the private variable is hidden by the IDE, so the only way to access it is via the property, which is the original intention. Nonetheless, I will try to remember and adhere to your specs if I give further examples to the list. Regards, *On 05/02/2015 05:35 PM, Fabien Bodard wrote:* *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 -- 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 -- Fabien Bodard -- 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
Re: [Gambas-user] R: How to know is my Form activated or not?
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