>Hi George:
>
>I looked up the value for the flag constant cdlPDReturnDC. It was 256. Here is what I have, but doesn't work. Also tried setting it to 0x100 like you said, but that doesn't work either.
>
>thisform.olecontrol2.ShowPrinter
>thisform.olecontrol2.flags = 256
>thisform.olecontrol1.selprint(thisform.olecontrol2.hDC, .t.)
>
Charlie,
I did the following from the command window and it seemed to work
oDlg = CREATEOBJECT("MSComDlg.CommonDialog.1")
oDlg.Flags = 0x100
oDlg.ShowPrinter
? oDlg.hDC
The difference is that I set the .Flags property prior to calling the ShowPrinter method. When I do as you did (setting it after the call), it returns zero.
George
Ubi caritas et amor, deus ibi est