Hi,
I have a winform which contains two panels in which the first panel contains some textboxes, comboboxes, and buttons. In the second panel I have 4 buttons namely "attach", "remove", "view front view", and "view back view" and two radio buttons namely "front view" and "back view". Now first I select the radio button "front view" and if I click the button attach then the form should take me to a folder "images" in the D drive( I am scanning the ATM card's front view and back view through the scanner and storing the scanned images in a folder "images" in the D drive) where I have some stored images(ATM cards front and back views).When I click the open button after selecting a image then it should take me back to the panel and display that image(ATM card's front view) that I have selected in the images folder.
Similarly if I click the remove button then it should remove the image(ATM card's front view) from the panel2.
Now I will select the radio button2, the back view and do the same operation as I did previously, but the image(ATM card's back view)should overlap the first image(ATM card's front view)
Now if I click the "view front view" button then it should display the ATM card's front view(that is the front view should overlap the back view) and if I click the "view back view" button then it should display the ATM card's back view (again back view should overlap the front view)
can anyone help me to accomplish this with code.
Vimal KandasamyPosted May 4, 2009, 6:34 AM
and in coding declare 2 variables to store file names of front and back view images
Ex:
String FView;
String BView;
and in Attach Button event add following code.
{{{then in Remove
simply set
then in "view front view" button
Vimal KandasamyPosted May 7, 2009, 12:40 AM
There must be an another way to store file path.try to find out that.and read the below discussion.it may help you.
http://forums.mysql.com/read.php?10,261367,261367#msg-261367
sachi vasishtaPosted May 6, 2009, 8:15 AM
vimal if the selected image is in bmp format then in db it is displaying the full name(I have a image namely karthiknpatel which is in bmp format) like below
mysql> select * from drawings;
+----------------+-------------------------------------+
| frontview | backview |
+----------------+-------------------------------------+
| E:Imageg.jpg | E:Imagerigaderoad-bangalore06.jpg |
| E:Imageg.gif | E:Imageskartiknpatel.bmp |
+----------------+-------------------------------------+
2 rows in set (0.00 sec)
but the selected image is in the format other than the bmp then it is not displaying properly(you can see in the first row;the actual file name is brigaderoad-bangalore06 but it is not properly displaying.and also the folder name Images is also not displaying properly it is correct only for a file with bmp format-the second row second column)
vimal is it possible to display in the format like below
frontview backview
E\Images\filename E\Images\filename
Vimal KandasamyPosted May 6, 2009, 4:35 AM
sachi vasishtaPosted May 6, 2009, 4:21 AM
vimal is it something like this
string fview="E\\Images\\FView";
string bview="E\\Images\\BView";
private void button6_Click_1(object sender, EventArgs e) // attach button for front view{
openFileDialog1.InitialDirectory =
"E:\\Images\\";openFileDialog1.ShowDialog();
if (File.Exists(openFileDialog1.FileName)){
FView = openFileDialog1.FileName;
pictureBox1.Image = System.Drawing.
Image.FromFile(FView);}
}
Vimal KandasamyPosted May 6, 2009, 2:44 AM
sachi vasishtaPosted May 6, 2009, 2:34 AM
thanks vimal
vimal in the form containing that picturebox I have a button called submit, which stores the entered information into the db. My question is when I click submit it has to store the path location of that two images(front view and back view).To do this I can declare two string variables to store the path but I don't know how to assign the path to these two string variables
Vimal KandasamyPosted May 6, 2009, 12:46 AM
sachi vasishtaPosted May 5, 2009, 9:22 AM
thanks vimal I got it.
Vimal if the image in the Images folder is smaller than the size of the picturebox then its ok but if it is bigger than the size of the picture box then how shall I display that image in the picture box?