How to make 2nd window wait for user input.

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
jayadevu
Posts: 240
Joined: Tue May 19, 2009 7:10 am

How to make 2nd window wait for user input.

Post by jayadevu »

Hi,

I have 2 windows, FrmA (which contains a tsbrowse object) and FrmB (which contains another tsbrowse object) both defined in the init phase of the program. While FrmA is active, FrmB needs to active based on user inputs on FrmA. Basically FrmB shows a tsbrowse of another database for selection, the recno() of that database is then passed by FrmB to FrmA . Much like a help function.


When the program executes for the first time, based on user input in FrmA, the control branches to FrmB, the program checks if FrmB is active, if not FrmB is activated, it waits for the user input and returns control to FrmA, but when FrmB is called again from FrmA, the second time onwards, the problem starts, the window FrmB is “showed”, but it does not wait for any user input.

What command will make the FrmB wait for a user input, which is basically a selection from the tsbrowse shown in the FrmB. I have already tried setfocus but FrmB does not wait for the user input.

I do not want to create FrmB again and again (Activate, Release, Activate cycle) each time help is required, hence I need to hide the window FrmB only to be popped up when the user requires help.

Any help will be appreciated.

Warm regards,

Jayadev.
jayadevu
Posts: 240
Joined: Tue May 19, 2009 7:10 am

Re: How to make 2nd window wait for user input.

Post by jayadevu »

Hi,

A small correction, I now understand from our good friend that TSbrowse is not supported in HMG, (instead of TSBrowse, please read browse control) but the question remains as to how to make the program wait for a user input in FrmB.

Warm regards,

Jayadev.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to make 2nd window wait for user input.

Post by esgici »

Hi Jayadev

It's difficult to understand your problem :(

fe : "FrmB does not wait for the user input" is quite obscure for me. Surely you have EDIT / ALLOWEDIT clause in that control. If so, what is meaning of "does not wait" ? Does browse control disappear after open ?

IMHO the better way is you will send a simplified version of your project; only include FrmA, FrmB and a short version of your data file(s).

In this way we will easily understand the problem and hopefully help you.

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Post Reply