Results 1 to 20 of 20

Thread: Making a Form Full-Screen (Small Tutorial)

  1. #1
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default Making a Form Full-Screen (Small Tutorial)

    Making a Form Full-Screen
    By Dan's The Man

    Introduction:
    This is a little guide to teach you how to make a SCAR Form Full-Screen. It could be used in your own games (*looks at Solemn Wishes* ), or anything else you might want So let's start.

    Method:
    Well, first off, you'll need to make a simple form out of the form editor, or any other way you like doing After doing that, save the form and load it via the Load DFM Form option inside SCAR or Rons DFM Form parser. In the section of your form name (usually "frmDesign"), add:
    SCAR Code:
    FormName.BorderStyle := bsNone;
      FormName.WindowState := wsMaximized;
    While replacing FormName with the variable name of your form That will make it maximized, but without covering the taskbar. To cover your taskbar, You'll need to replace:
    SCAR Code:
    FormName.Left := blah;
      FormName.Top := blah;
      FormName.Width := blah;
      FormName.Height := blah;
    with
    SCAR Code:
    FormName.SetBounds(TR.Left, TR.Top, TR.Right-TR.Left, TR.Bottom-TR.Top);
    whilst adding this variable as a local variable:
    SCAR Code:
    var
       TR: TRect;
    Remember to replace FormName with the variable name of your form. Now just continue on with the normal form development, such as adding loading procedures and stuff (TVariantArrays etc). SetBounds is another way of doing:
    SCAR Code:
    FormName.Left := blah1;
      FormName.Top := blah2;
      FormName.Width := blah3;
      FormName.Height := blah4;
    So, you'll do this with SetBounds instead (much shorter ):[scar]
    FormName.SetBounds(blah1, blah2, blah3, blah4);[scar]
    See? Much, MUCH shorter

    Ok, that hopefully concludes my tutorial for today. If you require any more help, please reply to this thread

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,572
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    <3 Dan's The Man
    ~Hermen

  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,572
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    <3 Hermpie
    EEEEEWWWWW, GAY!
    ~Hermen

  5. #5
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Hermpie View Post
    EEEEEWWWWW, GAY!
    Right Looks back at your post

  6. #6
    Join Date
    Dec 2006
    Location
    SC
    Posts
    692
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is there a tutorial on rendering bitmaps on the screen with SCAR? I'm asking because I wanted to try make a game with SCAR but don't know enough to do it.

  7. #7
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by WhoCares357 View Post
    Is there a tutorial on rendering bitmaps on the screen with SCAR? I'm asking because I wanted to try make a game with SCAR but don't know enough to do it.
    If i think you mean something that has a transparent background, then i'm not sure, sorry.

  8. #8
    Join Date
    Dec 2006
    Location
    SC
    Posts
    692
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dan's The Man View Post
    If i think you mean something that has a transparent background, then i'm not sure, sorry.
    Not necessarily. I just want to draw the bitmap in a window. I'd refresh the screen on user input. I've looked in the SCAR help files and there are a few functions dealing with drawing with bitmaps. Still, I don't know how to complete the whole process. I'll have to experiment quite a bit.

    So it would really help if there was a tutorial showing me how to do this. Even a previously made game would be good (the source code, I mean).

  9. #9
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Solemn wishes made a tut in the advanced section on making games, its very good.

  10. #10
    Join Date
    Dec 2006
    Location
    SC
    Posts
    692
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    Solemn wishes made a tut in the advanced section on making games, its very good.
    Thanks. I'll check it out.

  11. #11
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by WhoCares357 View Post
    Thanks. I'll check it out.
    Glad you found what you were looking for

  12. #12
    Join Date
    Apr 2007
    Posts
    3,161
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    hmm. i didnt know that it had to do with the variables being set as other variables. Afew days ago i was playing around with this and it got it to work by just re-arranging my variables.

    Also if you make it fullscreen after your init procedure (after clicking a button maybe?) you dont have to muck around with that. just y=type in

    SCAR Code:
    FormName.BorderStyle := bsNone;
      FormName.WindowState := wsMaximized;
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  13. #13
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    hmm. i didnt know that it had to do with the variables being set as other variables. Afew days ago i was playing around with this and it got it to work by just re-arranging my variables.

    Also if you make it fullscreen after your init procedure (after clicking a button maybe?) you dont have to muck around with that. just y=type in

    SCAR Code:
    FormName.BorderStyle := bsNone;
      FormName.WindowState := wsMaximized;
    I mean, when a form starts up and it's full screen

  14. #14
    Join Date
    Apr 2007
    Posts
    3,161
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    i know, i was just saying. no need to go all "" on me.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  15. #15
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    i know, i was just saying. no need to go all "" on me.
    Huh???

  16. #16
    Join Date
    Jul 2008
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks much help!

  17. #17
    Join Date
    Mar 2007
    Location
    Players[-1].Loc
    Posts
    958
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    MoveMouse(-100000,-100000);
    GetMousePos(x1, y1);
    MoveMouse(100000,100000);
    GetMousePos(x2, y2);
    Form.SetBounds(0, 0, x2 - x1, y2 - y1);
    There's your screen size

    Also, you can copy bitmaps to TImages with SafeCopyCanvas with a transparent background but it's complicatedish. Maybe I'll write some form tuts if I ever finish my game for the Form competition

    Edit: Partial gravedig. Stupid fixed order

  18. #18
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Widget View Post
    SCAR Code:
    MoveMouse(-100000,-100000);
    GetMousePos(x1, y1);
    MoveMouse(100000,100000);
    GetMousePos(x2, y2);
    Form.SetBounds(0, 0, x2 - x1, y2 - y1);
    There's your screen size

    Also, you can copy bitmaps to TImages with SafeCopyCanvas with a transparent background but it's complicatedish. Maybe I'll write some form tuts if I ever finish my game for the Form competition

    Edit: Partial gravedig. Stupid fixed order
    Yay for Widget gravedigging my post

    CopyCanvas and SafeCopyCanvas isn't complicated...

  19. #19
    Join Date
    Jun 2007
    Location
    #SRL
    Posts
    199
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    you know, you could just do this:

    SCAR Code:
    var
      W, H: Integer;
    begin
      SetDesktopAsClient;
      GetClientDimensions(W, H);
      Form.SetBounds(0, 0, W, H);
    end;

    ...quite simple really...
    Quote Originally Posted by IRC
    <Wizzup> 5
    <Wizzup> 4
    <Wizzup> 43
    <Wizzup> shit
    <Wizzup> 5
    <Wizzup> 4
    <Wizzup> 3
    <Wizzup> 1
    <Wizzup> offblast

  20. #20
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,091
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by tootoot222 View Post
    you know, you could just do this:

    SCAR Code:
    var
      W, H: Integer;
    begin
      SetDesktopAsClient;
      GetClientDimensions(W, H);
      Form.SetBounds(0, 0, W, H);
    end;

    ...quite simple really...
    That wouldn't cover the taskbar Also, just using a TRect and SetBounds is faster than that

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Small xor tutorial.
    By The Un-Named in forum Intermediate Tutorials
    Replies: 27
    Last Post: 04-30-2009, 07:41 AM
  2. F2P? Want True Runescape Full Screen?
    By deathbyvirus in forum Runescape News and General
    Replies: 17
    Last Post: 08-09-2008, 07:20 PM
  3. Full Remote Control Tutorial.
    By RudeBoiAlex in forum Outdated Tutorials
    Replies: 50
    Last Post: 05-30-2008, 06:00 AM
  4. Full Bitmap and DTM Tutorial
    By WhoCares357 in forum Outdated Tutorials
    Replies: 37
    Last Post: 09-01-2007, 05:34 AM

Posting Permissions

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