Hiding the dock and menu bar

Hi All.

After doing some reading and searching through the forum, I read that MBS has something that will “do the job” for me.

So I went to MonkeyBread Software and found the Xojo Plugins (currently for evaluation) but there is something like 54 to choose from.

Which one do I need?

Also I found this in the forum from ChristophDV:


Found it with MBS

`dim myProcess as ProcessMBS
myProcess=new ProcessMBS
myProcess.GetCurrentProcess		
if myProcess.TransformProcessType(myProcess.kProcessTransformToUIElementApplication) = 0 then
end if`

To show the Dock Icon again:

`if myProcess.TransformProcessType(myProcess.kProcessTransformToForegroundApplication) = 0 then
end if`
[/quote]

I assume that because he calls ProcessMBS that HE is using MonkeyBread Software Plugins?

Regards

Usually I just download them all (there’s a “Complete” package) and put them all in the “Plugins” folder. You don’t need to limit to only the correct one being installed.

Correct. All the additions that the MBS plugins provide are suffixed with “MBS”, exactly to make this obvious.

Although I don’t use this particular feature of the MBS plugins, what I do to find which Plugin files to use, is the following:

From the MBS Xojo website, click on the “Documentation” link on the left, then the “Classes” link.

This opens the MBS List of Classes, from which you can lookup ProcessMBS under the “P” directory.

Which brings me to the ProcessMBS documentation page. At the top of the page, it tells you which Plugin file this class belongs to. In this case the MBS Util Plugin.

Some MBS Plugins have dependencies to other Plugin files, so always double-check the Dependencies page (also linked on the left) to see if you need any others. In this case, it looks like all you need is the MBS Xojo Util Plugin.xojo_plugin file.

Drop the file into your Xojo /Plugins folder, then restart the IDE for it to recognize it.

1 Like

Doing so can greatly increase IDE launch time, compile time, and pre-compiling plugins time. That is why I created Plugins Pro. :slight_smile:

2 Likes

:point_up_2: What @Tim_Parnell said

Thanks for you all answering it.
If some question is left, maybe I can help?

You may just need to install Main and Util parts.

Hi Christian.

Oh yeah, I need help with this.

I used Tim Parnell’s program, Plugins Pro, and after it ran, I had this…

I am NOT a professional programmer, and have had NO formal training, so I am kind of confused as to what I have to do to use this.

Any help is appreciated.

Regards

When you use Plugins Pro you aren’t meant to dig around the /Managed/ folder.

Drag both MBS Xojo Util Plugin.xojo_plugin and MBS Xojo Main Plugin.xojo_plugin into Plugins Pro, ensure both the plugin set and plugins themselves are checked (to mean “active and installed”), and click “Apply Changes”. When you next launch Xojo, both the Main and Util plugins should be installed and active.

Hi Tim.

Ok, did as you said,

Screenshot 2024-09-08 at 8.42.58 PM
and ran a little test program with the ChristophDV code, and I do see my dock icon for my temporary program disappear from the mac dock.

Now, how do I make the entire dock and menubars disappear? I’m going through the MBS Docs right now, but if I can be pointed in the right direction, that would help.

Regards

You like to make a window fullscreen, so you have the whole screen?
There is a fullscreen property for the window class.

Yeah, that’s why using the MBS to make the dock icon disappear isn’t very useful. Instead use this in a build script:

'set scheduler to be a background app
dim dbg as String
if debugBuild then dbg = ".debug"
dim appNameForShell as string
appNameForShell = PropertyValue("App.MacOSXAppName") + dbg +".app" + "/Contents/Info.plist"
appNameForShell = replaceall(appNameForShell, " ", "\ ")
dim theResult as string
theResult = DoShellCommand("/usr/libexec/PlistBuddy -c ""Add :NSUIElement string \""true\"""" " + CurrentBuildLocation + "/" + appNameForShell )
if theResult <> "" then print theResult

thank you Beatrix.

Is that script part of MBS as well?

I went to the documentation, and Xojo Documentation code (shown below) fails when I just do a testrun.

Here is the URL:

https://documentation.xojo.com/topics/build_automation/ide_scripting/building_commands.html

Here is their code:

Var appPath As String
appPath = BuildApp(16) ' Mac 64-bit build
Print("Built: " + appPath)

I just put it into a button to see what would happen.

If it is in MBS, where is it? What plug in?

I looked for the Files Plugin but can’t seem to find one.

Regards

No MBS, just an ordinary IDE script.

Setting the window property SystemUIVisible to false will hide the dock and menubar when that window is active.

https://documentation.xojo.com/api/user_interface/desktop/desktopwindow.html#desktopwindow-systemuivisible

Hi Jared.

Thank you for the information, but it doesn’t seem to work for me.

In both of my windows I have added:

Am I doing it correct? From what I read in the documentation, it is, but I make a great number of errors…

Regards

Try

me.SystemUIVisible = False

in the Window Opening event.

THAT’S IT.

Thank you (1000 times).

And it hides my menu too.

Regards

1 Like

Now can I ask one question?

In my first image, I added the SystemUIVisible = FALSE.

Should that not have worked as well as the code?

Regards

Attributes are a rarely (never in my cased) used feature that control how project items appear in the actual Xojo IDE.

Here’s the documentation around those:

https://documentation.xojo.com/getting_started/object-oriented_programming/advanced_oop_features.html#getting-started-object-oriented-programming-advanced-oop-features-special-attributes

Thanks, Jared.