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

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
tweety
Posts: 2
Joined: Fri Feb 14, 2020 5:05 pm

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

Post 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

Josh B.
Posts: 36
Joined: Wed Oct 30, 2019 11:43 am

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

Post 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.
Attachments
Popup_no_title_bar.zip
(38.04 KiB) Downloaded 56 times

tweety
Posts: 2
Joined: Fri Feb 14, 2020 5:05 pm

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

Post 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.

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

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

Post 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.
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

prichlin
Posts: 18
Joined: Thu Feb 20, 2020 7:59 am

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

Post 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!

Post Reply