#115671 - 2004-03-08 04:44 PM
KiXforms: giving main form focus after message box
|
Scripter2004
Fresh Scripter
Registered: 2004-03-01
Posts: 31
Loc: Minneapolis, MN (USA)
|
I'm using KiXforms to display a form. After a user clicks a button, a message box is displayed. The problem is that after the message box is closed, the form window is no longer the active window. I've tried to work with the SetFocus function, but I can't get it to work. It's not the end of the world, but it's very annoying.
Thx Ron
|
Top
|
|
|
|
#115673 - 2004-03-08 04:55 PM
Re: KiXforms: giving main form focus after message box
|
Scripter2004
Fresh Scripter
Registered: 2004-03-01
Posts: 31
Loc: Minneapolis, MN (USA)
|
KiXtart
|
Top
|
|
|
|
#115674 - 2004-03-08 05:08 PM
Re: KiXforms: giving main form focus after message box
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
The Kixtart MessageBox and the Kixforms MessageBox do not live too well together ... Kixforms knows nothing about Kixtart MessageBoxes and visa versa - when the MessageBox is dismissed, Kixtart sets focus back to the only windows it really knows about ... the Console window.
Would suggest trying the Kixforms MessageBox instead ... there are a couple of variations of these depending on the KF version ... the pure dotnet box looks like this:
Code:
$System = CreateObject("Kixtart.System")
$ = $System.MessageBox.Show(
"Message Text",
"Title",
$System.MessageBoxButtons.YesNo,
$System.MessageBoxIcon.Information,
$System.MessageBoxDefaultButton.Button2 )
Another depracated usage is:
Code:
$ = $Form.MessageBox("Message Text","Title",0)
Where 0 (zero) is the style just like in Kixtart.
-Shawn
|
Top
|
|
|
|
#115675 - 2004-03-08 05:50 PM
Re: KiXforms: giving main form focus after message box
|
Scripter2004
Fresh Scripter
Registered: 2004-03-01
Posts: 31
Loc: Minneapolis, MN (USA)
|
Using the KiXforms MessageBox function did the trick. Thanks!
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 248 anonymous users online.
|
|
|