I need help with desktop full screen !

superbabicka

Member
Licensed User
I create form and all other objects. Everything is Done, only my problem is desktop FullScreen. Can somebody help me ???
I try to use FormLib, and I create full screen, but there are no WINDOW with minimize buttons, and x button.
When fullscreen is true , even I can't close program (I use Alt+F4 for closing)

Thank you for all your :sign0085:
 

superbabicka

Member
Licensed User
Hi and thank you Very much for quick answer!

WOW... :sign0188:

Your Library is very helpful for me.

Thank you again, and bes Regards to you and your team Agraham.
 

superbabicka

Member
Licensed User
Hi Again !

Thank you for your library, it's really COOL, but I have one problem, and I can't to realize.

1. Open FormEx1 (this is Form1 in the Basic4PPC / Designer-Tool)
2. Open FormEx2 (this is non existing form in Designer-Tool )
2. Open FormEx3 (same like FormEx2 - non existing )

So, now I want to put in FormEx2 WebBrowser.dll to surf here, and
in FormEx3 to put some commands, like - connection with device ... etc...

When I put WebBrowser in FormEx2 and I Run Application I Got this error:
- Unable to cast object of type 'System.Int32' to type 'System.Windows.Forms.Control'.
This is on line: web.New1("Form2",10,10,300,300)

Here is my code:

Sub App_Start
Screen.New1
FormEx1.New1("Form1")
FormEx1.Icon = AppPath & "\f2f.ico"

FormEx1.StartPosition = 1
FormEx1.WindowState = 2

FormEx1.MinimumWidth = 800
FormEx1.MinimumHeight = 600

FormEx2.New2("Form2","Server Platform",Screen.Width-225,Screen.Height-78)
FormEx2.Icon = AppPath & "\f2f.ico"
FormEx2.Color = Rgb (220,220,220)

FormEx3.New2("Form3","Pocket PC Platform",Screen.Width-805,Screen.Height-78)
FormEx3.Icon = AppPath & "\f2f.ico"
FormEx3.Color = Rgb (220,220,220)

FormEx1.IsMDIparent = true
FormEx1.MakeMDIchild(FormEx2.ControlRef)
FormEx1.MakeMDIchild(FormEx3.ControlRef)

FormEx1.Run

web.New1("Form2",10,10,300,300)
web.url = "http://localhost/"
End Sub

Sub FormEx1_Paint
FormEx2.StartPosition = 0
FormEx2.BorderStyle = 6
FormEx2.Width = FormEx1.Width-235
FormEx2.Height = FormEx1.Height-56

FormEx3.StartPosition = 0
FormEx3.Top = 0
FormEx3.Left = FormEx2.Width
FormEx3.BorderStyle = 6
FormEx3.Width = 220
FormEx3.Height = FormEx1.Height-56

FormEx3.Show
FormEx2.Show
End Sub

Can someone resolve this?

Thanks !!!
 
Last edited:

agraham

Expert
Licensed User
Longtime User
There should be no code after "FormEx1.Run" which should be the last statement in App_Start. Any code after this only runs when the application closes and by this time the Forms no longer exist. If you move your code before "FormEx1.Run" then the error no longer occurs.

To put a library control on a FormEx after creating it with use the FormEx ControlRef property AFTER the FormEx.New2 statement.
"web.New1(FormEx2.ControlRef,10,10,300,300)".

To put a standard control on a Formex add it to a normal Form then take it across with AddControl.
AddButton("Form2", "Added",120,10,100,25,"Added")
FormEx2.AddControl("Added")

I noticed some peculiar behaviour that I can't explain. Setting web.URL moves the MDI child window - I don't know why and don't have time to look further but this code hides the problem

B4X:
FormEx2.New2("Form2","Server Platform",Screen.Width-225,Screen.Height-78)
FormEx2.Color = Rgb (220,220,220)
web.New1(FormEx2.ControlRef,100,100,300,300)
t = FormEx2.Top
l = FormEx2.Left
web.url = "http://google.com"
FormEx2.Top = t
FormEx2.Left = l

EDIT :- I think the odd behaviour I was seeing is due to you setting a manual (0) StartPosition but not setting Top and Left for Form2 in your code. Setting "FormEx2.Top = 0" and "FormEx2.Left = 0" in your Paint sub seemed to cure it.
 
Last edited:
Top