ZFRKNC
New member
- Joined
- Jul 12, 2020
- Messages
- 2
- Programming Experience
- Beginner
hello, i'm trying to make an application for solving my math questions.
i want to do this ;
a button for uploading image to picturebox ,then i want to draw on this image with mouse.And a eraser for annotate (not pixturebox image).Because lot of image program using eraser as white color.my codes are
can u help pls?
i want to do this ;
a button for uploading image to picturebox ,then i want to draw on this image with mouse.And a eraser for annotate (not pixturebox image).Because lot of image program using eraser as white color.my codes are
C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace resim_galerisi
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Color renk = Color.Red;
int resimsayar = 0;
List<string> resimkonumu = new List<string>();
private void Form1_Load(object sender, EventArgs e)
{
openFileDialog1.Multiselect = true;
}
private void button1_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
foreach (string DosyaYolu in openFileDialog1.FileNames)
{
imageList1.Images.Add(DosyaYolu, Image.FromFile(DosyaYolu));
resimkonumu.Add(DosyaYolu);
ListViewItem önizleme = new ListViewItem();
listView1.Items.Add(önizleme);
önizleme.ImageIndex = resimsayar;
resimsayar=resimsayar+1;
}
}
}
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count < 1)
{
return;
}
pictureBox1.Image = Image.FromFile(resimkonumu[listView1.SelectedIndices[0]]);
}
}
}
Last edited by a moderator: