Page 1 of 1 1
Topic Options
#115671 - 2004-03-08 04:44 PM KiXforms: giving main form focus after message box
Scripter2004 Offline
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
#115672 - 2004-03-08 04:54 PM Re: KiXforms: giving main form focus after message box
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Are you using the Kixforms MessageBox or the Kixtart MesasgeBox ?

-Shawn

Top
#115673 - 2004-03-08 04:55 PM Re: KiXforms: giving main form focus after message box
Scripter2004 Offline
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 Offline
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 Offline
Fresh Scripter

Registered: 2004-03-01
Posts: 31
Loc: Minneapolis, MN (USA)
Using the KiXforms MessageBox function did the trick.
Thanks!

Top
#115676 - 2004-03-15 10:41 AM Re: KiXforms: giving main form focus after message
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I haven't played with the KiXforms Messagebox yet, but what about a timeout value ??

Edited by Schuliebug (2004-03-15 10:41 AM)
_________________________
Kind regards,

Top
#115677 - 2004-03-15 02:12 PM Re: KiXforms: giving main form focus after message
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
The MessageBox object accepts the Style properties that are standard with the Windows API, which doesn't include a timeout.

If your question is actually a suggestion, you should really post this on the KiXforms forum.

Top
#115678 - 2004-03-15 04:36 PM Re: KiXforms: giving main form focus after message
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Thankz, i will do that. However, i thought shawn mentioned a wile ago that he would omplement a timeout in the KiXforms messagebox as it is in the KiXtart messagebox.
_________________________
Kind regards,

Top
#115679 - 2004-03-15 06:08 PM Re: KiXforms: giving main form focus after message
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
What about coding an "OnTimer" event to hide the message box? I use that to pop up status messages on the main form - it could probably be used the same way to issue a msgbox.close statement.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#115680 - 2004-03-15 07:49 PM Re: KiXforms: giving main form focus after message
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Or write your own custom message box function that includes a timer.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.058 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org