|
-
May 15th, 2001, 07:47 AM
#1
Zip with Vb
hi,
Is there a way to avoid the begin screen of winzip ("i Agree" and "Quit").
I Run zip with the shell function and i wander if you can use a parameter to avoid this screen.
Or is there a way to close that screen with sendmessage. I tried this:
Dim result as Long
Dim result2 as Long
Dim leave as Boolean
result = FindWindow(vbNullString, "WinZip")
If result > 0 then
result2 = SendMessage(result, wm_keydown, ???, 0)
result2 = SendMessage(result, wm_keyup, ???, 0)
End If
but i don't know what to fill in for the ???. (I tried using spyxx.exe, but there i see that the number of the button changes.
Any help appreciated.
-
May 15th, 2001, 07:54 AM
#2
Re: Zip with Vb
try to use the Visual Studio utility call SPY to check what message that is being sent to Winzip when you press the button "I Agree".
HTH
cksiow
http://vblib.virtualave.net - share our codes
-
May 15th, 2001, 07:55 AM
#3
Re: Zip with Vb
you should register winzip...
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 24th, 2001, 08:23 AM
#4
Re: Zip with Vb
Hi,
So, is there any way to avoid the begin screen of winzip ("I Agree" and "Quit")? I have the same task, did anybody got a solution. Thanks.
-
October 24th, 2001, 09:03 AM
#5
Re: Zip with Vb
private Sub Zip_File(Src as string, trgt as string)
zipIT = "c:\program files\winzip\winzip32 -a "
unzipIT = "c:\program files\winzip\winzip32 -e "
Shell (zipIT & Chr(34) & trgt & Chr(34) & " " & Chr(34) & Src & Chr(34))
End Sub
'call of the function
Call Zip_File("E:\Example.zip ", "E:\example.txt")
To unzip the file use the exe file with the -e paramaeter
i use this, and it works fine
-
October 24th, 2001, 09:13 AM
#6
Re: Zip with Vb
Thanks, it works fine for me too. But did you find how to avoid the start screen of winzip ("I Agree" and "Quit")? Were you able to use SendMessage function?
-
November 14th, 2001, 06:30 AM
#7
Re: Zip with Vb
This may be interesting:
http://www.codeguru.com/vb/gen/vb_gr...cle.php/c6743/
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
Last edited by Cimperiali; March 15th, 2004 at 04:56 PM.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
July 19th, 2002, 04:22 AM
#8
An hint from MKSa...
Serach in this thread for MKSa code, and change "Ok" to
"I Agree".
Make code run after winzip window is showing up.
It will press the I agree button. Thsi does not
make that window hide, but make it disappear really soon...
Press the "I Agree" button via code
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
July 19th, 2002, 08:11 AM
#9
Or a completely different alternative:
http://www.info-zip.org/
Winzip compatible zip / unzip libraries for VB. Do it all without requiring the use of Winzip itself!
TimCottee
I know a little about a lot of things and a lot about very little.
Brainbench MVP For Visual Basic
http://www.brainbench.com
MCP, MCSD, MCDBA, CPIM
-
July 19th, 2002, 09:09 AM
#10
wzunzip(command line version)
wzunzip is an addon command line version. I "shell" this command all the time and it works great. No windows popping up! I redirect the output to a file, read file and dump to a VB window!
-
September 13th, 2002, 03:56 PM
#11
Cimperiali I tried the code and changed "Ok" to "I Agree"... but it didnt work. I can get the handle of the winzip window but I can't get the handle of the "I Agree" button. I even did some research and tried different things:
hchildwnd = FindWindowEx(hwnd, ByVal 0&, "Button", "I Agree")
hchildwnd = FindWindowEx(hwnd, ByVal 0&, "Button", "I &Agree")
and the original...
hchildwnd = FindWindowEx(hwnd, ByVal 0&, vbNullString, "I Agree")
but each gave me 0 as a return value...
Can you or anyone else give a try and let me know if it works for you... thxs...
DrUnKeN MaStEr 
-
September 16th, 2002, 03:53 AM
#12
Winzip masters have been smarter...
TRying to get captions of objects with enumchildwindow returns cations of many objects (included the "Ordering info..." button) but not of the "I Agree" or "Quit" button. It seems as if those two buttons have not a caption but an image on them....
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
September 16th, 2002, 07:51 AM
#13
Forgive me if I am wrong, but the problem that you are getting is due to the fact you are using an Un-Registered program (WinZip). One way around this is to register the program and pay the license fee. (really inexpensive). I don't think this board was envisioned as a place to provide hacks to programs, nor should we as users rate this thread. Again, if I am wrong, I apologize. But if I am right......
My $.02 worth.
Paul
Last edited by praymond; September 16th, 2002 at 07:58 AM.
-
September 16th, 2002, 08:08 AM
#14
To praymond
Of course, you're right: register it is the correct solution. But speaking of "how to press a button on anther Pgm knowing caption of window and of button" is really an interesting issue, and this is why I entered the discussion. Again, you'ree right about the "registering" thing, and you're right also about thehis board isssue...
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|