How to change the size and position of a .NET dotNET test harness?
search cancel

How to change the size and position of a .NET dotNET test harness?

book

Article ID: 248926

calendar_today

Updated On:

Products

Gen - Workstation Toolset

Issue/Introduction

In using a .NET dotNET application test harnesses, how can the the size and position of the window be set?

Environment

Release : 8.6

Component : Gen Run Time, Proxies

Resolution

The initial size of the .NET Proxy test harness app is based on the generated proxy code.  The generated code can be hand modified to change this initial size.  The source code is found in:
 
<model.ief>\proxy\NET\src\<server load module>\samples\APP\<Server Procedure Step>.cs
 
In that C# code, look for this line:
 
this.ClientSize = new Size(nnn, nnn);
 
The 'nnn' number which the proxy generates is based on how import/export fields the server Pstep has.  Modify this number (ie make it smaller) and then rebuild the proxy.  The first number is the width of the panel and the second number is the height.

It's all relative to that Pstep so there is no recommendation for which values to use.  There isn't a way to influence this number in the model or at generation time.  If the proxy is regenerated, the code will need to be modified again.  If the import/export views remained unmodified, regeneration should not be needed.

The location of the test harness form is not set in the code.  Please see the link with Microsoft's form class with all of its parameters.  DesktopLocation appears to be the one needed to set the location.

https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.form?view=windowsdesktop-6.0