Re: Progress Bar dialog


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on May 02, 2007 at 07:36:44:

In Reply to: Re: Progress Bar dialog posted by Brian Levantine on May 01, 2007 at 11:43:25:

I'm not communicating the problem right. Everything is OK down to the "EventWait". I don't want to wait. I want to start processing. I give the operator the option to click Cancel during the first phase while the CSV files are being built. That works fine. Later, when the CopyFile phase starts, I disable Cancel. The dialog is a child.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!========== Establish BEFORE calling CW.CreateAutoModeDialog or else we'll
!========== miss the "dialog is initializing" event
!
eventsub EventHandler CW.Event$ CW.Source$

INCLUDE "^SETREZ.INC"

cosDllDir$ = sub(pstat(PARTITION$),41,3) ! Same dir as this program
cosDlgId = IDD.PROGRESS ! Dialog ID

!===== If your dialog was designated as "child" it will be modeless.
!===== If "popup" it will be modal.
!
gosub CW.CreateAutoModeDialog

if cosDlgOpen = FALSE
LET MBMSG$ = 'DLL = ' + cosDllNames$ + '@0D0A@' + 'DIR = ' + cosDllDir$
MSGBOX(MBMSG$)
go ProgExit
endif

!~~~~ eventwait ~~~~~~~~~~~~ PROCEED WITH PROGRAM INSTEAD OF WAITING
GOSUB BuildAssociationFile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

More "business logic" and then I want to close. How do I close up properly without an event? This is what I've tried.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cosCtlText$ = "Processing Complete"
cosCtlId = IDC.ASSN
Gosub COS.SetDlgItemText

cosCtlText$ = ""
cosCtlId = IDC.RECORD.ID
Gosub COS.SetDlgItemText
PAUSE (36)
!
EventSub ! CLEAR EVENTSUB
cosDllDir$ = sub(pstat(PARTITION$),41,3) ! Same dir as this program
cosDlgId = IDD.PROGRESS ! Dialog ID
!!!!! Gosub COS.DestroyDialog

gosub CW.CloseAutoModeDialog

GOTO ProgExit ! RETURN TO SELECTOR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]