none
Full Screen and Splash Screen RRS feed

  • General discussion

  • Hello

    I stumbled upon a way to get a Full Screen (SB style[native]) mode. On my win7 system this code will hide the Task Bar!! and ALL window borders. It does show the Window Title.

    GraphicsWindow.Left = 0
    GraphicsWindow.Top = 0
    GraphicsWindow.CanResize = "False"
    GraphicsWindow.Width = Desktop.Width
    GraphicsWindow.Height = Desktop.Height

    Could others run this Program and let us know if it works on different systems: SXG460.

    (excuse the unrelated comments in this program)

    NOTE: to get your task bar back press the Windows Key. ALSO include code that allows the user to close or restore their screen.

    =======BELOW is a summary of Replies=========================

    Above is Full Screen SB style.

    This is True Full Screen Sample by Zock:

    GraphicsWindow.Left = 0
    GraphicsWindow.Top = 0
    GraphicsWindow.CanResize = "False"
    GraphicsWindow.Width = Desktop.Width
    GraphicsWindow.Height = Desktop.Height
    LDUtilities.GWStyle = 0

    Here's a Splash Screen sample:

    'To centre set CanResize and GWStyle properties first
    GraphicsWindow.CanResize = "False"
    LDUtilities.GWStyle = 0
    
    'To Check Centred
    GraphicsWindow.Height = Desktop.Height - 5
    
    GraphicsWindow.Left = (Desktop.Width - GraphicsWindow.Width) / 2
    GraphicsWindow.Top = (Desktop.Height - GraphicsWindow.Height) / 2





    Sunday, May 4, 2014 3:43 AM
    Moderator

