2 major questions i need awnsered. PDF file in vb6, and disable.
Is there a way to embed a pdf file in vb6, and is there a way completly disable ALL things the user can do to exit out, minimize, close, and even control alt and deleat?
Re: 2 major questions i need awnsered. PDF file in vb6, and disable.
you can cancel the unload on the queryunload event by setting cancel = 1
this won't work when the user choose to terminate your process with no warning.
it's very hard to take control of the ctrl-alt-delete, it requires sub classing + dll
Last edited by whatsup; Jun 13th, 2010 at 05:41 AM.
Re: 2 major questions i need awnsered. PDF file in vb6, and disable.
Hmm.... Well, beacause i was going to write a book kinda thing. I was planning on using pdf and embedding it in vb6, exporting it as a file. But, to try to stop ppl from sharing it, etc, i was going to have it to where there was no other way of closing it, except for a button, which will deleat the file that vb6 exported for using..... Anyone else have a better idea?
2. on runtime i extract the embed file,
and in your case, open it for reading.
3. immediatly after step 2, i reopen the pdf in share read - off
so now the pdf is locked and no other program can open/copy do anything with it.
even if the user terminate your app from the task manager
the pdf file will remain lock, so no other program can use it.
but ...
after the user reset the machine he can use the pdf.
so to ensure that the user won't be able to terminate your app from task manager, i have a timer that check every half a second
for the running process - task manager, and if it find it, i post message to the task manager to close it
so as long as your app is running the task manager will be disabled.
yu can show a message to the user, that if he want to use task manager,
he must close your app, first.
4. after the user close your app with the close button,
i have a destroy function that destroy the pdf, so no recover utilty can recover it.
all this i do ofcourse with APIs.
Last edited by whatsup; Jun 13th, 2010 at 07:18 PM.
Re: 2 major questions i need awnsered. PDF file in vb6, and disable.
Nothing can be 100% protected, but what you can do is try and make it hard for users to copy it. If it's a book, I doubt most users will have enough patience to take hundreds of screen shots and then compile them into a new file.
But then again, I have run across PDFs made of scanned pages of books, some with over 700 pages. I can't even imagine how long it took to scan that many pages, one by one and compile them into one file. So if a user is determined, they will do it.