There IS an updated help file in the version 1.2 zip at post #20 here http://www.b4x.com/forum/showthread.php?t=1175&page=2 However the only difference over version 1 is that the resize event was added.Since the v1.2 Dll has no help file,
FormEx1.MaximumHeight = 600
FormEx1.MaximumWidth = 600
FormEx1.MinimumHeight = 300
FormEx1.MinimumWidth = 400
FormEx1.HasMaximizeBox = false
FormEx1.HasMinimizeBox = false
Sub App_Start
LoadINI
XForm.New1("Main")
XForm.MaximumHeight = 600
XForm.MaximumWidth = 600
XForm.MinimumHeight = 300
XForm.MinimumWidth = 400
XForm.HasMaximizeBox = false
XForm.HasMinimizeBox = false
Main.Show
End Sub
You are right, it is not being called because you are showing your original Main form with "Main.Show" not the XForm.Main is a basic4ppc designer created form, 800x600
When I run the code, there's no error but the form shows has if the dll was not beeing called at all...
Sub App_Start
LoadINI
XForm.New1("Main")
XForm.Run
End Sub
I usually try to make the defaults the most common values so you don't need to worry too much about the properties.to seet the most commom props of the control...
You can have as many FormEx forms as you want, all inheriting from their own B4PPC Form object produced in the Designer.can i have two froms inherited from the designer, show up with diferent sizes? This second form not beeing the main form, what to use to show it? (show vs Run)
Lets be pedantic about terminologybut waht about the component? do i need to create a component for each form?
Lets again be a bit pedantic. There is no real difference between a FormEx produced by the two sorts of "New". One inherits controls from a normal form, the other doesn't - that is the only difference. Both can have controls added or removed at runtime, inheriting from a B4PPC form is just a convenience to avoid adding everything at run time.you mean that if i close one form, i cannot show it again, if it was an inherit form?
But if I create a form in runtime I ccan create it any time I need, right?
Actually New1 to be pedantic againControls must be donated from an inherited form, when using new2
I assume you mean New1! Unless I am misunderstanding I thought that I covered this in post #9 of this thread. Trap the Closing event, call CancelClose and Hide the Form. It can then be reshown if required.But when the created form (with new2) is closed, all controls are disposed as well,...Anyway to go around this issue?
In the help file it say the controls MUST be borowed from a B4PPC form, so i thought we could not created/add to the New2 form...in runtime...I don't understand "must be donated", why must? You can either opt to inherit controls from a Form with New1 or create a blank FormEx with New2, the choice is yours. In both cases you can add further controls at runtime.
I can't find must in the help but it DOES say that in the example program. The region "Build FormEx2" shows an empty FormEx2 being created by a New2 and then having controls added at runtime. This is your must I think. OK I could have made this a bit clearer, sorry for any confusion. AddControl is used to add B4PPC native controls like Button and TextBox etc. to a FormEx. The only way to bring such controls into existence is to first have B4PPC create them on a normal Form and then add them to a FormEx with AddControl, this is the reason for saying they must be added from a donor form. This region demonstrates adding BOTH a pre-existing and a runtime created Button to FormEx2.In the help file it say the controls MUST be borowed from a B4PPC form
The FormEx object created in B4PPC by the menu Tools->AddObject is a B4PPC container for an instance of a FormEx. That FormEx instance is created by either New1 or New2. When a FormEx is "Hidden" that instance of a FormEx still exists with its' controls intact and may be reshown with "Show".I will have to get back to you tomorrow about re-using FormEx objects to be sure to give you a good answer.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?