Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
System.Drawing - For displaying images
System.Drawing.Drawing2D - For displaying images
Microsoft.Win32 - For accessing the registry

private void MainForm_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
...
}

public Bitmap(
string filename
);

private void MainForm_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
...
...
Graphics g = e.Graphics;
MyBitmap = new Bitmap("c:\\image.bmp");
g.DrawImage( MyBitmap, new RectangleF(MyPoint.X, MyPoint.Y,
MyBitmap.Width*(fScale), MyBitmap.Height*(fScale)) );
...br> ...
}

What I have tried:

I have not. But this is what I wanna know: What is
. Now I just tried to ask you.
Posted
Updated 11-Mar-17 9:04am
v3
Comments
Richard MacCutchan 11-Mar-17 10:29am    
What?

<br> is a HTML tag (break) it is in code from original source (i think you have copy the code from a web page), in c# just comment the line
 
Share this answer
 
It looks like you have found some code on the internet, and just copy'n'pasted it from the webpage to your application. That isn't going to work: partly because the code isn't complete (the ellipsises indicate "other code" rather than being a part of the code you need), partly because it contains info for you, not the compiler (look at the using statements at the top which contain "extra info" which will not compile), and partly because it contains what appears to be HTML code which the C# compiler will not understand - specifically the <br> you have noticed.

Don't just copy code blindly: look at it, read it, understand it before you try to use it. Otherwise you won't be able to get it working with your app, and you put yourself at risk of running code which does something nasty to your computer. Always read code carefully, and make absolutely sure you know what it is doing before you add it to your application!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900