private void Form1_Load(object sender, EventArgs e) { var ava = (System.Drawing.Bitmap)ImageBase64.Base64ToImage(Properties.Settings.Default.avatar_img_b64); UsrPicBox.Image = ava; if (File.Exists(Properties.Settings.Default.theme_img_path)) { var file = new FileInfo(Properties.Settings.Default.theme_img_path); if (file.IsJpeg() || file.IsGif() || file.IsPng()) { this.BackgroundImage = Image.FromFile(Properties.Settings.Default.theme_img_path); } } else { var img = new Bitmap(Form01_mainForm.mainPanel.FindForm().Width, Form01_mainForm.mainPanel.FindForm().Height); using (Graphics g = Graphics.FromImage(img)) g.Clear(Color.LightPink); this.BackgroundImage = img; } frm2 = new Form02_setting(); frm8 = new Form08_theme(); RowPanel.BackColor = Color.FromArgb(40, Color.White); MenuPanel.BackColor = Color.FromArgb(120, Color.White); UsrnameButton.Text = Properties.Settings.Default.usrname; show_mainMenu(); }
private void themeButton_Click(object sender, EventArgs e) { frm8 = new Form08_theme(); frm8.Location = themeButton.PointToScreen(new Point(Point.Empty.X - (int)(0.670 * frm8.Size.Width), Point.Empty.Y + 24)); frm8.Show(this); }