All replies

  • Jibba Jabba,

    Your program works on my Windows 8.1


    Jan [ WhTurner ] The Netherlands

    Sunday, May 4, 2014 9:07 AM
    Answerer
  • Thanks Jan.
    Sunday, May 4, 2014 12:09 PM
    Moderator
  • For my Butterfly-Jewelery and Aquarium 'Screensaver' (like) Programms i use fullscreen mode (w/o title bar) like this:

    TBH = 60      ' Taskbar Height  (eg. 2 rows of small icons -> 60)
    ' a very handy small PixelMeasurer you can get free from
    ' http://www.linxexplorer.com/download.html
    ' http://www.linxexplorer.com/download/pixmeasur1xs.exe
    
    GW = Desktop.Width+7
    GH = Desktop.Height-TBH-7
    GraphicsWindow.Hide()
    'BuildGUI()
    GraphicsWindow.Left = -7
    GraphicsWindow.Top = -29    ' Hide Titlebar
    GraphicsWindow.Width = GW
    GraphicsWindow.Height = GH
    GraphicsWindow.Show()
    
    
    GraphicsWindow.MouseDown = OnMouseDown
    
    Sub OnMouseDown
        Program.End()
    EndSub



    Sunday, May 4, 2014 1:33 PM
    Answerer
  • Jibba Jaba's code works well for me.

    But for some reason the one of Papa Lapub doesn't work properly.


    Mit freundlichen Grüßen Timo Greetings Timo

    Sunday, May 4, 2014 2:56 PM
  • @Timo

    You have to measure the height of your taskbar (this is for taskbar at the bottom of the screen). Therefor the PixelMeasurer link. Then adjust the TBH value according to the taskbar height. It fills the whole desktop, except taskbar, which is visible and title bar of SB GraphicsWindow is hidden (upper desktop top). Works at any rate on W7 32bit.

    Day- and Night(17h-7h) mode of 'Jewelery' (Butterfly-Moths). I only cut off my taskbar.

    Sunday, May 4, 2014 4:10 PM
    Answerer
  • Thanks for replies Jan, Pappa and Timo.

    Hopefully someone with XP will try and post results for running on the Desktop.

    It seems the code is reliable for all Taskbar property settings, e.g. fixed, top-side-bottom, and auto hide.

    Vijaye posted similar code years ago on http://social.msdn.microsoft.com/Forums/en-US/9d7f54b0-4edb-439c-be02-76183d7bbfc6/full-screen?forum=smallbasic

    but they didn't include: GraphicsWindow.CanResize = "False" (maybe earlier version)

    So good news is you might be able to release "Full Screen - SB style" code for Win Desktop.

    Also for gamers you don't have to fill the screen with game play you could use a b/ground image as a border to fill for different aspect ratio's. So noResize just 2 Scales at 16:9 for game play is a simple approach I might try. And maybe get the Screen ratio and let the b/ground border sort that out.



    Sunday, May 4, 2014 8:19 PM
    Moderator
  • To really hide GraphicsWindow title bar one can use LDUtilities.GWStyle = 0, else min. GW.Width is limited to 116 Pxl.

    That allows crazy things like letting the GW fly like a bird or open/close like a book. see ID: NTH700 (GW-Folding).

    If you have an active x-Mouse move cursor on taskbar. Exit program by click on GW, when it is open again.

    Some other interesting stuff on GW would be 'Pin to Cursor', 'Snap To Screen Edges/Borders', 'Earthquake' (search for Earthquake JS Browserscript therefor) or remember the 'Billard / Paddle game' from 'Introduction to MS SmallBasic.pdf'. The same one can do a number greater and let the GW bounce across the desktop like a billard ball. ("Try to catch me :-)").

    Tried them all, work all and 's a lot of fun. Maybe would be worth a month's challange (Playing with GW). This most of the time hangs around lazy on the desktop and does'nt get so much agitation.

    PS: When using GraphicsWindow.CanResize = "False" ' or 0, 1, -1 etc.

    this should be set BEFORE setting GraphicsWindow.Width and GraphicsWindow.Height. Else it (CanResize) changes the other settings again.

    Good nite

    Sunday, May 4, 2014 10:04 PM
    Answerer
  • GraphicsWindow.Left = 0
    GraphicsWindow.Top = 0
    GraphicsWindow.CanResize = "False"
    GraphicsWindow.Width = Desktop.Width
    GraphicsWindow.Height = Desktop.Height
    LDUtilities.GWStyle = 0

    This is actual full screen


    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

    Monday, May 5, 2014 5:13 PM
    Answerer
  • That's a total full screen!

    Add the following to the program to be able to close it wit a key press without Ctrl+Alt+Del.

    GraphicsWindow.KeyDown = OnKeyDown
    Sub OnKeyDown
      Program.End()
    EndSub


    Monday, May 5, 2014 5:21 PM
    Moderator
  • Nice one Pappa & Zock.

    You can hit the windows key as well to get the task bar up.

    Hey I think there's something up with the forum???

    I'm not getting any email alerts and there was the occasional duplication of posts.


    Monday, May 5, 2014 8:46 PM
    Moderator
  • thanks PL. Some top ideas there.

    Monday, May 5, 2014 8:50 PM
    Moderator
  • You can also use the windows key to get up the Taskbar.

    btw: I'm getting no email alerts from the forum and the occasional duplicated post.

    Monday, May 5, 2014 9:00 PM
    Moderator
  • Has anyone found a way to do a splash screen yet?
    Monday, May 5, 2014 9:04 PM
    Moderator
  • Hi JJ,

    Ok, don't like splash screens so much and try to block/hide em if possible but if you want

    1.) only one window at a time (= Splash Screen) then i would use LDUtilities.GWStyle = 0 or the style you like, hide it after a given dalay, set (back) the style, rebuild it in the background then and show it up again as application window or

    2. if there should be both windows at the same time, there's LDWindows. The main window (GW) with ID 0 and additional window (Splash screen with image or text) with window ID 1.

    Tuesday, May 6, 2014 6:30 PM
    Answerer
  • Thanks PL

    I still get a border with LDUtilities.GWStyle = 0 for a splash screen. It seems to only hide the title bar.

    I like them when a program installs or has a big d/load when it starts.


    Wednesday, May 7, 2014 6:39 PM
    Moderator
  • Hey Zock

    Is it ok with you if I post your sample into the 1st post? Makes it easier for people searching to find it.

    Wednesday, May 7, 2014 6:52 PM
    Moderator
  • When i run:

    LDUtilities.GWStyle = 0
    GraphicsWindow.CanResize = "False"

    GraphicsWindow.MouseDown = OnMouseDown
    GraphicsWindow.KeyDown = OnKeyDown

    Sub OnMouseDown
      Program.End()
    EndSub
    Sub OnKeyDown
      Program.End()
    EndSub

      , it looks like a white splash screen...


    Wednesday, May 7, 2014 10:50 PM
    Answerer
  • Thanks PL!

    Me too. Excellent. I didn't try canResize.

    I'll update this threads Subject and original post to help topic delivery.

    Thursday, May 8, 2014 9:42 PM
    Moderator