Hi I'm writing an application using c# and I want to load one image and write some information in it.
There is a variable in my program named cnt
where indicates numbers of images I should show .It means if cnt==2
I should load image and put two different information in it.
Note : The image is a raw template for a certificate and I should load and show them based on some information of different certificates.
So how can I do it? Can PictureBox
help me? How can I enable paging in it?
EDIT:
After reading from excel and get a match increase cnt
:
foreach (DataRow drow in ds.Tables[0].Rows)
{
DataRow dataRow = (from DataRow dr in ds.Tables[0].Rows where dr["شماره کارت ملی"].ToString() == textBox1.Text select dr).FirstOrDefault();
cnt++;
string s = "" ,s1="",s2="",s3="";
if (dataRow[0].ToString().Length < 17)
{
fname1 = Encoding.Default.GetBytes("write1" + dataRow[0].ToString() + s.PadLeft(16 - dataRow[0].ToString().Length, '.'));
comport.Write(fname1,0,fname1.Length);
System.Threading.Thread.Sleep(1000);
fname2 = Encoding.Default.GetBytes("write4" + s.PadLeft(14, '#') + dataRow[2].ToString().Substring(0, 2));
comport.Write(fname2, 0, fname2.Length);
}
//do some other stuff
I want to show draw different information of a certificate on a certificate image template. If cnt
is two the person has two certificates for two skill so the image template is the same but the skill information is different.