📄 pocketfrogeffect.cs.svn-base
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Aspecto.PocketFrog;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;
using Microsoft.WindowsCE.Forms;
namespace Aspecto.FlowFX
{
public class PocketFrogEffect : Effect
{
protected static Display display;
private static ScreenOrientation lastOrientation;
private void initialise(Form f)
{
if (display == null || lastOrientation != SystemSettings.ScreenOrientation) // CW is 270
{
if (display != null)
display.Dispose();
lastOrientation = SystemSettings.ScreenOrientation;
DisplayParameters dp = new DisplayParameters((DisplayOrientation)lastOrientation, SwapEffect.SWAP_DISCARD);
display = Display.Create(new Control(), dp);
GXCloseInput();
}
}
[DllImport("gx.dll",EntryPoint="?GXCloseInput@@YAHXZ")]
private static extern int GXCloseInput();
protected Surface TakeScreenShot(int offset)
{
int w = Screen.PrimaryScreen.Bounds.Width;
int h = Screen.PrimaryScreen.Bounds.Height;
Surface surface = new Surface(w, h);//TakeScreenShot(-lastForm.Bounds.Y);
IntPtr dc = surface.GetDC(false);
IntPtr screenWnd = DrawingWrapper.GetForegroundWindow();
IntPtr dc1 = DrawingWrapper.GetDC(screenWnd);
DrawingWrapper.StretchBlt(dc, 0, 0, w, h, dc1, 0, offset, w, h, DrawingWrapper.SRCCOPY);
surface.ReleaseDC(dc);
DrawingWrapper.ReleaseDC(screenWnd, dc1);
return surface;
}
public override void Swap(FlowForm lastForm, FlowForm nextForm, bool opening)
{
base.Swap(lastForm, nextForm, opening);
initialise(lastForm);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -