Click here to Skip to main content
12,826,806 members (44,993 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
How to Disable right click operation in pdf file in (Windows Application)
I am using AxInterop.PDFXCviewAxLib and Interop.PDFXCviewAxLib referances.
And i am call that pdf file like:
Call PDFx.SetDevInfo("sssss-sssss-sssss-sssss-sssss-sssss", "sssss$sssss$sssss#")
  PDFx.OpenDocument(Application.StartupPath & "\Application.pdf")
Posted 19-Jan-13 2:12am
Updated 19-Jan-13 10:33am
Sergey Alexandrovich Kryukov 20-Jan-13 14:47pm
Think about it: click is a physical action, you cannot disable it.
If you want to avoid the effect of the click, why?!
Aravindba 29-Jan-13 21:51pm
Based on the user rights i have give premession to right click and do further action.If user level1 cannot right click and do save as ,find,ect.,
Sergey Alexandrovich Kryukov 29-Jan-13 21:58pm
This is good that you mention user rights. According to these rights, you should not disable right click. So, what's the problem?
Aravindbpanchu 27-Feb-13 0:35am
Thanx for ur reply,sorry for late reply.
But in web application it available (
see this link.Is it way to find right click action in ?
Good point, I know. Well, I would say, having some feature in the Web does not make it legitimate.
In fact, the Web is a huge source of totally non-legitimate and unacceptable practices, don't you see that?
Aravindbpanchu 28-Feb-13 23:18pm
ok sir thanx for ur reply.
I have another question .How to open default mail client(outlook,outlook express,opera,thunderbird ect...) and fill all fields like Form,To address,Cc,attachments when i click in one button in web application ( this website i post that question pls see this link
It run in local drive like D,E,F but if i publish and put in IIS it cant open default email client and it show some error,pls see that link.And also each mail clien have different attachment tag like Outlook and outlook express have "attach" opera have "attachments" and etc,.,,

Thanx in advance
"This is a very common question, raised by people who have no idea what they are doing..." this is a pretty good idea by OriginalGriff.

First thing which comes to mind would be creating an .eml file in temporary directory (you will find .NET classes for that), and call System.Diagnostics.ProcessStart("filename.eml"); if your default mail application understands those files, it will do it.

This is the usual idea, mimic what a system user, non-developer usually does, a person who does not understand how things work. This is "I know just this, don't want to know anything else" approach, can you see it? It will lead nowhere...

But this is really, really sloppy idea, total non-programmer's approach. Better approach would be using mail server immediately. If this is SMPT, then SMPT...

Aravindbpanchu 6-Mar-13 23:10pm
Another doubt How to find pdf viewer contains document or not ? if contains i want to close all document using by PDFxManual .CloseAllDocuments if not i leave as it is.
in if condition..... pls reply asap
Quite frankly, I've no idea.
The problem is: you are trying to "hack" or master some Interop library. The source code is closed, is that right?
I would seriously consider using some 3rd-party PDF code, open-source. I would not feel comfortable using some Interop with closed code. And by the way, look at Adobe PDFViewer? Awful application, in my view; heavy, slow, inconvenient, highly invasive (always asked the users for update)... How can I trust Adobe after all that?
Just the idea...
Aravindbpanchu 7-Mar-13 0:12am
Thank for ur replay
why i am asking this question ,i want delete all file in a specific folder(Temp),in that all files are pdf file ,that file are download form sql server and save in Temp folder and open in pdf viewer.After i see pdf file i close the application(Windows application in,I WANT TO DELETE ALL FILES IN TEMP FOLDER BEFORE CLOSE THE APPLICATION.If pdf file open in pdf viewer i cant delete file form Temp folder and it show error like "File cannot be delete,because it used by another application " something like this....
If file not open in viewer i can delete Temp folder but if file open in viewer i can't delete folder
pls reply asap
Wait a second. On the client? You don't create the temp file, a browser does. You don't have control over it anyway. A user of the browser can call some cleanup...
Aravindbpanchu 7-Mar-13 3:11am
Then how to open and read pdf file from Sql Server 2012 ?.In sql sever 2012 pdf files or any file is save as binary format ,we can create a temp folder and convert binary format as original pdf file and we can open using pdf viewer.I am ask about windows application !!!! ok ???
Any way i clear this problem Thanx for ur reply....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170326.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100