本文整理匯總了C#中System.Windows.Forms.CreateParams類的典型用法代碼示例。如果您正苦於以下問題:C# CreateParams類的具體用法?C# CreateParams怎麽用?C# CreateParams使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CreateParams類屬於System.Windows.Forms命名空間,在下文中一共展示了CreateParams類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DeviceChangeNotificationWindow
public DeviceChangeNotificationWindow()
{
CreateParams Params = new CreateParams();
Params.ExStyle = WS_EX_TOOLWINDOW;
Params.Style = WS_POPUP;
CreateHandle(Params);
}
示例2: MessageWindow
/// <summary>
/// Create new message window thread.
/// 新しいメッセージウィンドウを作る
/// </summary>
public MessageWindow()
{
MessageHandlers = new Dictionary<int, MessageHandler>();
System.Windows.Forms.CreateParams cp = new System.Windows.Forms.CreateParams();
cp.ClassName = "Message";
CreateHandle(cp);
}
示例3: DeviceWatcherWindow
public DeviceWatcherWindow(string Caption)
{
CreateParams cp = new CreateParams();
cp.Caption = Caption;
this.CreateHandle(cp);
}
示例4: ShellHook
public ShellHook(IntPtr hWnd)
{
CreateParams cp = new CreateParams();
/*// Fill in the CreateParams details.
cp.Caption = "Click here";
cp.ClassName = "Button";
// Set the position on the form
cp.X = 100;
cp.Y = 100;
cp.Height = 100;
cp.Width = 100;
// Specify the form as the parent.
cp.Parent = User32.GetDesktopWindow();
// Create as a child of the specified parent
cp.Style = (int) WindowStyle.WS_POPUP;// WS_CHILD | WS_VISIBLE;
cp.ExStyle = (int)WindowStyleEx.WS_EX_TOOLWINDOW;*/
// Create the actual window
this.CreateHandle(cp);
// User32.SetShellWindow(hWnd);
User32.SetTaskmanWindow(hWnd);
if (User32.RegisterShellHookWindow(this.Handle))
{
WM_ShellHook = User32.RegisterWindowMessage("SHELLHOOK");
#if DEBUG
Console.WriteLine("WM_ShellHook: " + WM_ShellHook.ToString());
#endif
}
}
示例5: Everything
public Everything()
{
var cp = new CreateParams
{
Caption = "PSEverything IPC Window",
ClassName = "Static",
ClassStyle = 0,
Style = 0,
ExStyle = 0,
X = 0,
Y = 0,
Height = 1,
Width = 1,
Parent = IntPtr.Zero,
Param = null
};
CreateHandle(cp);
var cs = new ChangeFilterStruct
{
Size = (uint) Marshal.SizeOf(typeof (ChangeFilterStruct))
};
if (!Win32.ChangeWindowMessageFilterEx(Handle, WindowMessage.CopyData, ChangeWindowMessageFilterExAction.Allow, ref cs))
{
throw new Win32Exception(Marshal.GetLastWin32Error(), "Error allowing WM_COPYDATA mesasage from lower privilege processes.");
}
}
示例6: StartListening
internal void StartListening()
{
ApplicationContext ctx = new ApplicationContext();
CreateParams cp = new CreateParams();
cp.Parent = (IntPtr)(-3); //Without this, WndProc will also intercept messages delivered to regular windows forms
this.CreateHandle(cp);
Application.Run(ctx);
}
示例7: Create
internal void Create() {
CreateParams _CP = new CreateParams();
if (System.Environment.OSVersion.Version.Major >= 5)
_CP.Parent = (IntPtr)HWND_MESSAGE;
CreateHandle(_CP);
}
示例8: ReceiverWindow
/// <summary>
/// Create a Windows Message receiving window object.
/// </summary>
public ReceiverWindow()
{
CreateParams createParams = new CreateParams();
createParams.ExStyle = 0x80;
createParams.Style = unchecked((int) 0x80000000);
base.CreateHandle(createParams);
}
示例9: CallbackWindow
internal CallbackWindow(CallbackWindowControlChangeHandler ptrMixerControlChange, CallbackWindowLineChangeHandler ptrMixerLineChange)
{
CreateParams cp = new CreateParams();
mPtrMixerControlChange = ptrMixerControlChange;
mPtrMixerLineChange = ptrMixerLineChange;
this.CreateHandle(cp);
}
示例10: Start
public void Start()
{
CreateParams createParams = new CreateParams();
createParams.ExStyle = 0x08000000;
createParams.Style = unchecked((int)0x80000000);
CreateHandle(createParams);
}
示例11: TrackingToolTip
/// <summary>
/// Initialize tracking tooltip control
/// </summary>
public TrackingToolTip()
{
// create params for a tracking tooltip window
CreateParams cp = new CreateParams();
cp.ExStyle = (int)WS.EX_TOPMOST;
cp.ClassName = WINDOW_CLASS.TOOLTIPS;
cp.Style = unchecked((int)(WS.POPUP | TTS.ALWAYSTIP | TTS.NOPREFIX));
// create the winow
CreateHandle(cp);
}
示例12: SettingsDlg
public SettingsDlg(IntPtr parent)
{
CreateParams cp = new CreateParams();
cp.ClassName = "Button";
cp.Style = WS_VISIBLE | WS_CHILD;
cp.Parent = parent;
cp.Width = 300;
cp.Height = 300;
cp.X = 100;
cp.Y = 100;
this.CreateHandle(cp);
}
示例13: DevNotifyNativeWindow
internal DevNotifyNativeWindow(OnHandleChangeDelegate delHandleChanged, OnDeviceChangeDelegate delDeviceChange)
{
mDelHandleChanged = delHandleChanged;
mDelDeviceChange = delDeviceChange;
CreateParams cp = new CreateParams();
cp.Caption = WINDOW_CAPTION;
cp.X = -100;
cp.Y = -100;
cp.Width = 50;
cp.Height = 50;
CreateHandle(cp);
}
示例14: NativeUpDown
public NativeUpDown(UpDown OwnerControl) {
CreateParams cp = new CreateParams();
cp.ClassName = "msctls_updown32";
cp.X = cp.Y = 0;
cp.Width = OwnerControl.Width;
cp.Height = OwnerControl.Height;
cp.Parent = OwnerControl.Handle;
cp.Style = 0x50000040;
this.CreateHandle(cp);
this.fTrackMouseEvent = true;
this.TME = new QTTabBarLib.Interop.TRACKMOUSEEVENT();
this.TME.cbSize = Marshal.SizeOf(this.TME);
this.TME.dwFlags = 2;
this.TME.hwndTrack = base.Handle;
}
示例15: XDListener
/// <summary>
/// The non-obsolete constructor used internally for creating new instances of XDListener.
/// </summary>
/// <param name="nonObsolete"></param>
internal XDListener(bool nonObsolete)
{
// create a top-level native window
CreateParams p = new CreateParams();
p.Width = 0;
p.Height = 0;
p.X = 0;
p.Y = 0;
p.Caption = string.Concat("TheCodeKing.Net.XDServices.",Guid.NewGuid().ToString());
p.Parent = IntPtr.Zero;
base.CreateHandle(p);
this.networkRelay = new NetworkRelayListener(XDBroadcast.CreateBroadcast(XDTransportMode.WindowsMessaging),
XDListener.CreateListener(XDTransportMode.MailSlot));
}