Sign in to follow this  

Very Basic Project

This topic is 4071 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm looking to create a very simple program. I put a number in, press a 'Calculate' button, and get returned a figure. I know I could do this in just about any programming language, but I want to have it in a Windows frame. If at all possible I DON'T want to learn how to build GUI and am looking for a basic and free program that will allow me to point and click my way to creating a GUI, while enabling me to put a simple piece of code into the 'Calculate' button, so a return value can be given. I know VB6 can do this, but it costs money. Are there any free programs that I can download for this? Thanks in advance.

Share this post


Link to post
Share on other sites
You could use VBScript for a fast and easy solution.

http://www.w3schools.com/vbscript/vbscript_looping.asp

here is a sample script, just copy and paste into notepad, just make sure it has a ".vbs" extension.


' fact.vbs
'
' This VBScript is used to calculate the factorial of a number.
' Designed and Tested on Windows XP Pro SP2
'
' Version 1.0.0 - 10.19.2006
'
' This code may be freely distributed or modified.
' -----------------------------------------------------------------'

Option Explicit
Dim iNum, i, iFact
iFact = 1
iNum = 0

'set values.
iNum = inputbox("Please enter a number")

'if the user does not specify a number or clicks the cancel button, then exit the script.
if iNum = 0 then
WScript.Quit
end if


'error handling.
On Error Resume Next
Err.Clear


for i = 1 to iNum
iFact = iFact * i
next

msgbox iFact


'clean up variables.
Set objShell = nothing

WScript.Quit
'end of script.



Share this post


Link to post
Share on other sites
Thanks for all that help. There are several people who'd find the simple program I hope to produce useful. Would people need the Express Edition to load the program, or once made, could any windows user use it? What it they had a mac?

Share this post


Link to post
Share on other sites
It will work on all windows, but if you want it to work on a mac and you want it to have a gui, then you are going to need to find a library or learn some more on gui for each system. Otherwise if you don't need a nice gui and a console app will work, then just use like C++ and a cross platform compiler, good luck with that though, because cross platform can be a very tricky thing when you are first starting off with it (well not thats its straightforward after you learned it)

hope that helps

Share this post


Link to post
Share on other sites

This topic is 4071 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this