Page 1 of 1

How to get rid of the windows border, when using a popup?

Posted: Fri Feb 14, 2020 5:16 pm
by tweety
Hello all,

I want a popup without the blue border on top of the popup.
I found some script here, that i use that should elemenate this border, but it doesn't.

Also trying to adjust settings, that does not work either
Is it possible to do this?

My laptop is WIndows 10, and IX is 2.40 SP1

I hope somebody can help.

Greetings,
|Tweet

Re: How to get rid of the windows border, when using a popup

Posted: Tue Feb 18, 2020 11:40 am
by Josh B.
Scripting is required to remove the popup windows border. I have attached a project showing example code that can be used to achieve the desired effect.

If anyone has questions or requires further assistance, please contact us at 801.708.6690 or send us an Email at support.americas@beijerelectronics.com. Thank you.

Re: How to get rid of the windows border, when using a popup

Posted: Tue Feb 18, 2020 3:14 pm
by tweety
Hi Josh,

I know the script, and i use it with valves etc.

Even if i use the script, the border is still visible. I think, some screen positioning is also relevant here. I have some valves here, and i managed to get one valve borderless. It had to do with resizing and shifting the size of the screen, but i can't recall how i did this. What i see in editing mode is that my borderless popup screen is not complete. On the bottom some buttons are cut in half, but my popup is intakt if i test it. As i wrote, i can't recall it, and why i see the popup broken, and why i see it compleet is a mystery toe me.

Re: How to get rid of the windows border, when using a popup

Posted: Thu Feb 20, 2020 12:54 pm
by Russ C.
Hi Tweety,

I think we would need a copy or your project, to better understand.
Are you able to post it here? If not you can email it to us using the "Contact Us" link in my signature.

Re: How to get rid of the windows border, when using a popup

Posted: Mon Feb 24, 2020 8:22 am
by prichlin
Hello Tweety,
I have had a similar question on a recent project. You may want to remove the titlebar so the operator cannot drag the popup, or to match your look and feel. I can think of two approaches to removing the popup's titlebar.

First: Locate the Popup in the X,Y position you want it to display in and then adjust it's width and height as below.
Credit to Russ Clegg for this more elegant solution.

Code: Select all

void MyPopupWindow_Opened(System.Object sender, System.EventArgs e)
{
	this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
	if(Environment.OSVersion.Platform == PlatformID.WinCE) // Reduce popup window size if running on CE on iX 2.0
	{
		this.Width = this.Width - 2;
		this.Height = this.Height -25;
	}
}
Second: Probably the less practical approach for most panel layouts would be to simply move the popup up (in negative Y) after it is placed so that the titlebar is above the viewable are of the screen. It will need to be at least at Y=-25 or higher.

Code: Select all

void MyPopupWindow_Opened(System.Object sender, System.EventArgs e)
{
	this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
	if(Environment.OSVersion.Platform == PlatformID.WinCE) // Reduce popup window size if running on CE on iX 2.0
	{
		this.Top = this.Top - 25;
	}
}
If you are going to remove the titlebar's close button, remember to provide an alternate close method, alternate controls, or include this in your panel's process as you see fit.

Hope this helps!