FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dialog NOWAIT lost focus at activation!
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 07:04 PM
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 07:24 PM

Julio,

I downloaded it twice and both times I am getting an "invalid or corrupted zip file" message. Please create a new zip and just email me a copy.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 07:26 PM
James Bott wrote:Julio,

I downloaded it twice and both times I am getting an "invalid or corrupted zip file" message. Please create a new zip and just email me a copy.

James


Here James: http://rapidshare.com/files/138816359/nonmodal.zip.html
I have send to your email too!
And thank you very much for you help!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 326
Joined: Sun Oct 09, 2005 05:22 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 07:35 PM
Maybe this optión...

#Include "FiveWin.Ch"

FUNCTION Main()
   LOCAL oWnd, lInit:=.T., oDlg, oSay, cSay

   cSay:="Loading, please wait..."

   DEFINE DIALOG oDlg FROM 0, 0 TO 5,40
   @ 1, 1 SAY oSay PROMPT cSay CENTERED
   ACTIVATE DIALOG oDlg NOWAIT CENTERED
   SysRefresh()
   WaitSeconds(2)

   DEFINE WINDOW oWnd
   ACTIVATE WINDOW oWnd MAXIMIZED;
      ON PAINT Paint_Window(oDlg,@lInit) ;
      ON INIT  Init_Window(oSay,@cSay,oDlg)

RETURN (NIL)

STAT FUNC Init_Window(oSay,cSay,oDlg)
   cSay:="Init process, wait..."
   oSay:Refresh()
   WaitSeconds(3)
   cSay:="Ready!"
   oSay:Refresh()
   MsgBeep()
   WaitSeconds(1)
   oDlg:End()
RETURN (NIL)

STAT FUNC Paint_Window(oDlg,lInit)

   IF lInit
      oDlg:SetFocus()
      SysRefresh()
      CursorWait()
      lInit:=.F.
   ENDIF

RETURN (NIL)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 07:52 PM

Julio,

Ok, I tried your example, but I still don't know what you are trying to do and/or what problem you are having.

Is the program you sent showing a problem? If so, what is the problem?

Or, is it working the way you want.

I think you should also rethink having so many windows popping up. A better design is to put messages in the same window where they apply. You can also either use the hourglass cursor for short waits (up to about 5 seconds) or a progress bar for longer waits when you can calculate the total wait time or an animation if you don't know the total wait time.

Did you try my example showing the updated message on the main window?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 08:08 PM

Julio,

Why do have the MS-DOS window open. Do your users always have a DOS app running, or is it just a problem with the DOS window that you noticed because you have one open when programming?

Most users never run DOS apps anymore, so if there is a problem with a DOS window I don't think your users will ever see it.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 08:21 PM
Julio,

One problem I see in your code is that you are passing an existing oDlg object, then redefining it as a new dialog. You can't do this.

FUNCTION waitDlg( oDlg, oWnd )
   LOCAL oSay
   DEFINE DIALOG oDlg OF oWnd


You need to define a new LOCAL oDlg2.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Wed Aug 20, 2008 08:39 PM

Julio,

I see that you are opening a window then a dialog, then another dialog. Why do you need two dialogs? Can't you just close the first dialog when you open the second one?

Are you updating a customer browse in the main window, or in the first dialog?

I think a redesign of the interface would probably be a better solution.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Dialog NOWAIT lost focus at activation!
Posted: Thu Aug 21, 2008 11:25 AM
James Bott wrote:Julio,

I see that you are opening a window then a dialog, then another dialog. Why do you need two dialogs? Can't you just close the first dialog when you open the second one?

Are you updating a customer browse in the main window, or in the first dialog?

I think a redesign of the interface would probably be a better solution.

James


James, I see your tips I think above the redesign of this problem. The second dialog is just for a message displaying when the process at first dialog is executing!
When I get the better solution, you will know!
Thank you very much for all!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog NOWAIT lost focus at activation!
Posted: Thu Aug 21, 2008 12:13 PM
Julio,

Good. I highly recommend getting a copy of the book, "About Face 2.0: The Essentials of Interaction Design"

http://www.amazon.com/About-Face-2-0-Essentials-Interaction/dp/0764526413/ref=sip_rech_dp_10

You can get a used copy for less than US$5.

There is a newer version but it discusses more about web design, so I recommend getting the 2.0 version.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Dialog NOWAIT lost focus at activation!
Posted: Thu Aug 21, 2008 12:18 PM
James Bott wrote:Julio,

Good. I highly recommend getting a copy of the book, "About Face 2.0: The Essentials of Interaction Design"

http://www.amazon.com/About-Face-2-0-Essentials-Interaction/dp/0764526413/ref=sip_rech_dp_10

You can get a used copy for less than US$5.

There is a newer version but it discusses more about web design, so I recommend getting the 2.0 version.

James

James, this is very important! I take care about this! Thank again for your help! Very soon, I will show you my solution!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion