New topic: 

How do I tell when a user has entered a text massage

<http://forums.realsoftware.com/viewtopic.php?t=46160>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        IamKJVonly          Post subject: How do I tell when a user has 
entered a text massagePosted: Thu Dec 06, 2012 4:22 pm                         
Joined: Sun Oct 01, 2006 8:13 am
Posts: 43                How do I tell when a user has entered a text massage 
in a text box in another popup window.

In other words my program is running in one window and I need some information 
from the user.  So right now I call a popup window and ask the user to enter 
the information in a textbox in that window and then I exit out of my current 
window.

When the user has entered the information I then have the text box.text 
subroutine call a subroutine back in the orginal window which finishes the 
process now that I have the information I need.

This process is hard to code and time comsuming.  There has to be an easier way.

it looks like this might work if I knew the hex code for both enter keys on the 
keyboard

If Keyboard.AsyncKeyDown(&h7C) then
//do something with the right arrow key...
MsgBox "Right"
end if

Any help would be greatly appricated as I feel like I'm hitting my head against 
a stone wall.

Dave      
_________________
I'm using windows 7 (64 bit) and Real Studio 2010,r5 (Romans 10:9-10)  
                             Top                timhare          Post subject: 
Re: How do I tell when a user has entered a text massagePosted: Thu Dec 06, 
2012 4:40 pm                         
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 11865
Location: Portland, OR  USA                1)  This is usually not the best 
approach in an event-driven environment.  It is an old school approach that 
should usually be left behind.

2)  If your app is one of the few where this makes sense, use a modal window.  
ShowModal pauses execution of the code in the first window until the user 
dismisses the second window.  If you maintain a reference to the window, you 
can read its properties (not the text field directly, it will already be 
destroyed).  When the user closes the modal window, stuff the text field's 
contents into a property which you can then read from the first window.

dim mydialog as New DialogWindow
mydialog.ShowModal
msgbox "The user entered: " + mydialog.theResult   
                             Top                IamKJVonly          Post 
subject: Re: How do I tell when a user has entered a text massagePosted: Fri 
Dec 07, 2012 7:11 am                         
Joined: Sun Oct 01, 2006 8:13 am
Posts: 43                Thank you so much Timhare. 

The ShowModal  works great.    

It does just what I want but I never really understood how to use it before.  
Your explaination along with the example turned the light bulb on in my heard.

They say you can't teach an old dog new tricks but you are the execption.  You 
sure taught this old dog a new trick.   

You''ll never know what a relief it is for me  to be able to use the ShowModal 
function. 

Thanks again 

Dave   

PS: The way you handled my problem I wouldn't be surprised to find out that you 
are a great teacher.      
_________________
I'm using windows 7 (64 bit) and Real Studio 2010,r5 (Romans 10:9-10)  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to