So I am trying to draw an Image using CLR console application, using the .NET library. I found this code on https://msdn.microsoft.com/en-us/library/dbsak4dc(v=vs.110).aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-2 ,but I dont know what arguments I have to use to run the DrawMyImage
function
using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;
void DrawMyImage(PaintEventArgs^ e)
{
Image^ newImage = Image::FromFile("picture.png");
int x = 100;
int y = 100;
int width = 350;
int height = 450;
e->Graphics->DrawImage(newImage, x, y, width, height);
}
int main(array<System::String ^> ^args)
{
DrawMyImage();
return 0;
}
If there is any other easy way to display images from console application feel free to say.