I get error message 1429 when I use showopen or showsave. The other actions
work fine. This is my code:

Dialog = CreateObject('MSComDlg.CommonDialog')
dialog.ShowOpen &&error
dialog.AboutBox &&OK
dialog.ShowHelp &&Nothing
dialog.ShowPrinter && OK
dialog.ShowSave &&Error

I have tried it with VFP 7 and 8 with the same result. I'm running XP SP1 on
a PC with 1G RAM.

What could be the problem?

Re: Common dialog - problems by Fred

Fred
Thu Dec 02 09:16:55 CST 2004

VFP must use the special OLE type control class and must be instanciated
from a form. You can not CREATEOBJECT directly.

From your Tools/Options... menu, select the Controls tab and then the
ActiveX Controls option group. Scroll down to the Microsoft Common Dialog
Control and check it. Make sure to set as default before closing this
screen. Now in your form designer, from controls, change over to use
ActiveX controls. You should now see the Common Dialog as one of the
available controls to drop on the form. Switch over to one of your class
libraries, or the regular VFP base classes and drop a Command Button on the
form. In the Click of this Command Button:

thisform.olecontrol1.ShowOpen()
etc.

should now all work.

--
Fred
Microsoft Visual FoxPro MVP


"Zeke Galama" <zeke.galama@telia.com> wrote in message
news:%234jYTgH2EHA.2608@TK2MSFTNGP10.phx.gbl...
>I get error message 1429 when I use showopen or showsave. The other actions
> work fine. This is my code:
>
> Dialog = CreateObject('MSComDlg.CommonDialog')
> dialog.ShowOpen &&error
> dialog.AboutBox &&OK
> dialog.ShowHelp &&Nothing
> dialog.ShowPrinter && OK
> dialog.ShowSave &&Error
>
> I have tried it with VFP 7 and 8 with the same result. I'm running XP SP1
> on
> a PC with 1G RAM.
>
> What could be the problem?
>
>
>
>
>



Re: Common dialog - problems by Eric

Eric
Thu Dec 02 09:22:50 CST 2004

Hello, Zeke!
You wrote on Thu, 2 Dec 2004 15:06:09 +0100:

ZG> Dialog = CreateObject('MSComDlg.CommonDialog')
ZG> dialog.ShowOpen &&error
ZG> dialog.AboutBox &&OK
ZG> dialog.ShowHelp &&Nothing
ZG> dialog.ShowPrinter && OK
ZG> dialog.ShowSave &&Error

I think you should host the active x control on a form or container class
rather than instanciating it directly. See this wiki topic for an
alternative:
http://fox.wikis.com/wc.dll?Wiki~AutomationObjects~SoftwareEng
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Common dialog - problems by Thierry

Thierry
Thu Dec 02 09:26:29 CST 2004

oDialog=NewObject("form")
oDialog.AddObject("ole","oleControl","MSComDlg.CommonDialog")
oDialog = oDialog.ole
oDialog.ShowOpen
? oDialog.fileName

--
Thierry


"Zeke Galama" <zeke.galama@telia.com> a écrit dans le message de news:
%234jYTgH2EHA.2608@TK2MSFTNGP10.phx.gbl...
>I get error message 1429 when I use showopen or showsave. The other actions
> work fine. This is my code:
>
> Dialog = CreateObject('MSComDlg.CommonDialog')
> dialog.ShowOpen &&error
> dialog.AboutBox &&OK
> dialog.ShowHelp &&Nothing
> dialog.ShowPrinter && OK
> dialog.ShowSave &&Error
>
> I have tried it with VFP 7 and 8 with the same result. I'm running XP SP1
> on
> a PC with 1G RAM.
>
> What could be the problem?
>
>
>
>
>



Re: Common dialog - problems by Zeke

Zeke
Thu Dec 02 13:12:02 CST 2004

Thanks for your comments, but it does not solve my problem, since I want to
use it in a PRG - not in a form. Is there any way to avoid the error?

Zeke




"Zeke Galama" <zeke.galama@telia.com> wrote in message
news:%234jYTgH2EHA.2608@TK2MSFTNGP10.phx.gbl...
> I get error message 1429 when I use showopen or showsave. The other
actions
> work fine. This is my code:
>
> Dialog = CreateObject('MSComDlg.CommonDialog')
> dialog.ShowOpen &&error
> dialog.AboutBox &&OK
> dialog.ShowHelp &&Nothing
> dialog.ShowPrinter && OK
> dialog.ShowSave &&Error
>
> I have tried it with VFP 7 and 8 with the same result. I'm running XP SP1
on
> a PC with 1G RAM.
>
> What could be the problem?
>
>
>
>
>



Re: Common dialog - problems by Fernando

Fernando
Thu Dec 02 13:29:05 CST 2004

Hi Zeke:

You always can do your own dialogs in VFP. No need for OCX ones.


--
Saludos,

Fernando D. Bozzo

"La programación es más eficiente cuando menos se piensa en el código"
---



"Zeke Galama" <zeke.galama@telia.com> escribió en el mensaje
news:#85nRLK2EHA.3120@TK2MSFTNGP12.phx.gbl...
> Thanks for your comments, but it does not solve my problem, since I want
to
> use it in a PRG - not in a form. Is there any way to avoid the error?
>
> Zeke
>
>
>
>
> "Zeke Galama" <zeke.galama@telia.com> wrote in message
> news:%234jYTgH2EHA.2608@TK2MSFTNGP10.phx.gbl...
> > I get error message 1429 when I use showopen or showsave. The other
> actions
> > work fine. This is my code:
> >
> > Dialog = CreateObject('MSComDlg.CommonDialog')
> > dialog.ShowOpen &&error
> > dialog.AboutBox &&OK
> > dialog.ShowHelp &&Nothing
> > dialog.ShowPrinter && OK
> > dialog.ShowSave &&Error
> >
> > I have tried it with VFP 7 and 8 with the same result. I'm running XP
SP1
> on
> > a PC with 1G RAM.
> >
> > What could be the problem?
> >
> >
> >
> >
> >
>
>



Re: Common dialog - problems by Thierry

Thierry
Thu Dec 02 17:02:29 CST 2004

The response I made can be used in a PRG.

--
Thierry


"Zeke Galama" <zeke.galama@telia.com> a écrit dans le message de news:
%2385nRLK2EHA.3120@TK2MSFTNGP12.phx.gbl...
> Thanks for your comments, but it does not solve my problem, since I want
> to
> use it in a PRG - not in a form. Is there any way to avoid the error?
>
> Zeke
>
>
>
>
> "Zeke Galama" <zeke.galama@telia.com> wrote in message
> news:%234jYTgH2EHA.2608@TK2MSFTNGP10.phx.gbl...
>> I get error message 1429 when I use showopen or showsave. The other
> actions
>> work fine. This is my code:
>>
>> Dialog = CreateObject('MSComDlg.CommonDialog')
>> dialog.ShowOpen &&error
>> dialog.AboutBox &&OK
>> dialog.ShowHelp &&Nothing
>> dialog.ShowPrinter && OK
>> dialog.ShowSave &&Error
>>
>> I have tried it with VFP 7 and 8 with the same result. I'm running XP SP1
> on
>> a PC with 1G RAM.
>>
>> What could be the problem?
>>
>>
>>
>>
>>
>
>