'System.Runtime.InteropServices.ExternalException' occurred in System.Drawing.dll'

StackOverflow https://stackoverflow.com/questions/21923847

  •  14-10-2022
  •  | 
  •  

Question

Why get an error:

'System.Runtime.InteropServices.ExternalException' occurred in System.Drawing.dll

here:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace MacierzeJacobiego
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

No correct solution

OTHER TIPS

Go under the DEBUG menu, select "Exceptions", and from the dialog that comes up, place a check box in the "Thrown" column for "Common Language Runtime Exceptions". Click OK, and then try debugging again.

Execution will stop where the exception occurs.

Cheers

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top