[Gambas-user] Progress bar error while closing (Form_Close)

Fabien Bodard gambas.fr at ...626...
Mon Nov 5 15:07:06 CET 2012


you must to add a flag to test if th form can be closed

if not bCanClose then
  Stop Event
  MakeCopy
endif



2012/11/5 J Sundar <sundarjeyachandran at ...626...>

> I made a program which uses progress bar for removing and copying
> files/folder. For this I made a different form and calling it each time
> user remove/copy files. What i am trying to do is that when user click on
> close button (x) of progress bar i have tell user that "Please wait till
> process reach 100% and continue the process. Now i am getting is that my
> code displays the message correctly but closes the form immediately
> resulting in "in valid object" error. Here is the code i made for
> Form_Close () :-
>
> Public Sub Form_Close()
>
> If Var.pFileCopy.state = Process.Running Then
>     Message.Info("Please wait till process reach 100%")
>   Endif
>
> End
>
> Any help is appreciated.
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard



More information about the User mailing list