Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Map Objects - Printing
Message
De
08/03/2005 12:00:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/03/2005 11:44:51
Todd Cottengim
Alpine Land Information Services
Redding, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00993709
Message ID:
00993723
Vues:
26
>I have gleaned the following code from various forums in an attempt to print out of Map Objects in VFP8
>
>
>Declare Integer CreateDC in Win32API ;
>	String lpszDriver, ;
>	String lpszDevice, ;
>	String lpszOutput, ;
>	String lpInitData
>
>lcPrinterName = GetPrinter()
>
>lnPrinterHDC = CreateDC("WINSPOOL",m.lcPrinterName,.NULL., .NULL.)
>
>thisform.oleMap.OutputMap(lnPrinterHDC)
>
>
>After selecting a printer, lnPrinterHDC is set to -1591670661 but nothing is actually sent to the printer.
>
>ESRI, the manufacturer of MapObjects, does not provide any sample code from printing in VFP. Any help is greatly appreciated.
>
>Todd.

Todd,
Currently MO is not installed and I can't test but I think this would work:
Public oForm
oForm = Createobject('myForm')
oForm.Show()

Define Class myForm As Form
  Height = 600
  Width = 800
  DoCreate = .T.

  Add Object ComDlg As OleControl With ;
    Oleclass = "MSComDlg.CommonDialog.1"

  Procedure ComDlg.Init
  This.Flags=0x100
Endproc

  Procedure cmdPrint.Click
  With Thisform
    .ComDlg.ShowPrinter
    .myMo.OutPutMap2(.ComDlg.hdc, _x,_y,_width,_height)
  Endwith
Endproc
Enddefine
myMo,_x,_y,... are MO object and variables (not in code). Also I remember MO had ExportMap and PrintMap too (to file?).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform