473,324 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Image Button

107 100+
I have a image button ,by clicking which will open a dialouge box having save and open option for downloading the image or any document
May 29 '07 #1
2 1328
Private Sub btnSelectPicture_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectPicture.Click

ofdSelectPicture.InitialDirectory = "c:\"
ofdSelectPicture.Title = "Select a File"
ofdSelectPicture.FileName = ""
ofdSelectPicture.Filter = "Windows Bitmaps|*.BMP|JPEG Files|*.JPG|Text_
files (*.txt)|*.txt"
ofdSelectPicture.FilterIndex = 2
OpenPicture()
End sub




Public Sub OpenPicture()

Try

If frmViewer.ofdSelectPicture.ShowDialog = Windows.Forms.DialogResult.OK Then

frmViewer.picShowPicture.Image = Image.FromFile(frmViewer.ofdSelectPicture.FileName )
frmViewer.sbrMyStatusStrip.Items(0).Text = frmViewer.ofdSelectPicture.FileName
End If

Catch objException As System.OutOfMemoryException
MessageBox.Show("Error", "Unknown format", MessageBoxButtons.OK)
Catch objException As Exception
MessageBox.Show("Error.", "Error", MessageBoxButtons.OK)
End Try
May 29 '07 #2
giveDsolution
107 100+
Thnxs for ur solution.....its my first posting....great site
May 29 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Marek Mänd | last post by:
Can the <button><img></button> mutated via CSS so, that the inner image of <BUTTON> would entirely visually become the button itsself - I mean without the outer elements borders and so... ...
4
by: Ester | last post by:
I have an interior design of a living room with lights and aircond image. My task is to load the living room image without any light and aircond images as background image of a WebForm after that I...
2
by: Ester | last post by:
Instead of drag and drop image button from Toolbox and name the image button id on the properties box, I would like to load image button ID from database. I created a database table that stores...
2
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
0
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this error in MDIparent form "An unhandled exception...
1
by: Phil_Cam | last post by:
Hello All On a webpage I have a standard paypal image button for purchases. I am trying to set it up so that it only shows up or is endabled when text is entered into a textbox and a button is...
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
4
by: Marcolino | last post by:
Hi, I have simple needs but I don't know how to implement it. I have application that create Dynamic Button. I need to set the image on this button, getting the icon from a form. So pratically...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.