Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Create a simple .exe file

  • Please log in to reply




  • Member
  • PipPip
  • 57 posts
How to create an .exe file that will open and display a message with the text of my choice.
Anyone please post the code(Any programming language is fine.)
Tons of thanks to whoever helps me. :wub:
  • 0





  • Member
  • PipPipPipPip
  • 1,355 posts

How to create an .exe file that will open and display a message with the text of my choice.
Anyone please post the code(Any programming language is fine.)
Tons of thanks to whoever helps me. :wub:

Hey there greenwarrior,

Something that will definitely help is learning a language completely, even though all you want to know is how to display a message;The thing is displaying messages are never enough to get a fully functional program working. When you start off learning a new programming language, displaying a "Hello World!" message is usually always the first thing you will learn, in almost all languages. Here are some good tutorials:

Some good links/tutorials

I think the best language for what you require would be Visual Basic as you can display messages without any added effort and you can easily create user interfaces with ease too. You can download the free version of Visual Basic 2010 Express IDE and compiler from here :


Unfortunately I must say it's a little more complicated that just installing VB, opening and creating a program. Don't get me wrong it is very simple, but you will have to get use to your IDE and get to know your way around VB.NET. For the purpose of my reply I will just post screenshot for exactly what it is you want done, so it will not contain any other functionality (You'll have to play around for yourself). After downloading, installing and running Visual Basic Express (Yours may look slightly different as you are using the express version)

Step 1:
(Assuming you have downloaded, installed and opened the program)

Posted Image
Description: Go ahead and start a "New Project", make sure to select "Windows Form Application" and click "OK". Your new project will be loaded and the first thing you will see pop up is your "Form"

Step 2:
Posted Image
Description: Now you will have to access the code window, you can do this by simply double clicking in the middle of your form (Recommended, because it will generate some code for you) or you can open it through the "Solution Explorer" near the top right hand corner of the screen and clicking on the "View Code" icon.

Step 3:
Posted Image
Description: Now comes the part where you will write the code that will make your program function. If you have not doubled clicked on your form and used the other method, then make sure to follow steps 1 - 2 in this picture in order for the compiler to generate the "Form1_Load" code for you. Or you can copy and paste the entire code below (Assuming you haven't changed name of form or project) and make sure that before posting the code below you completely clear the code windows text: (Note: Sorry I did not put it in a code block, for some reason it keeps formatting the code wrong, so I will post the code in clear text)

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

MsgBox("Hello World!", MsgBoxStyle.Information, "Messagebox Title") ' Here is a messagebox call

End ' Closes program so only your messagebox is displayed

End Sub

End Class

After you have written in the code you can go ahead a test your program by clicking the "little play" icon on the top of your window (Step 4 in picture) to run your program or by simply pressing "F5" on the keyboard.

Step 4:
Posted Image
Description: Now that the code is written and everything runs fine, you will have to save your project to a location.

Step 5:
Posted Image
Description: After having saved your project, right click on your project in the "Solutions Explorer" and make sure to click "Build". This will create the executable that will enable you to run the program outside the IDE.

When the build is successfully completed, you will find the compiled program in the "bin" folder of the project's directory. According to my version and path, the final build will be in the folder path:

That is basically it, if you play around in VB you will find there's a tone of other things you can do besides making text box's. You can even display the message you want directly from the form and add in button functionality to invoke your message. I would definitely recommend you reading up some tutorials if you interested in learning programming. Have fun and enjoy the entire experience, I hope this helped you and if you require any more help, don't hesitate to ask.

Peace Out :cool:

  • 1



    Member 1K

  • Member
  • PipPipPipPip
  • 1,183 posts
Hello greenwarrior,

Firstly, I completely agree with spike_hacker_inc, it would be great if you could do this yourself. But I understand some people don't have the time, or the motivation, to start learning a programming language so, if you want, I'll be willing to write this for you when I get back from school. Do you want it to input the text from a textbox? Or do you just want the same message displayed every time? Or alternatively, if you choose to try this yourself, I can help with the code - well, try to anyway!


Edit: When I read this thread on my phone, it didn't show the true magnificence of spike_hacker_inc's post as my app doesn't render images nicely. I didn't see that he'd shown you the code that you need to use, which is why I posted what I did. Sorry for any confusion :)

Edited by tom982, 05 March 2012 - 11:27 AM.

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP