Cómo agregar un Combo a un Grid?
Links de consulta, Visual Fox Pro, Trucos Comentarios ( 6 ) »Por: David Amador T
 
		 
		 
		 
		

 
		loComDialog =
NewObject("mscomdlg.commondialog")locomdialog.ShowFont()
&& Mostrar Fuentelocomdialog.ShowPrinter()
&& Mostrar Impresoralocomdialog.ShowColor()
&& Mostrar Coloreslocomdialog.ShowSave()
&& Mostrar GuardarloComDialog.ShowOpen()
&& Mostrar Abrir 
		oShell =
Createobject("Shell.Application")oShell.
Open(16) && ESCRITORIOoShell.
Open(14) && MIS VIDEOSoShell.
Open(11) && MIS MUSICAoShell.
Open(10) && CAPETRA DE MENU INICIOoShell.
Open(9) && ENVIAR AoShell.
Open(8) && RECIENTEoShell.
Open(6) && FAVORITOSoShell.
Open(5) && MIS DOCUMENTOSoShell.
Open(4) && IMPRESORASoShell.
Open(3) && PANEL DE CONTROLoShell.
Open(2) 
		 
		Un ejemplo como podemos crear tablas en Word con datos de tablas de VFP, a través de Automatización.
 
		oCrypt =
NEWOBJECT("_cryptapi",HOME()+"ffc\_crypt.vcx")cEncryptedString = []oCrypt.encryptSessionStreamString(
"Encriptando Texto","clave", @cEncryptedString) 
		LOCAL objXL, objXLchart, intRotate
      
      objXL = CreateObject("Excel.Application")
      objXL.Workbooks.Add
      objXL.Cells(1,1).Value = 50
      objXL.Cells(1,2).Value = 10
      objXL.Cells(1,3).Value = 15
      objXL.Range("A1:C1").Select
      
      objXLchart = objXL.Charts.Add()
      objXL.Visible = .t.
      objXLchart.Type = -4100 
      
      For intRotate = 5 To 180 Step 5
            
      objXLchart.Rotation = intRotate
      Next
      
      For intRotate = 175 To 0 Step -5
            
      objXLchart.Rotation = intRotate
      Next
		
 
		oFS=
CreateObject("scripting.filesystemobject") 
		Si quiere que nadie cambie el tamaño de las columnas de un grid, puede utilizar esta forma.
THISFORM.Grid1.SetAll("Resizable", .F., "Column")
 
		RUN COPY
       Archivo1.txt + 
      Archivo2.txt  Destino.txt
      
      Otra forma seria utilizando la función 
      strtofile
      
      strtofile(filetostr("Archivo1.txt") + filetostr("Archivo2.txt"), 
      "Destino.txt")
		
 
		ofs = CreateObject("scripting.filesystemobject")
      ofs.copyfolder("c:\Origen","e:\Destino")
      
		
 
		Forma de avanzar o retroceder dentro de un grid.
Thisform.Grid1.DoScroll(2)
Thisform.Grid1.DoScroll(3)
Donde los parámetros de este método son los siguientes:
      0 Desplazamiento hacia arriba
      1 Desplazamiento hacia abajo
      2 Desplazamiento retroceso de página
      3 Desplazamiento avance de página
      4 Desplazamiento a la izquierda
      5 Desplazamiento a la derecha
      6 Desplazamiento página a la izquierda
      7 Desplazamiento página a la derecha
		
