随笔 - 290  文章 - 10  评论 - 85  2

注意点:  图像数据, base64编码后,记得要urlencode, 否则会提示image format wrong

 

 

winform 多窗体相互切换form

    public partial class FrmSideBar : Form
    {
        private Form1 mainForm = null;
        public FrmSideBar(IntPtr frmPtr)
        {
            InitializeComponent();
            this.mainForm = (Form1)Form1.FromHandle(frmPtr);

            int Y = Screen.PrimaryScreen.Bounds.Height- this.Height- 38;
            int X = Screen.PrimaryScreen.Bounds.Width - this.Width;

            this.Location = new Point(X,Y);
        }
}
            Program.frmSideBar = new FrmSideBar(this.Handle);
            Program.frmSideBar.ShowDialog();
    static class Program
    {

        public static Form1 form1 = null;
        public static FrmSideBar frmSideBar = null;

}

 

posted on 2019-02-20 14:15  Gu  阅读(...)  评论(...编辑  收藏