Daniel
2008-08-16 02:07:14
Making a Form Full-Screen
By Dan's The Man
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* :p), 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:
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:
FormName.Left := blah;
FormName.Top := blah;
FormName.Width := blah;
FormName.Height := blah;with
FormName.SetBounds(TR.Left, TR.Top, TR.Right-TR.Left, TR.Bottom-TR.Top);whilst adding this variable as a local variable:
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:
FormName.Left := blah1;
FormName.Top := blah2;
FormName.Width := blah3;
FormName.Height := blah4;So, you'll do this with SetBounds instead (much shorter ;)):
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 ;)