Topics

Window State Property from Dot Net

Mulyadi Jet
 

Hi all,

How to update window state of mdi child to maximized with dotnet property.
I already have dot net variable that update with DNCast(DotNet.System.Windows.Forms.Form.ActiveMDIChild,DotNet.System.Windows.Forms.Form)
But i dont know how to update that variable with DNSert for getting the form open with maximized state.

Thank you in advance

Steven Blank
 

Have you considered the WinMaximize() function?

Steve Blank


On 5/16/2020 3:08 AM, Mulyadi Jet via groups.io wrote:
Hi all,

How to update window state of mdi child to maximized with dotnet property.
I already have dot net variable that update with DNCast(DotNet.System.Windows.Forms.Form.ActiveMDIChild,DotNet.System.Windows.Forms.Form)
But i dont know how to update that variable with DNSert for getting the form open with maximized state.

Thank you in advance

Mulyadi Jet
 

Hi Steve,

Yes i already used winmaximize() function, but i didnt work in mdi child form, it nly works in sdi form.
I used mdi child, and seem it cannot be maximized when open with the magic function.
So I think there's a way in dotnet to make it happen.

Mulyadi


On Sat, May 16, 2020 at 10:51 PM, Steven Blank
<sgblank@...> wrote:

Have you considered the WinMaximize() function?

Steve Blank


On 5/16/2020 3:08 AM, Mulyadi Jet via groups.io wrote:
Hi all,

How to update window state of mdi child to maximized with dotnet property.
I already have dot net variable that update with DNCast(DotNet.System.Windows.Forms.Form.ActiveMDIChild,DotNet.System.Windows.Forms.Form)
But i dont know how to update that variable with DNSert for getting the form open with maximized state.

Thank you in advance


Gadi Birman
 

Assuming the form is cast to a variable A, this should be achieved by Evaluate operation :
DNSET(A.WindowState,Dotnet.System.Windows.Forms.FormWindowState.Maximized)
--
Gadi Birman

 

I know nothing (Manuel)

Don't underestimate the power of the Source (GB)

Mulyadi Jet
 

Thanks for helping Gadi, it works, the form maximized when it opened.

Here is another basic question again,
I have a full screen mainform (fit to mdi form) like homepage for the application that display button and chart, then from the pulldown menu in mdi frame i call a another mdi child form.
But when the user minimizes the other mdi child form, that form was hidden in the back of home page form.
Is there a way to bring that form minimized in front of the homepage form ?

Xpa 2.5

Thanks,
Mulyadi


On Sun, May 17, 2020 at 1:15 PM, Gadi Birman
<gadi@...> wrote:
Assuming the form is cast to a variable A, this should be achieved by Evaluate operation :
DNSET(A.WindowState,Dotnet.System.Windows.Forms.FormWindowState.Maximized)
--
Gadi Birman

 

I know nothing (Manuel)

Don't underestimate the power of the Source (GB)

Gadi Birman
 

Hello Mulyadi

Try the following:
1. Select a new dotnet variable B of type System.Windows.Forms.Form
2. In the Task Prefix of the child MDI cast the child form to variable B using the following Update operation:
DNCast (DotNet.System.Windows.Forms.Form.FromHandle(WinHWND(0)),DotNet.System.Windows.Forms.Form)
3. Evaluate operation: B.BringToFront()

--
Gadi Birman

 

I know nothing (Manuel)

Don't underestimate the power of the Source (GB)

Mulyadi Jet
 

Hi Gadi,

Thanks for your sharing

I follow your instruction and still the form minimized in the back of homepage form.
Did I miss something ?

Thanks



On Sun, May 17, 2020 at 7:44 PM, Gadi Birman
<gadi@...> wrote:
Hello Mulyadi

Try the following:
1. Select a new dotnet variable B of type System.Windows.Forms.Form
2. In the Task Prefix of the child MDI cast the child form to variable B using the following Update operation:
DNCast (DotNet.System.Windows.Forms.Form.FromHandle(WinHWND(0)),DotNet.System.Windows.Forms.Form)
3. Evaluate operation: B.BringToFront()

--
Gadi Birman

 

I know nothing (Manuel)

Don't underestimate the power of the Source (GB)

Gadi Birman
 

Hi Mulyadi 

I'm not sure I understand what you mean by "minimized in the back of homepage form".

--
Gadi Birman

 

I know nothing (Manuel)

Don't underestimate the power of the Source (GB)