View previous topic :: View next topic |
Author |
Message |
golddad
Joined: 06 Oct 2005 Posts: 4
|
Posted: Mon Oct 24, 2005 11:20 pm Post subject: A simple problem --- not quite! HELP |
|
|
OK!
I'm lost!
I realize that there may be a simple answer to my problem, but it eludes me.
So here goes.
A form shows an addition program. A + B + C = SUM
But here is the switch ----> You can input any three numbers to find the forth.
In other words, I can Input A,C and SUM and hit CALCULATE and the answer will fill in the B box automatically.
1) I would like to have a "Windows Form" with four (4) numeric input boxes.
2) Each "Input Box" would have a label; A, B, C, SUM
3) There would be a "CALCULATE" button.
4) A text message would read: "Input ANY THREE numbers"
5) Any number can be positive, negative or floating point.
6) Error handling for more than “three inputs”
7) "TEXT" input would be erased automatically upon an Enter, Tab or mouse focus on another box.
8) After inputting any three numbers, even the sum, the remaining fourth box would be calculated after hitting “CALCULATE”.
9) There would be an "EXIT" button.
This problem of course covers several topics.
a) Isolating NUMERIC ONLY input
b) Use of three different change of focus methods
c) Erasing invalid input
d) And most important, a way of determining which input box is empty and how to calculate the missing number.
This problem is relatively easy in EXCELL, but I do not want to depend on calling other programs to do this.
Can someone please write a file that covers these topics for us-ever-so-confused newbies?
Or at least explain how to go about setting this up. The form seems easy, but the rest ....well, HELP!
Speaking of EXCELL; to the CODEMORPHIS staff, could you include a TABLES and/or a SPREADSHEET component in the next version.
PS: Of course I would love to hear from CODEMORPHIS staff, but I hope to also get ideas from Synopsis Users. There are a lot of sharp people out there and everyone can have a different idea of how to solve a problem. Please prove me right and add your input.
Thanks
golddad _________________ The Gold Is In My Soul !
And The Dust Is In My Pockets! |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Tue Oct 25, 2005 8:49 pm Post subject: |
|
|
Here's an example program that demonstrates the main ideas. It is for an equation with 3 terms - you can easily extend it for 4. You should be able to follow the logic if you have acquainted yourself with the basic features of Synopsis. Reading the programming tips will also help you understand how the program was put together.
www.codemorphis.com/articles/ans05/ans_102505/Math_Equation.vpd
One omission is the handling for the Enter and Tab keys. In order to know when to clear an argument because the user changed the UI component focus with the Tab key, for instance, we need a Windows event for a change of focus. This event will be introduced possibly in a future minor update.
Hope this helps. |
|
Back to top |
|
|
DavidCbs
Joined: 02 Apr 2004 Posts: 17 Location: Suffolk, England
|
Posted: Thu Oct 27, 2005 12:21 pm Post subject: |
|
|
Hi Golddad. Your challenge interested me so I thought I would have a go. I'm no expert, more an enthusiastic amateur but I've been able to put together something that appears to do most of what you are looking for except the Tab focus issue. As you rightly say there are often different approaches mine is fairly basic. I know there is room for improvement, it could be tidied up quite a lot but it's a start. Only problem is how do I get the vpd to you? My website is down and I don't think we can send attachments via the forum? _________________ DavidCbs |
|
Back to top |
|
|
golddad
Joined: 06 Oct 2005 Posts: 4
|
Posted: Thu Oct 27, 2005 10:01 pm Post subject: |
|
|
To the CODEMORPHIS STAFF:
Thank you for the quick reply. This helps a lot. I am going over the program and I am beginning to understand how it works. I will keep in touch as I learn and as I have more questions.
Thanks Again
To DaveCBS:
Thanks for trying to help! I hope more people like you see the need to share their abilities and knowledge. I will PM you my Email and you can attach the VDP file in a message.
Thank you for sharing _________________ The Gold Is In My Soul !
And The Dust Is In My Pockets! |
|
Back to top |
|
|
CodeMorphis
Joined: 02 Dec 2003 Posts: 252
|
Posted: Fri Oct 28, 2005 7:42 am Post subject: |
|
|
If there is something that you would like to post, you may send files to support@codemorphis.com, and following review, we can add it to the Forums for you. The other option is to host your files on third-party sites and refer to them from within your post. |
|
Back to top |
|
|
|