Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi
This is my first small project. I am required to convert a jpeg into an exe appplication so that when a user clicks on a OK button it closes. How do I do that. Please help me.

Thanks!

:)
Posted
Comments
Pheonyx 22-Aug-14 4:43am    
What on earth are you on about? a jpeg is a picture. an application is an application, they are two completely different things.
Armand Peens 22-Aug-14 5:05am    
Yes thanks I know. I need to know how to convert the jpeg to an exe so that I can add a button to it so that when the user clicks on the OK button it closes. Or if I cant do that how do I implement a jpeg into a forms or web application so that I can add an ok button to it so that it closes when the user clicks on it. It is like a popup that will display on a web page and when the user clicks on a ok button below it or something like that it should close. That's all I am asking. There is no need to be rude.

1 solution

Probably the simplest way to do this (if I understand you right) is to create a form with two controls: A PictureBox and a Button.
Set the Image property of the PictureBox to the JPG file, and set the Text property to teh Button to "OK".
Double click the button in the designer, and use this code inside teh hanlder:
C#
Close();

Run your app, and you should see the picture, and the OK button should do what you want.
 
Share this answer
 
Comments
Armand Peens 22-Aug-14 5:11am    
Thank you very much OriginalGriff. Can I use it if it is going to be used as a pop up on a web page or not. What technology should I then use? A normal windows forms or what type of a web app? Thanks for not being rude.
OriginalGriff 22-Aug-14 5:16am    
How is a close button going to work on a web page? :laugh: Close the browser?

Winforms is the easiest for this example, probably.
Armand Peens 22-Aug-14 5:21am    
I also don't know. :) But my requirements if I understand it correctly is it is going to be a pop up on a webpage. It has to have an ok button to close it if the user clicks on the ok button so that the poppup closes. But ill make sure again and let you know. Thanks :)
Armand Peens 22-Aug-14 5:25am    
Ok cool it is not going to run as a popup on a webpage. It is going to run as an exe on its own. So your solution should work. Thanks. 10/10

Smile | :)
OriginalGriff 22-Aug-14 5:32am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900