![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I created a form [say: Selection-form] which will be used several times to select something. How do I stop my program - wait until the Selection-form is completed - and use the result?
Something like: result = SelectionForm.GetSomething ' wait until something is selected txtResult.text = result Anybody know? Thanks - Ghislain |
|
|||
|
The way I would do it is to just use the selectionform.show when you want to to get the information and include an "Ok" and a "Cancel" button on the form:
Sub btnOk_click result=txtSelection.text selectionform.close end sub Sub btnCancel_click selectionform.close end sub But I am sure there are more elegant solutions around ![]() all the best / Björn |
|
||||
|
Ghislain,
There are many ways to acheive what you want. BjornF has suggested a good event based way of doing this. You could also use a Do Until/Do While command or If Then to loop back through the code until your value has changed. Have you checked out Erel's Input Panel which can be found here Input Panel You might be able to adapt this to fit your needs. Regards, Randomcoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD. Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD. "Defeat never comes to any man until he admits it."Josephus Daniels |
|
|||
|
Hello again!
BjornF, Your solutions seems logical and i have tried it. But - as soon as you call formSelection.show the program continues and the return value from btnClick_OK will never be captured.. RandomCoder Thanks. I hope i will find a solution which works with forms in the future. But the panel will do the trick for the time being.. Thinking about it - it won't work. The input-panel example doesn't return a value either.. Bummer! I guess a while-wend loop is the only option. It seems quite processor intense to me. I hope there is a better solution. It should be possible - eg: calendar-control & open-dialog. Ghislain |
|
|||
|
What we need is to add modal/modeless to the Show method of the form, so:
Form2.Show 0 will work as ususal (Form2 shows but the code continues after to executre after Form2.Show) but, Form2.Show 1 will show Form2 and waits until Form2 is closed (btw: how about a "REAL" close?) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| return codes of a shell command | pmu5757 | Questions & Help Needed | 18 | 06-15-2008 08:33 PM |
| Can a sub return more than 1 value ? | TWELVE | Questions & Help Needed | 13 | 05-28-2008 10:58 AM |
| All hail GeoTrail's return | RandomCoder | Chit Chat | 1 | 02-17-2008 01:14 PM |
| return issue | Cableguy | Questions & Help Needed | 1 | 09-21-2007 07:01 AM |