Italian B4J menu

che stressss. Ho trovato in un esempio funzionante che per passare ad un'altro modulo utilizza nomemodulo.Show e successivamente chiude il precedente con nomemodulo.close a me non mi da la possibilita di inserire .Show. Mi da solo due opzioni o .AppStart o .Process.Globals

Come devo fare, o meglio cosa sbaglio?

Code: Copy
#Region Project Attributes
    #MainFormWidth: 800
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    
    MainForm = Form1
    MainForm.RootPane.LoadLayout("mio") 'Load the layout file.
    MainForm.SetWindowSizeLimits(400, 400, 800, 800)
    Form1.Title = "MEMORY Ver.4.0 By 184"
    MainForm.Show
End Sub
Sub MenuBar1_Action
    Dim mi As MenuItem = Sender
    
    'Log(mi.text)
    If mi.Text = "CODICI BOBINE" Then Log("CODICI BOBINE")
    If mi.Text = "STAMPA ETI.BOBINE" Then Log("STAMPA ETI.BOBINE")
    If mi.Text = "SCHEDE" Then     
        Log("SCHEDE")
        
        sSchede
    End If
    
    If mi.Text = "MT. LINEA" Then Log("MT. LINEA")
    
End Sub

Sub sSchede
    
    '*****************************************
        mSchede.?????????????????
        MainForm.Close
    
    '****************************************
End Sub


'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Return True
End Sub
 
Intanto avresti dovuto aprire un nuovo thread, perché la tua ultima domanda non riguarda i menu ;)

Poi, potresti indicarci di quale
esempio funzionante
parli.

Poi... "modulo" ha poco significato. Ci sono "moduli di codice", "moduli di classe", "moduli activity", "moduli servizio".

Quei due metodi, Show e Close saranno sicuramente di un oggetto Form, non di un "modulo"
 
Back
Top