Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I randomly get this error when the notification is triggered. #28

Open
matiascirojimenez opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@matiascirojimenez
Copy link

System.ArgumentException: The parameter is invalid.
en System.Drawing.Image.get_RawFormat()
en System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
en Tulpep.NotificationWindow.PopupNotifierForm.PopupNotifierForm_Paint(Object sender, PaintEventArgs e)
en System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
en System.Windows.Forms.Form.OnPaint(PaintEventArgs e)
en System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
en System.Windows.Forms.Control.WmPaint(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
en System.Windows.Forms.Form.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

My code:

PopupNotifier popup = new PopupNotifier();
popup.Image = Properties.Resources.western_union_logo;
popup.ImagePadding = new Padding(10);
popup.ImageSize = new Size(75, 75);
popup.BodyColor = Color.LightGray;
popup.TitleText = title;
popup.TitleColor = Color.Black;
popup.TitleFont = new Font("Century Gothic", 15, FontStyle.Bold);
popup.ContentText = bodyText;
popup.ContentColor = Color.Black;
popup.ContentFont = new Font("Century Gothic", 12);
popup.Click += new EventHandler(this.popup_Click);
popup.Popup();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant