Hej
Ciągle wywala mi błąd w
double zdjecie = ((float)BackgroundImage.Width) / this.ClientSize.Width;
Przesyłam cały kod którym chce to obejść:
var image = new System.Windows.Forms.OpenFileDialog();
image.Filter = "";
image.Title = "Select image";
if (image.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
System.IO.FileInfo File = new System.IO.FileInfo(image.FileName);
BackgroundImage = Image.FromFile(image.FileName);
BackgroundImageLayout = ImageLayout.Zoom;
if (BackgroundImage == null)
{
MessageBox.Show("Najpierw wczytaj mapę działki!");
}
double zdjecie = ((float)BackgroundImage.Width) / this.ClientSize.Width;