VFP ·R¥ÎªÌªÀ°Ï ­º­¶ VFP ·R¥ÎªÌªÀ°Ï
¥»°Q½×°Ï¬° Visual Foxpro ·R¥ÎªÌ¸gÅç¥æ¬yªº¦a¤è, ½Ð¦h¦h§Q¥Î"·j´M"ªº¥\¯à, ¥ý¬d¬Ý¬Ý¦³µL«e¨Ò¥i´`, ¦pªGÁÙ¦³¤£À´ªº¦Aµo°Ý. ³¡¥÷¥DÃD¦³ªþ¥[ÀÉ®×, ¶·¥ýµù¥U¦¨¬°ªÀ°Ï©~¥Á¤~¥i¥H¤U¸ü.
 
 ±`¨£°ÝÃD±`¨£°ÝÃD   ·j´M·j´M   ·|­û¦Cªí·|­û¦Cªí   ·|­û¸s²Õ·|­û¸s²Õ   ·|­ûµù¥U·|­ûµù¥U 
 ­Ó¤H¸ê®Æ­Ó¤H¸ê®Æ   µn¤JÀˬd±zªº¨p¤H°T®§µn¤JÀˬd±zªº¨p¤H°T®§   µn¤Jµn¤J

¨Ï¥ÎWINZIP¨Ó°õ¦æÀ£ÁY¤Î¸ÑÀ£ÁY

 
µoªí·s¥DÃD   ¦^ÂÐ¥DÃD    VFP ·R¥ÎªÌªÀ°Ï ­º­¶ -> VFP °Q½×°Ï
¤W¤@½g¥DÃD :: ¤U¤@½g¥DÃD  
µoªí¤H ¤º®e
garfield
Site Admin


µù¥U®É¶¡: 2003-01-30
¤å³¹: 2157


²Ä 1 ¼Ó

µoªíµoªí©ó: ¬P´Á¤G ¥|¤ë 29, 2003 12:39 am    ¤å³¹¥DÃD: ¨Ï¥ÎWINZIP¨Ó°õ¦æÀ£ÁY¤Î¸ÑÀ£ÁY ¤Þ¨¥¦^ÂÐ

¥N½X:
*********************
func zip
lpara mfunc , mzipfile , mtagfile
* mfunc = 'a' append
* ='e' extract
* mzipfile ¨Ò: c:\backup\20011231
* mtagfile ¨Ò: c:\myprg\*.* ©Î±N­nZIP¤§ÀɮײM³æ,«Ø¥ß¤å¦rÀÉ, ¥Î@²M³æÀɦW
* ¥Ø«e¥u¯à°µ¨ì¥h°õ¦æ winzip, ©|¥¼¬ã¨sÀˬdWINZIP¬O§_°õ¦æ§¹¦¨¤§FUNCTION.
local mret
mret = ''
mfunc=lower( mfunc )
do case
case mfunc = 'a'
   mfunc='-a'
case mfunc = 'e' .or. mfunc='x'
   mfunc='-e -o'
endcase
mret = zipexepath()
if isnull( mret )
   msgbox('½Ð¥ý¦w¸ËWINZIP ¤~¯à°õ¦æ¸ê®ÆÀ£ÁY¤Î¸ÑÀ£ÁYªº¥\¯à')
else
   mret = runfile( mret , mfunc+' '+mzipfile+' '+mtagfile )
endif
return mret
******************************
func zipexepath
#Define HKEY_LOCAL_MACHINE -2147483646
return readregs(HKEY_Local_machine, 'Software\Microsoft\windows\CurrentVersion\App Paths\winzip.exe\' ,'' )
********** §@ªÌ: ¥v¹Å´I
***********************
func runfile &&--°õ¦æ¬Y¤@­ÓÀÉ®×, ¥i¥H¦Û¦æ§PÂ_°ÆÀɦW(³z¹LÀÉ®×Á`ºÞ¨Ó°õ¦æ)
* exp : runfile( "c:\temp\myxls.xls" ) &&--¶}±Ò xls ÀÉ
* exp: runfile( "c:\temp\myxls.xls",,,'print') &&--ª½±µ¦C¦L
* ¥i¥H¦b¦C¦L«e¥ý¶}¨º­Óª«¥ó, ¥ý³]©w¦Lªí¾÷, ¦A¨Órunfile , ´N¥i¥H¤£·|¦L¨ì¹w³]¦Lªí¾÷¤F.
* ¦bword¤¤, §ï¦Lªí¾÷: .ActivePrinter = "Epson LQ-300 ESC/P 2"
* ¦bExcel¤¤, §ï¦Lªí¾÷: .Application.ActivePrinter = pub_faxExceldriver
* mwindowstype = 0(¤º©w)¤£Åã¥Üµ{¦¡µe­±, 1 ¬°Åã¥Ü­ìµe­± , 3=³Ì¤j¤Æ

lpara mfile , mparament , mpath , mactive , mwindowstype
if empty(mfile)
   mfile=''
endif
if empty( mparament )
   mparament = ''
endif
if empty(mpath)
   mpath = ''
endif

if empty(mactive) .or. type('mactive')#'C'
   mactive = 'open'
endif
if empty(mwindowstype)
   mwindowstype=0
endif

local mret
* ½Ðª`·N shellExecute ¤§¤j¤p¼g
*declare integer ShellExecute in shell32.dll integer hWnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, integer nShowCmd
declare integer ShellExecute in shell32.dll integer, string, string, string, string, integer
mret =shellExecute( 0, mactive , mfile , mparament , mpath , mwindowstype )
*mret =shellExecute( 0, 'open' , .text1.value , "" , "" ,0 )
*mret=ShellExecute(0, 'open', 'XCOPY32.EXE','C:\TEST C:\TEMP\TEST1 /E /I /Q /Y', 'C:\TEMP', 0)
if mret<=31
   msgbox('³o­ÓÀÉ®× '+trim(mfile)+' ¨Ã¤£¤ä´©°Ê§@('+mactive+')')
endif
clear dlls shell32.dll
return mret
**************************************************
*** Ū¨ú¦r¦ê­È ReadRegistryString
*** ¶Ç¦^­È¡G¦r¦ê©Î.NULL.ªíµL¦¹¾÷½X
**************************************************
Func ReadRegs
LPARAMETERS HKey, Subkey, Entry
LOCAL nHandle, nResult, nSize, cDataBuffer, nType
nHandle=0

*//¶}±Ò¾÷½X
nResult=RegOpenKey(HKey,SubKey,@nHandle)
IF nResult#ERROR_SUCCESS
   RETURN .NULL.
ENDIF

*// ¨Ï¥ÎRegQueryValueEx¨M©w¸ê®Æ«¬ºA
DECLARE INTEGER RegQueryValueEx IN Win32API INTEGER nHKey,;
STRING lpszValueName,INTEGER dwReserved,;
INTEGER @lpdwType, STRING @lpbData, INTEGER @lpcbData

*//±N­È¶Ç¦^ buffer
cDataBuffer=space(256)
nSize=LEN(cDataBuffer)
nType=0
nResult= RegQueryValueEx(nHandle,Entry,0,@nType,@cDataBuffer,@nSize)
=RegCloseKey(nHandle)

IF nResult#ERROR_SUCCESS
   RETURN .NULL.
ENDIF

IF nSize <2
   RETURN "" &&//ªÅ¦r¦ê
ENDIF &&//¥h°£ªÅ¥Õ¦r¤¸¤Î¦r¦ê«áªº NULL
RETURN SUBSTR(CHRTRAN(cDataBuffer,CHR(0),""),1,nSize-1)

_________________
§Q¥Î>>·j´M<<ªº¥\¯à·|¤ñ°ÝªºÁÙ­n§Ö±o¨ìµª®×.


garfield ¦b ¬P´Á¤@ ¤C¤ë 28, 2003 2:46 pm §@¤F²Ä 1 ¦¸­×§ï
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ µo°e¹q¤l¶l¥ó
Ruey



µù¥U®É¶¡: 2003-03-12
¤å³¹: 1698
¨Ó¦Û: tunglo

²Ä 2 ¼Ó

µoªíµoªí©ó: ¬P´Á¤@ ¤C¤ë 28, 2003 1:48 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

Easily zip and unzip in VFP using zip32.dll and unzip32.dll. The libraries contain 3 part:

1. Dynamic Link Library to do zip and unzip function: ZIP32.DLL and UNZIP32.DLL

2. A shell Dynamic Link Library that I develop on VB6 to use zip libraries easily: ZIPIT.DLL

3. Sample code on VFP to zip and unzip files.

Note:
-----

You must do following things:

1. Copy ZIP32.DLL, UNZIP32.DLL, ZIPIT.DLL to c:\windows\system or c:\winnt\system32.

2. Register ZIPIT.DLL with command line on run windows:

regsvr32 /c c:\windows\system\zipit.dll

(You don't need to register zip32.dll and unzip32.dll)

3. Just test vfp sample code: ZIPIT.PRG with two function ZIPFILES to compress files and UNZIPFILES to uncompress zip files.

Enjoy it!

Description

The libraries contain 3 part:

1. Dynamic Link Library to do zip and unzip function: ZIP32.DLL and UNZIP32.DLL

2. A shell Dynamic Link Library that I develop on VB6 to use zip libraries easily: ZIPIT.DLL

3. Sample code on VFP to zip and unzip files.

Note:
-----

You must do following things:

1. Copy ZIP32.DLL, UNZIP32.DLL, ZIPIT.DLL to c:\windows\system or c:\winnt\system32.

2. Register ZIPIT.DLL with command line on run windows:

regsvr32 /c c:\windows\system\zipit.dll

(You don't need to register zip32.dll and unzip32.dll)

3. Just test vfp sample code: ZIPIT.PRG with two function ZIPFILES to compress files and UNZIPFILES to uncompress zip files.

Enjoy it!

_________________
#############################
§Ö¼Ö¶ý«}¨t¦C©¯ºÖ¦v°t,³Ü¤Q¥þÂû´ö~­ì¨Ó©¯ºÖ¨º»ò²³æ!!

¾Ç·|VFP¨Ï¥ÎªÌªÀ°Ïªº·j´M,Code¤~·|§ó¦³½ì~
#############################
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§
Ruey



µù¥U®É¶¡: 2003-03-12
¤å³¹: 1698
¨Ó¦Û: tunglo

²Ä 3 ¼Ó

µoªíµoªí©ó: ¬P´Á¤@ ¤C¤ë 28, 2003 2:00 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

>>>>>>>>>>>>>>>>>>>>>>>>>>>
New features in ZipMgr v3.0
>>>>>>>>>>>>>>>>>>>>>>>>>>>
(release date May 14, 2003)

The class was renamed Zip Automation Manager, and the class
library was renamed ZipMgr.VCX.

New method IsWinZipInstalled() returns .T. if WinZip?is installed,
otherwise returns .F.

ZipMgr now looks for the VFP registry class (_registry.vcx)
under the VFP installation root directory, rather than under
the directory from which VFP was started.

ZipMgr is now distributed only as a visual class library (vcx).
If you want a PRG-based class you can easily create one yourself;
see the help file for instructions.

The help file was updated and improved.

License Change: Zip Automation Manager is still free, but can now be
redistributed only as part of a VFP application. Webmasters wanting
to include Zip Automation Manager on their Web site are asked to
provide a link to the file on the author's Web site rather than
posting a copy of the file on their own Web site. The file can be
down-loaded from http://www.ita-software.com/foxpage.htm. Please
refer to the revised license agreement in the help file for complete
information.

>>>>>>>>>>>>>>>>>>>>>>>>>>>
New features in ZipMgr v2.0
>>>>>>>>>>>>>>>>>>>>>>>>>>>
(release date July 21, 2002)

New Properties:
---------------
nRunType 1=API_AppRun, 2=Windows Script Host
nWSHWindowType 0-7 (see WSH doc)

New Methods:
------------
RunCommand() - called by AddFiles() and ExtractFiles() to
run WinZip? uses value of nRunType to determine
what run type to use; can be subclassed so you
can put in your own code
SetRunType( tnRunType) - set the value of nRunType
GetRunType() - retrieve the value of nRunType
SetWSHWindowType( tnType) - set the value of nWSHWindowType
GetWSHWindowType() - retrieve the value of nWSHWindowType

Choice of API_AppRun or WSH
---------------------------
You can elect to have ZipMgr run WinZip?using either Ed Rauh's
API_AppRun (as in earlier releases of ZipMgr) or the Windows
Script Host (WSH). To use API_AppRun, set the value of nRunType
to 1 (or leave it alone - this is the default value). To use WSH,
set the value of nRunType to 2. For example:
ox=newobject( "zipmgr", "zipmgr.prg")
ox.SetRunType(2) && Use WSH
* proceed as before...

Other:
------
ZipMgr is now released as both a prg-based class and a
vcx-based class. The function is identical in both incarnations.

Subclassing ZipMgr:
----------------------
To customize ZipMgr for your own preferences it is recommended
that you create a subclass of ZipMgr and override the default
behavior with your own code. For example, if you want to have
ZipMgr run WinZip?using something other than API_AppRun or WSH,
you can override the default code in the RunCommand() method.

Progammatically, you would do this as follows:
SET PROCEDURE TO zipmgr.prg ADDITIVE
DEFINE CLASS myZipMgr AS zipmgr
PROTECTED PROCEDURE RunCommand()
WAIT WINDOW "This is my sub-classed RunCommand() method"
* Override the default RunCommand() method code here
* to run the command in THIS.cCommandLine in whatever
* way you may want to.
*
* Be sure to return numeric: 0 if OK, <> 0 if not OK.
*
RETURN 0
ENDPROC && RunCommand()
ENDDEFINE

Or of course you can create a subclass in the class browser.

-----------------------------------------------------------
WinZip?is a registered trademark of WinZip Computing, Inc.

_________________
#############################
§Ö¼Ö¶ý«}¨t¦C©¯ºÖ¦v°t,³Ü¤Q¥þÂû´ö~­ì¨Ó©¯ºÖ¨º»ò²³æ!!

¾Ç·|VFP¨Ï¥ÎªÌªÀ°Ïªº·j´M,Code¤~·|§ó¦³½ì~
#############################
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§
lukapp



µù¥U®É¶¡: 2003-09-07
¤å³¹: 42


²Ä 4 ¼Ó

µoªíµoªí©ó: ¬P´Á¤é ¤E¤ë 07, 2003 12:35 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

½Ð±Ð ruey:
§Ú·Q zip to exe.
¦³ .dll ©Î .vcx ¥i¨Ñ¤¶²Ð¶Ü?
ÁÂÁÂ ! ÁÂÁÂ !
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§
Ruey



µù¥U®É¶¡: 2003-03-12
¤å³¹: 1698
¨Ó¦Û: tunglo

²Ä 5 ¼Ó

µoªíµoªí©ó: ¬P´Á¤@ ¤E¤ë 08, 2003 6:23 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

lukapp ¼g¨ì:
½Ð±Ð ruey:
§Ú·Q zip to exe.
¦³ .dll ©Î .vcx ¥i¨Ñ¤¶²Ð¶Ü?
ÁÂÁÂ ! ÁÂÁÂ !




garfield ªºCommand¤èªk¥i¨Ñ°Ñ¦Ò

©ÎªÌ¬ã¨sZipMgr v3.0

­Y¦³°ÝÃD¦A´£¥X!!

_________________
#############################
§Ö¼Ö¶ý«}¨t¦C©¯ºÖ¦v°t,³Ü¤Q¥þÂû´ö~­ì¨Ó©¯ºÖ¨º»ò²³æ!!

¾Ç·|VFP¨Ï¥ÎªÌªÀ°Ïªº·j´M,Code¤~·|§ó¦³½ì~
#############################
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§
±q¤§«eªº¤å³¹¶}©lÅã¥Ü:   
µoªí·s¥DÃD   ¦^ÂÐ¥DÃD    VFP ·R¥ÎªÌªÀ°Ï ­º­¶ -> VFP °Q½×°Ï ©Ò¦³ªº®É¶¡§¡¬° ¥x¥_®É¶¡ (GMT + 8 ¤p®É)
²Ä1­¶(¦@1­¶)

 
«e©¹:  
±z µLªk ¦b³o­Óª©­±µoªí¤å³¹
±z µLªk ¦b³o­Óª©­±¦^ÂФ峹
±z µLªk ¦b³o­Óª©­±½s¿è¤å³¹
±z µLªk ¦b³o­Óª©­±§R°£¤å³¹
±z µLªk ¦b³o­Óª©­±¶i¦æ§ë²¼
±z µLªk ¦b³o­Óª©­±ªþ¥[ÀÉ®×
±z µLªk ¦b³o­Óª©­±¤U¸üÀÉ®×


Powered by phpBB © 2001, 2005 phpBB Group
¥¿Å餤¤å»y¨t¥Ñ phpbb-tw ºûÅ@»s§@