A form without border, its state set to "wsMaximised" and a TImage with align "alClient". That's a good beginning, you should find more details with google ;)
This should do the trick: uses ... Macapi.ObjectiveC, Macapi.CocoaTypes, Macapi.Foundation, Macapi.AppKit, FMX.Platform.Mac;
... {$IF NOT DECLARED(NSWindowCollectionBehaviorFullScreenPrimary)} const NSWindowCollectionBehaviorFullScreenPrimary = 128; {$IFEND}
type TOCLocalAccess = class(TOCLocal);
function NSWindowOfForm(Form: TCommonCustomForm): NSWindow; var Obj: TOCLocal; begin Obj := (FmxHandleToObjC(Form.Handle) as TOCLocal); Result := NSWindow(TOCLocalAccess(Obj).Super); end; ... procedure TMainForm.FormCreate(Sender: TObject); var ScreenSvc: IFMXScreenService; SSize: TPointF; begin NSWindowOfForm(Self).setCollectionBehavior (NSWindowCollectionBehaviorFullScreenPrimary); if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenSvc)) then begin SSize := ScreenSvc.GetScreenSize; Self.SetBounds(0, 0, Round(SSize.X), Round(SSize.Y)); end; ... end;
A form without border, its state set to "wsMaximised" and a TImage with align "alClient". That's a good beginning, you should find more details with google ;)
ReplyDeleteSébastien Paradis
ReplyDeleteYes you are right but i mean somthing sample like click on image and its open in full screen
P.S. i mean its in IOS.
This should do the trick:
ReplyDeleteuses
...
Macapi.ObjectiveC,
Macapi.CocoaTypes,
Macapi.Foundation,
Macapi.AppKit,
FMX.Platform.Mac;
...
{$IF NOT DECLARED(NSWindowCollectionBehaviorFullScreenPrimary)}
const
NSWindowCollectionBehaviorFullScreenPrimary = 128;
{$IFEND}
type
TOCLocalAccess = class(TOCLocal);
function NSWindowOfForm(Form: TCommonCustomForm): NSWindow;
var
Obj: TOCLocal;
begin
Obj := (FmxHandleToObjC(Form.Handle) as TOCLocal);
Result := NSWindow(TOCLocalAccess(Obj).Super);
end;
...
procedure TMainForm.FormCreate(Sender: TObject);
var
ScreenSvc: IFMXScreenService;
SSize: TPointF;
begin
NSWindowOfForm(Self).setCollectionBehavior
(NSWindowCollectionBehaviorFullScreenPrimary);
if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenSvc)) then
begin
SSize := ScreenSvc.GetScreenSize;
Self.SetBounds(0, 0, Round(SSize.X), Round(SSize.Y));
end;
...
end;