Pi5 VS conversion - Full Screen with Menu no access to Pi menus

I am in process of converting a VS solution to XOJO for Pi. The VS solution has a menu implementation which I am in process of converting. The part that is slowing me down is creating a DesktopWindow that goes edge to edge (Full Screen) while implementing a window and not enabling the user to access the Pis regular screen.

Selecting FullScreen in DesktopWindow Behavior did not work - could be dimensions I have selected but I attempted to make changes without success.

I have attempted to use every Frame Type available without success. The problem is I can find a way to move this DesktopWindow which is what I want to prevent.

I also ran into an interesting behavior. The back color is black. When I set that back color the menu bar partially disappears however when I select the area a menu appears

For development I am using a 10.1" touchscreen (1024x600) and in use it will be a 7" touch screen. Both screens will have the same resolution. The importance here is that there are several Containers that will be displayed in a DesktopPagePanel. Then when selecting the appropriate MainPanel.SelectedPanelIndex that Container is presented.

I attach a pic that shows the three areas. The two on the left remain as I select a new view from the menu which is what causes the the Container to appear in the large rectangle to the right.

For the MainScreen Frame No buttons are active and Resizable is not selected.

In the Open event of the Window, I have…
me.FullScreen = true
…and that seems to work on Pi.

If you set the bounds you may have better working positioning:

Here is my pi5 working kiosk mode function:

Public Sub KioskMode(Extends wnd As DesktopWindow)
  System.DebugLog "Setting window to kiosk mode"
  
  wnd.Left = 0
  wnd.Top = 0
  
  App.MenuBar = Nil
  wnd.MenuBar = Nil
  wnd.FullScreen = True
  
  Var d As DesktopDisplay = DesktopDisplay.DisplayAt(0)
  wnd.Left = d.AvailableLeft
  wnd.Top = d.AvailableTop
  wnd.Width = d.AvailableWidth
  wnd.Height = d.AvailableHeight
  
  #If DebugBuild Then
    System.DebugLog "Display 0: left " + d.Left.ToString
    System.DebugLog "Display 0: top " + d.Top.ToString
    System.DebugLog "Display 0: width " + d.Width.ToString
    System.DebugLog "Display 0: height " + d.Height.ToString
    System.DebugLog "Display 0: available left " + d.AvailableLeft.ToString
    System.DebugLog "Display 0: available top " + d.AvailableTop.ToString
    System.DebugLog "Display 0: available width " + d.AvailableWidth.ToString
    System.DebugLog "Display 0: available height " + d.AvailableHeight.ToString
  #EndIf
  
  Var r As New Rect(d.Left, d.Top, d.Width, d.Height)
  wnd.Bounds = r
  
  #If DebugBuild Then
    System.DebugLog "Window left: " + wnd.Left.ToString
    System.DebugLog "Window top: " + wnd.Top.ToString
    System.DebugLog "Window width: " + wnd.Width.ToString
    System.DebugLog "Window height: " + wnd.Height.ToString
    
    System.DebugLog "WIndow Bounds Left: " + wnd.bounds.Left.ToString
    System.DebugLog "WIndow Bounds Top: " + wnd.bounds.Top.ToString
    System.DebugLog "WIndow Bounds Width: " + wnd.bounds.Width.ToString
    System.DebugLog "WIndow Bounds Height: " + wnd.bounds.Height.ToString
  #EndIf
  
  System.Cursors.Hide
  
End Sub

Note i set the menuBar to nil you may want to change that since you use a menubar !

Interesting. I have never used Extends. I see how to create the Public Sub. How do I call this from Desktop Super named MainScreen?

Add that method to a module, make it global

on any window instance call it using myWindowInstance.KioskMode

I see what I did. I placed this in the window. When I placed this on the Super - DesktopApplication I could call MainScreen.KioskMode

Interestingly I have a touch screen and was going to implement BevelButtons but cannot get them to work. Events Pressed, MenuSelected or even any mouse detection do not fire. If I have menu showing selections from a MenuBar then when I touch a BevelButton the Menu clears but either a Pressed Event or Menus do not appear when configured on the BevelButton.

I would like to use BevelButtons verses menus to free up screen real estate. I did notice that Okay, Cancel or regular Buttons and DesktopPopupMenu work. Must be something in the TouchScreen that XOJO does not pick up the event.