AdvancedHMI Software

General Category => Support Questions => Topic started by: CptHook on June 28, 2016, 12:15:13 PM

Title: Removing the title bar
Post by: CptHook on June 28, 2016, 12:15:13 PM
Does anyone know if there is a way to remove the title bar?

I've put the HMI on a tablet and am looking to make it more difficult for the user to get outside of the screen that I have set up.

Thanks!
-Steve
Title: Re: Removing the title bar
Post by: Archie on June 28, 2016, 03:36:34 PM
- Click on a blank area of your form
- In the Properties Window, change FormBorderStyle to None

You may also want to set WindowsState to Maximized. Those settings will not allow you to exit the application unless you use Alt-F4 on a keyboard or with Task manager. There is a trick I use to exit for updates. I leave the AdvancedHMI logo PictureBox on the form, then setup a double click to exit like this:

- Right click on a blank area of the form and select View Code
- Enter this code:
Code: [Select]
    Private Sub PictureBox1_DoubleClick(sender As Object, e As EventArgs) Handles PictureBox1.DoubleClick
        Close()
    End Sub
Title: Re: Removing the title bar
Post by: CptHook on June 28, 2016, 04:11:33 PM
This is great. Thanks!

Is there a way to use your Picture Box trick open a different form? I like the close concept, but was hoping I could use it to bring it back to a menu selection.

Thanks for the help!
-Steve
Title: Re: Removing the title bar
Post by: Archie on June 28, 2016, 04:13:44 PM
In the ToolBox, there is a FormChangeImage

Or like the code above, instead of using "Close()", you could use something like Page2.Show

Title: Re: Removing the title bar
Post by: CptHook on June 28, 2016, 05:19:03 PM
Perfect! Thanks!!

-Steve