Italian Aprire una form a tutto schermo

GuidoS

Member
Licensed User
Longtime User
Come faccio ad aprire una form a tutto schermo ??

Sopratutto all'avvio del programma ? quindi nella appstart ?

Guido
 

GuidoS

Member
Licensed User
Longtime User
Scusate ....... inoltre cliccando in una riga della tableview come faccio ad aprire un'altra form passandogli i dati di quella riga ?

GRazie !
 

LucaMs

Expert
Licensed User
Longtime User
Dovresti specificare che stai parlando di B4J (buona l'idea di postare qui e nel Questions ;))

Non conosco a sufficienza B4J, per risponderti. Sono certo che tra pochi minuti avrai la risposta da Erel che è online
 

GuidoS

Member
Licensed User
Longtime User
Scusa !! hai ragione !! ovviamente B4J

Scusate se posto sia qui che nelle questions ma ho visto che quando posto qui mi rispondono, oppure intervengono solo italiani, invece potrebbe essere utile ampliare la ricerca ed avere più pareri.
 

magoandroid

Member
Licensed User
Longtime User
Come faccio ad aprire una form a tutto schermo ??

Ciao @GuidoS,
un pezzo di codice al volo (senza commenti) per selezionare due modalità di Form a Schermo Intero.

B4X:
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("Layout1") 'Load the layout file. 
	
	settaSchermoIntero(Form1, False)

	MainForm.Show
End Sub



Sub settaSchermoIntero(frm As Form, modo As Boolean)

	If modo = False Then
  		Dim ps As Screen = fx.PrimaryScreen
		
  		frm.WindowLeft = ps.MinX
  		frm.WindowWidth = ps.MaxX - ps.MinX
  		frm.WindowTop = ps.MinY
  		frm.WindowHeight = ps.MaxY - ps.MinY
	Else
		Dim jo As JavaObject 
		Dim joStage As JavaObject
   
  		jo = frm
  		joStage = jo.GetField("stage")
  		joStage.RunMethod("setFullScreen", Array As Object(True))
	End If
End Sub


Buona giornata.
MAgo
 
Top