Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet another form flashes problem
Message
De
25/06/2007 14:59:28
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
 
 
À
25/06/2007 12:46:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01235113
Message ID:
01235437
Vues:
19
Growing up mostly in NC, I loved having an actual ocean just a few hours away. When I first moved here it was weird hearing people talk about going to the "beach" and finding out they meant a (usually cold!) lake that had some sand dumped on the shore. Lake Superior can almost pass for an ocean, but it's REALLY cold, no salt and no waves except for winter storms before it freezes.

I have to hand it to the guys who surf up here in zero or below. That's dedication!!

Gary

>According to a recent article, the Outer Banks are the best beaches in the U.S. ! :o)
>
>
>>Thanks for the suggestions Tracy, I'll check them out. As I mentioned to Naomi, something I considered trivial, the type of stuff I've done a lot of in the past somehow tripped me up repeatedly this time. I think some time baking somewhere on the Outer Banks is called for here!
>>
>>Thanks again,
>>
>>Gary
>>
>>>I tried using Adobe's activex control to view pdf files myself a couple of years ago and found it extremely unstable. I recommend you avoid it like the plague. Look at the pdf forums and you will see too many problems with it to count. I had similar problems with errors you describe as well. I switched to the webbrowser control and it is much more stable.
>>>
>>>Also, from:
>>>
>>>http://secunia.com/advisories/23138/
>>>
>>>Some bugs have been discovered in Adobe Reader which can cause the ActiveX control to crash. The bugs are caused due to errors in the AcroPDF ActiveX control (AcroPDF.dll) when processing arbitrary arguments passed to the "setPageMode()", "setLayoutMode()", "setNamedDest()", and "LoadFile()" methods. The bugs are confirmed in Adobe Reader 7.0.5 and 7.0.8 for Windows. They have also been reported in Adobe Reader 7.0.0 through 7.0.8 and Adobe Acrobat Standard and Professional 7.0.0 through 7.0.8 on the Windows platform. Prior versions may also be affected.
>>>
>>>You might want to checkout Planet PDF:
>>>
>>>http://forum.planetpdf.com/webboard/wbpx.dll/~planetpdfforum
>>>
>>>Also see the security vulnerability:
>>>
>>>http://kb.adobe.com/selfservice/viewContent.do?externalId=331465&sliceId=2
>>>
>>>
>>>
>>>
>>>
>>>>Jim, thanks for the suggestion. I understand READ EVENTS properly, I just put in the extra code examples to forestall peoples suggestions that I try these things. I should have made this more clear.
>>>>
>>>>The part I don't get is why SHOW() or SHOW(1) fails to stop and let the form display. Like everyone else, I've got a zillion forms that call other forms and so on and I've always just used SHOW(). Using a form level property gets the job done. Sometime later, I'll dig into this. Perhaps it's the COM object that is altering the behavior. Anyway, thanks again.
>>>>
>>>>Gary
>>>>
>>>>>Gary,
>>>>>
>>>>>Y9u are misunderstanding the action of READ EVENTS. READ EVENTS tells VFP to go into a wait state and allow the user to take an action. It remians in effect until a CLEAR EVENTS is encountered. This means that can be ONLY ONE READ EVENTS is effect. Any additional ones are ignored. IN your sample code you instantiate the picker form and in its LoadFiles method you issue a READ EVENTS. Code execution stops right there until CLEAR EVENTS is issued. The READ EVENTS in the viewer form is ignored completely.
>>>>>
>>>>>Instead try using an approach like this outline below;
>>>>>
>>>>>
>>>>>* Start up program.
>>>>>LPARAMETERS tcMemberID, tcSourceDir
>>>>>
>>>>>SET SAFETY OFF
>>>>>_screen.Visible = .F.
>>>>>
>>>>>oViewer = CREATEOBJECT('Viewer')
>>>>>oViewer.LoadFiles(tcMemberID, tcSourceDir)
>>>>>
>>>>>READ EVENTS
>>>>>RETURN
>>>>>
>>>>>
>>>>>Remove all of the other READ EVENTS you have everywhere else!!!
>>>>>
>>>>>Now in the click event of the button in the picker form do something like this;
>>>>>
>>>>>
>>>>>LOCAL cFileName, oForm
>>>>>
>>>>>IF this.Parent.lstFiles.ListIndex > 0
>>>>>   cFilename = thisform.aFiles[thisform.lstFiles.ListIndex, 2]
>>>>>   IF FILE(cFileName)
>>>>>      oForm = CREATEOBJECT('PdfViewer')
>>>>>      oForm.DisplayPdf(cFileName)
>>>>>      oForm.Visible = .T.
>>>>>      oForm.Show(1) && Make it modal
>>>>>   ENDIF
>>>>>ENDIF
>>>>>
>>>>>
>>>>>Now in the OdfViewer form provide a Quit or Exit button that does;
>>>>>
>>>>>
>>>>>Thisform.Release()
>>>>>
>>>>>
>>>>>And in you PdfPicker form also provide a Quit or Exit button that does;
>>>>>
>>>>>
>>>>>Thisform.Release()
>>>>>
>>>>>
>>>>>In the Unload event of the PdfPicker form put;
>>>>>
>>>>>
>>>>>CLEAR EVENTS
>>>>>
>>>>>
>>>>>That should make your forms work togehter well the way you want them to.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform