简体   繁体   English

.NET Compact Framework上的事件最大化

[英]Maximize event on .NET compact framework

I have created a fullscreen application in C# .NET Compact Framework for Windows CE. 我已经在Windows CE的C#.NET Compact Framework中创建了一个全屏应用程序。 My customer would like to use a function key to minimize the app. 我的客户想使用功能键来最小化应用程序。 I have bound F2 to this key using the following code: 我已使用以下代码将F2绑定到此键:

private void Minimize()
{
    this.FormBorderStyle = FormBorderStyle.FixedDialog;
    this.WindowState = FormWindowState.Normal;
    this.ControlBox = true;
    this.MinimizeBox = true;
    this.MaximizeBox = true;
    ShowWindow(this.Handle, SW_MINIMIZED);
}

ShowWindow is an external method from the "coredll.dll" file. ShowWindow是“ coredll.dll”文件中的外部方法。 Because the "coredll" file cannot minimize an app without ControlBoxes I have to show them before I minimize. 由于“ coredll”文件无法在没有ControlBox的情况下最小化应用程序,因此必须在最小化之前显示它们。

However when the user maximizes the application again, I would like to undo everything I did before the external call in the Minimize method. 但是,当用户再次最大化应用程序时,我想撤消在Minimize方法中进行外部调用之前所做的一切。 How would I do this? 我该怎么做? I do not see an "OnMaximize" event in on the form? 我在窗体上没有看到“ OnMaximize”事件吗? Any help would be greatly appreciated :-). 任何帮助将不胜感激 :-)。

我无法尝试此操作,但是我记得最大化窗口时会执行OnActivated或OnShow。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM