Its a security thing. >>>>Ooops, see edit below
Imagine that cogier releases an update to "Killer App" to his fan base of 10 million users. He makes lblStatus Public so he can write status messages from any of the applications forms.
Someone discovers this and finds a way to write:-
lblStatus.Text = "Virus Alert - go to http:/ /hell.com/FixMe"
However, by keeping lblStatus Private, and using a routine to set the contents of lblStatus, it is possible to apply filters:-
Public Sub UpdateName(strName As String) If Instr(strName, "http") > 0 OR Instr(strName, "/") > 0 Then lblStatus.Text = "Please stop doing that Jornmo!" Else txtName.text = strName EndIf End
*****EDIT: After writing this early this morning, I have spent a couple of hours looking for validation.
I had thought (from my VB6/Windows days) that "Publics" could be manipulated in some way from outside the program, but have failed to find any evidence to support this, or any security related issues.
So if that is the case, I can't see why Gambas Controls can't be Public, especially as they need to be qualified by their parent (e.g. Form1.txtName.Text)