Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Problems with behaviour of the form

  1. #11

    Problems with behaviour of the form

    It shouldn't be necessary.
    Actually in mine code it's vice versa: then returning back to windowed mode I use (but it's mainly bacause for fullscreen mode I use created by myself window - not VCL form):
    [pascal]function TMainForm.XXXXXXX: HResult;
    begin
    ...
    SetFocus;
    Application.BringToFront;
    ...
    end;
    [/pascal]
    There are only 10 types of people in this world; those who understand binary and those who don't.

  2. #12

    Problems with behaviour of the form

    I am not sure if I understand it. I'll try it and if I don't succeed maybe we can create a little sample with a black screen or something...

    And this works with forms? Have to try it, thanks....

    firle

  3. #13

    Problems with behaviour of the form

    Hi Clootie,

    I don't know DXUTGetHWNDDeviceFullScreen.

    I don't want to switch from Fullscreen to Windowed or back, I can do this in my configuration but not in Runtime, this is ok for me.

    I just want to know what to do when starting Fullscreen to get rid of the taskbar problem. I have just a normal form:

    Application.CreateForm(TCommandoform, Commandoform);

    So could you please tell me how to do this for a normal form or
    if it was the right statement above, how to set DXUTGetHWNDDeviceFullScreen?

    I am using OmegaDX9 based on your DX9 headers Dec Update.

    Thanks,
    Firle

  4. #14

    Problems with behaviour of the form

    I've never got VCL forms to be 100% compatible with holding DirectX fullscreen renderer (this includes correct handling of loss of fullscreen mode due to user presing Ctrl-Alt-Del or Alt-Tab or backgound dialog popping-up, or ....). So I use special pure WinAPI window for this purpose.

    But if you insist: you can try to call
    SetWindowLong(YouFullScreenForm.Handle, GWL_STYLE, Integer(WS_POPUP or WS_SYSMENU));
    before switching to fullscreen (DX runtime will set window size to fullscreen by itself). And don't forget to change it back when switching to windowed mode.

    Isn't Omega already has support for fullscreen applications?
    There are only 10 types of people in this world; those who understand binary and those who don't.

  5. #15

    Problems with behaviour of the form

    Hi Clootie,

    thanks a lot for the info.

    I'll try that. Omega has fullscreen support of curse I only get Problems if the user has his win-taskbar set to auto hide and always on top just like Czar said, I guess everybody using Omega with a form has the same problem. If it does not work out, I'll ask Czar how he is doing it (removing the taskbar or whatever). But I'll try first, thanks!

    Next project I'll try without a form like you said, but for this project I would have to change too much stuff.

    Firle

  6. #16

    Problems with behaviour of the form

    What I do is

    (sorry is a bit messy but I am sure you can work it out from here). I do not set the alwaysontop. I leave it as is.

    Code:
    //On Reactivate or on show whatever you like
    var hTaskBar : THandle;
    
    hTaskbar  := FindWindow( 'Shell_TrayWnd', Nil );
    
    ShowWindow(hTaskBar, SW_HIDE);
    
    //On deactivate
     
    procedure TMainForm.Deactivate(Sender: TObject);
    var hTaskBar : THandle;
    begin     
      hTaskbar  := FindWindow( 'Shell_TrayWnd', Nil );
      ShowWindow(hTaskBar, SW_NORMAL);
    end;
    
    // On create I set up the following
        procedure Deactivate(Sender: TObject);
        procedure Reactivate(Sender: TObject);
    
     Application.OnDeactivate := Deactivate;
     Application.Onactivate   := Reactivate;
    The views expressed on this programme are bloody good ones. - Fred Dagg

  7. #17

    Problems with behaviour of the form

    Hi Czar,

    I build in Clooties suggestion but did not test it yet.

    I must test this on at least 2 PCs.

    If it does not work out, I will use yours also, thanks a lot for the code!

    Firle

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •