Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Hi
How to Disable right click operation in pdf file in vb.net (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
Aravindba5.5K
Edited 19-Jan-13 10:33am
(no name)499K
v2
Comments
Sergey Alexandrovich Kryukov at 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?!
—SA
Aravindba at 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 at 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?
—SA
Aravindbpanchu at 27-Feb-13 0:35am
   
Thanx for ur reply,sorry for late reply.
But in web application it available (http://www.codeproject.com/Questions/456027/How-to-disable-right-click-option-for-pdf-file)
see this link.Is it way to find right click action in vb.net ?
Sergey Alexandrovich Kryukov at 27-Feb-13 0:57am
   
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?
—SA
Aravindbpanchu at 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 (vb.net).In this website i post that question pls see this link http://www.codeproject.com/Questions/427923/IIS-doesnt-open-exe-file-like-calc-exe-outlook-exe
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
Sergey Alexandrovich Kryukov at 1-Mar-13 0:24am
   
"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...
 
—SA
Aravindbpanchu at 6-Mar-13 23:10pm
   
Hai
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
Thanx
Aravind
Sergey Alexandrovich Kryukov at 6-Mar-13 23:30pm
   
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...
—SA
Aravindbpanchu at 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 vb.net),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
Thanx
Aravind
Sergey Alexandrovich Kryukov at 7-Mar-13 2:00am
   
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...
—SA
Aravindbpanchu at 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
0 OriginalGriff 295
1 DamithSL 295
2 Sergey Alexandrovich Kryukov 197
3 Peter Leow 155
4 Afzaal Ahmad Zeeshan 154
0 OriginalGriff 7,510
1 DamithSL 5,494
2 Sergey Alexandrovich Kryukov 4,954
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2014
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