Code: Select all
Global Larghezza.l
Global Altezza.l
Larghezza = 500
Altezza = 500
Procedure linea()
StartDrawing(ScreenOutput())
Line(0,0,Larghezza,altezza,RGB(255,0,0))
StopDrawing()
FlipBuffers()
EndProcedure
punt = OpenWindow(1, 100, 100, Larghezza, Altezza, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget , "Itecad")
InitSprite()
OpenWindowedScreen(punt, 0, 0, Larghezza, Altezza,0,0,0)
linea()
Quit = #FALSE
Repeat
If IsIconic_(punt) = #FALSE
If (WindowWidth() <> Larghezza) Or (WindowHeight() <> Altezza)
Larghezza = WindowWidth()
Altezza = WindowHeight()
CloseScreen()
OpenWindowedScreen(punt, 0, 0, Larghezza, Altezza,0,0,0)
linea()
EndIf
EndIf
Evento = WaitWindowEvent()
Select Evento
Case #PB_EventCloseWindow
Quit = #TRUE
EndSelect
Until Quit = #TRUE
If I don't want to use Autostretch I can't create a windowedscreen on a maximized window.
Look at this other little program:
Code: Select all
punt = OpenWindow(1, 100, 100, 500, 500, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget , "Alberto")
ShowWindow_(punt,#SW_MAXIMIZE)
InitSprite()
OpenWindowedScreen(punt, 0, 0, 500, 500,0,0,0)
ClearScreen(255,0,0)
FlipBuffers()
Quit = #FALSE
Repeat
Evento = WaitWindowEvent()
Select Evento
Case #PB_EventCloseWindow
Quit = #TRUE
EndSelect
Until Quit = #TRUE
Am I misundersting something? :roll:
Is it possible to create a windowedscreen on a maximized window without using Autostrecth?
Thanks
Alberto