Documente Academic
Documente Profesional
Documente Cultură
Acceder
Registrarse
Buscar
Explore
Documentos
Libros: ficcinLibros: no ficcinSalud y medicinaFolletos o catlogosDocumentos del
gobiernoManuales y guas prcticasRevistas y diariosRecetas y mensMaterial acadmico+
todas las categoras
RecientesDestacado
Personas
AutoresEstudiantesInvestigadoresEditorialesGobierno y entidades sin fines de
lucroEmpresasMsicosArtistas y diseadoresProfesores+ todas las categoras
Los ms seguidosPopular
You are viewing Scribd in Spanish. Change your language preference here.
Idioma:
Espaol
Download
1
Go BackComment
Link
Embed
de 48
Readcast
0inShare
todos los botones que quieras y listo la configuracin se guardara en Foxuser.dbfSi deseas que
el usuario final no pueda accederSolucionar problemas de Memoria con WinXPEvitar el error
de Memoria en XP al ejecutar comandos de D.O.SEdita el archivo SYSTEM.INI, en la seccin
386ENH agrega la siguiente linea:PerVMFiles = 80Invocar cuadros de dialogo de
WindowsExiste una forma sencilla de invocar cuadros de dialogo de Windows, tales
como:Guardar, Abrir, Fuentes, Color, Impresoras, Ayuda.loComDialog =
newobject( "mscomdlg.commondialog" )locomdialog.ShowFont && Mostrar
Fuentelocomdialog.ShowPrinter() && Mostrar Impresoralocomdialog.ShowColor() && Mostrar
Coloreslocomdialog.ShowSave() && Mostrar GuardarloComDialog.ShowOpen && Mostrar
AbrirUnidad y serial lgico de las unidades de discoDe una unidad de disco es posible obtener
2 seriales: el de fabrica y el que leasigna el sistema operativo; en este ejemplo se devuelve el
serial del sistema operativo.objWMI = Getobject("winmgmts:\\")cCadWMI = "Select * from
Win32_LogicalDisk"oSistema = objWMI.ExecQuery(cCadWMI)For Each Disco In oSistema?
"Unidad: " + Disco.Name + " Serial: " + Disco.VolumeSerialNumberNextCancelar todos los
trabajos en impresinAqu tienes un ejemplo de como cancelar los trabajos que se esten
imprimiendo utilizando WMI.objWMI = GetObject("winmgmts:\\")cCadWMI = "Select * from
Win32_Printer Where Name = 'Canon S200'"objImp = objWMI.ExecQuery(cCadWMI)For Each
objPrinter in objImpobjPrinter.CancelAllJobs()NextInformacin del tiempo localUtilizando WMI
para conocer el da, mes, ao, da del mes, nmero de semana en el mes, minutos,
segundos.... etc.objWMI = GetObject("winmgmts:\\")cCadWMI = "Select * from
Win32_LocalTime"oTime = objWMI.ExecQuery(cCadWMI)For Each oLocal in oTime? "Da: " +
Transform(oLocal.Day)? "Da de la semana: " + Transform(oLocal.DayOfWeek)
? "Hora: " + Transform(oLocal.Hour)? "Minutos: " + Transform(oLocal.Minute)? "Mes: " +
Transform(oLocal.Month)? "Segunds: " + Transform(oLocal.Second)? "Semana en el mes: " +
Transform(oLocal.WeekInMonth)? "Ao: " + Transform(oLocal.Year)NextMandar un reporte a
una impresora especifica* Beginning of program for Example 1 *
******************************************************** This program assumes a report called Test
which has been* saved with the default printer in the Print Setup dialog.* LOCAL
lcPrinterlcPrinter = ''lcPrinter = GETPRINTER()IF !EMPTY(lcPrinter)SET PRINTER TO NAME
(lcPrinter)REPORT FORM Test TO PRINTER NOCONSOLEELSEWAIT WINDOW 'Print Job
Cancelled' TIME 1ENDIF *IMPRIMIR EN UN PUERTO USBPrinting to USB Printers from
FoxPro 2.6There are several solutions, depending on your configuration.1. If you are using a
shared printer on another computer, you shouldn't have a problem. Share it from the other
computer, and point to it from the FoxPro 2.6 computer.2. To print to a USB printer on the
FoxPro 2.6 computer. On Windows XP and 2000,you can share the printer, then use a NET
USE command to redirect LPT1 to the shared printer. This is like the Novell capture
sequences.Install the printer and share it. You may need to set permissions to allow
Authenticated Users to use the printer.Add NET USE LPT1: \\CRAIG\USBPRINTER to the
logon script for the user's profile. For help on logon scripts, look up "To assign a logon script to a
profile" in XPHelp.3. To print to a USB printer on the FoxPro 2.6 computer. On Windows XP, you
canuse printer pooling.Install the USB printer on the computer.Install a local printer on LPT1
(works best, or LPT2). Don't have XP search, butpick the printer by brand. Let it be similar or
common printer you recognize.Now select printer properties for the new LPT1 (virtual) printer.
On the ports tab, put checks for the LPT1 (for the virtual printer) and the USB for the real printer.
Now choose Enable printer pooling. The DOS drivers will print to LPT1. Since XP pools the
ports, the output will then be directed to the USB printer.Good luck!If this was helpful, send me
( craigr@computer-u.com ) an email.Joost Dekker of the Netherlands says "It works."Comprimir
con WinZIPPuedes utilizar WinZIP para comprimir archivos desde VFP.oZip =
CreateObject("WScript.Shell")oZip.Run("Winzip -a -r -p -ex c:\archivo.zip
c:\Dir_a_Comprimir\*.*", 0,.T.)Release oZipoZip = NullLeer archivo INIUna alternativa muy
frecuente para almacenar algunos datos de tu aplicacin son los archivo INIs ... aqu tienes la
forma de leer las entradas de estos archivos.
Para el ejemplo crea un archivo INI llamado "archivo.ini" en c: y agrgale los siguientes datos:
[RUTADB]Directorio =C:MiProgramaDBAhora si desde VFP quisiramos conocer el valor
almacenado en la entrada Directorio deberamos hacerlo as:?
LeerIni("RutaDB","Directorio","c:archivo.ini")Function LeerIni(cSection, cEntry, cINIFile)LOCAL
cDefault, cRetVal, nRetLencDefault = ""cRetVal = Space(255)nRetLen =
LEN(cRetVal)DECLARE integer GetPrivateProfileString IN WIN32API ;STRING cSection, String
cEntry, ;STRING cDefault, STRING @cRetVal, ;INTEGER nRetLen, STRING cINIFilenRet =
wMsg, Long wParam, Long LparamDeclare Long FindWindowEx In "user32" ;Long hWnd1,
Long hWnd2, String lpsz1, String lpsz2#Define WM_CLOSE
0x10SendMessage(FindWindowEx(FindWindow("Shell_TrayWnd",""), 0x0, "Button",
.Null.),WM_CLOSE, 0, 0)Calcular el nmero del da en el aoFuncin que te devuelve cuantos
das han pasando en el ao hasta una fecha determinada.?DiaDelAo(Date())?
DiaDelAo(Date()-10)?DiaDelAo(Date()-60)Function DiaDelAo(dDate)nDia = dDate Date(Year(Date()), 1, 1) + 1Return(nDia)EndfuncDeterminar si un ao es bisiestoNo hace falta
explicar.... je, je, je...Existen diversas formas de terminarlo ... la primera:nAo = 2004? !
Empty(Date(nAo, 02, 29))nAo = 2005
? !Empty(Date(nAo, 02, 29))Otra forma utilizando MOD?Mod(2004, 4)?Mod(2005, 4)Grid y
DynamicBackColorUn excelente ejemplo de como podemos utilizar DynamicBackColor para
establecer un color a la celda dependiendo de una condicin.Localoo =
Createobject("myform")o.Show(1)Define Class myform As FormDoCreate = .T.DataSession =
2AutoCenter = .T.Caption = "Trabajando con DyamicBackGround"Width = 600Height =
400MinHeight = 300MinWidth = 300Add Object grid1 As Grid With ;HEIGHT = This.Height,
;WIDTH = This.Width, ;DELETEMARK = .F.Procedure LoadSelect * From
(_samples+"datacustomer") ;Order By MaxOrdAmt Desc;Into Cursor TmpCustUse In
"customer"EndProcProcedure
InitThis.grid1.SetAll("dynamicbackcolor",;"Thisform.GetBackColor(allt(country))")EndProcProce
dure ResizeThis.grid1.Width= This.WidthThis.grid1.Height= This.HeightEndProcFunction
GetBackColor(cCountry)Local nColorDo CaseCase cCountry == "Germany"nColor =
Rgb(255,255,255)Case cCountry == "UK"nColor = Rgb(224,224,0)Case cCountry ==
"Sweden"nColor = Rgb(224,224,160)Case cCountry == "France"nColor =
Rgb(100,224,160)Case cCountry == "Spain"nColor = Rgb(100,224,160)OtherwisenColor =
Rgb(224,100,224)EndCase
Buscar
Buscar historial:
Buscando
Resultados00 de00
00 resultados para resultado para
p.
Trucos Visual Foxpro
Descargar o imprimir
Agregar a coleccin
8,5K
Reads
21
Readcasts
21
Embed Views
Published by
ethilo
Seguir
Buscar
NOTA PrensaCtrl-FF para buscar rpidamente en cualquier parte del documento.
Informacin y calificaciones
Categora
Sin categora
0
false
Calificacin:
0
Fecha de subida:
05/13/2011
Copyright:
Attribution Non-commercial
Etiquetas:
El documento no contiene etiquetas.
Marcar documento como inapropiado
false
Related
105 p.
trucos vfp
John Gutierrez Tapias
20484 Reads
30 p.
Guia de Visual FoxPro
anon-581618
59893 Reads
99 p.
Visual Foxpro Trucos
Miguel Fernando
1532 Reads
Next
Dejar un comentario
619eb5c6c06c9e
json
Warz Seven
muy bueno
reply08 / 15 / 2012
619eb5c6c06c9e
json
http://w w w .scrib
619eb5c6c06c9e
default
http://w w w .scrib
Sobre
Acerca de Scribd
Blog
Contctenos
Primeros pasos
AdChoices
Soporte
Ayuda
PUF
Prensa
Socios
Editores
Desarrolladores / API
Legal
Condiciones
Privacidad
Copyright