Anyone please post the code(Any programming language is fine.)
Tons of thanks to whoever helps me.
Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!
Hey there greenwarrior,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.
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 :
http://www.microsoft...l-basic-express
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)
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:
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:
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:
Description: Now that the code is written and everything runs fine, you will have to save your project to a location.
Step 5:
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:
D:\MessageBox\MessageBox\bin\Debug
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
Edited by tom982, 05 March 2012 - 11:27 AM.
0 members, 0 guests, 0 anonymous users
Community Forum Software by IP.Board
Licensed to: Geeks to Go, Inc.