19/05/2023: A causa di un errore sono stati cancellati, insieme ad account creati da bot, alcuni account legittimi. Si prega di leggere qui: https://www.gambas-it.org/smf/index.php?topic=9733.0
Private hControl As ObjectPrivate Px As New Integer[]Private Py As New Integer[]Private Pw As New Integer[]Private Ph As New Integer[]Private Fs As New Integer[]Private Mw As IntegerPrivate Mh As IntegerPrivate ctrx As BooleanPrivate codute As IntegerPrivate codmis As IntegerPrivate xlab As Integer Private xdate As StringPublic mydir As String = Application.Path & "/" & "Out"Public trimestre As IntegerPublic progres As StringPublic Sub Form_Open() For Each hControl In Me.Controls Px.Add(hControl.x) Py.Add(hControl.y) Pw.Add(hControl.w) Ph.Add(hControl.h) Fs.Add(hControl.Font.size) Next Mw = Me.W Mh = Me.h Mod_Open.controlla_db() carica_utentiEndPublic Sub Form_Resize() Dim cx, cy As Float Dim Nw, Nh, i As Integer Nw = Me.W Nh = Me.h Cx = Nw / Mw Cy = Nh / Mh i = 0 For Each hControl In Me.Controls hControl.x = Px[i] * Cx hControl.y = Py[i] * Cy hControl.w = Pw[i] * Cx hControl.h = Ph[i] * Cy hControl.Font.size = Fs[i] * Cx Inc i NextEnd
For Each hcontrol As Control In Me.Controls Print hcontrol.Name Next
Public Sub Form_Open() dim hControl As Object For Each hControl In Me.Controls print hcontrol.name NextEndPublic Sub Form_Resize() dim hControl As Object For Each hControl In Me.Controls print hcontrol.name NextEnd
A me pare che non funzionasse neppure prima.
Si ho letto qualcosa qualche giorno fa', quindi da oggi va dichiarata la anche in questo modo su tutte le procedure ? se ho capito bene Codice: [Seleziona]Public Sub Form_Open() dim hControl As Object For Each hControl In Me.Controls print hcontrol.name NextEndPublic Sub Form_Resize() dim hControl As Object For Each hControl In Me.Controls print hcontrol.name NextEnd
For Each hcontrol As Object In Me.Controls Print hcontrol.Name Next
Public Sub Form_Open() Dim s As String = "10" ' Prima era possibile dichiarare solo in questo luogo (inizio routine) ' ' Solo per i loop ' For Each hcontrol As Control In Me.Controls ' Ora si può fare anche così... ' Print hcontrol.Name Next ' In ogni dove ' Dim i As Integer = CInt(s) '...è così ' If i = 10 Then Print "ALLELUIA"End
... stavo per formattare è reinstallare tutto per far pulizia