Skip to content

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

@matiascirojimenez

Description

@matiascirojimenez

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions