问题描述: 有一个主窗口程序,需要给该程序添加一个通知子窗口.子窗口的位置为右下角. 解决方法: 在子窗口frmPopMsg的代码文件中添加如下代码: public frmPopMsg() { InitializeComponent(); int x = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Size.Width -this.Width; int y = System.Windows.Forms.Screen.PrimaryS
1:新建winfrom 窗体应用程序 2:拖入contextMenuStrip.notifyIcon 2个控件 3:如图 4:code: 注意:复制控件事件要注册 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System
问题:dcef3 for Firemonkey 浏览器控件,拉动窗体大小会闪烁的问题 修改源码:ceffmx.pas 找到 procedure TCustomChromiumFMX.Resize; 修改如下: procedure TCustomChromiumFMX.Resize; var brws: ICefBrowser; b: TBitmap; begin inherited; if not (csDesigning in ComponentState) then begin brws :
调用WindowsAPI使窗体始终保持置顶效果,不被其他窗体遮盖: [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern int SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int y, int Width, int Height, int flags); /// <summary> /// 得到当前活动的窗口 /// &
[StructLayout(LayoutKind.Sequential)] public struct FLASHWINFO { public UInt32 cbSize; public IntPtr hwnd; public UInt32 dwFlags; public UInt32 uCount; public UInt32 dwTimeout; } public class PInvoke { [DllImport("user32.dll")] public static ext
1.通过tag属性传输,tag属性是存储与空间密切相关的数据.比如登陆界面的数据传输给主界面. 子窗体 主窗体 定义一个类 namespace FrmLogin { public class User { public string UserName { set; get; } public string PassWorld { set;