B4J Question how to minimize form?

le_toubib

Active Member
Licensed User
Longtime User
hi falks
i'm trying to add a button to minimize a form ,
i found a way to do it in rwblinn , using JO (that i didn't work with me).
another ways using libraries ..
is there a simpler way ?
sorry for the noob question
 

stevel05

Expert
Licensed User
Longtime User
My FormUtils lib has the code to do this, you can either use the lib, or just take the code you need. The Method is SetIconified

 
Upvote 0

xulihang

Active Member
Licensed User
Longtime User
B4X:
Sub hide
    Dim mf As JavaObject = frm.RootPane
    mf.RunMethodJO("getScene",Null).RunMethodJO("getWindow",Null).RunMethod("hide",Null)
End Sub

Sub show
   Dim mf As JavaObject = frm.RootPane
   mf.RunMethodJO("getScene",Null).RunMethodJO("getWindow",Null).RunMethod("show",Null)
End Sub

I use the code above to hide a window and bring a window to front again.
 
Upvote 0
Top