Click here to Skip to main content
15,888,070 members
Home / Discussions / C#
   

C#

 
AnswerRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 3:31
saurabh sahay10-Jun-09 3:31 
GeneralRe: Hooking messages of external application Pin
tasumisra10-Jun-09 3:40
tasumisra10-Jun-09 3:40 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 4:03
saurabh sahay10-Jun-09 4:03 
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 3:59
professionalRajesh R Subramanian10-Jun-09 3:59 
Questionopen Pdf in WebBrowser Control [modified] Pin
Abdul Rahman Hamidy10-Jun-09 1:08
Abdul Rahman Hamidy10-Jun-09 1:08 
AnswerRe: open Pdf in WebBrowser Control Pin
0x3c010-Jun-09 2:11
0x3c010-Jun-09 2:11 
GeneralRe: open Pdf in WebBrowser Control [modified] Pin
Abdul Rahman Hamidy10-Jun-09 19:44
Abdul Rahman Hamidy10-Jun-09 19:44 
AnswerRe: open Pdf in WebBrowser Control Pin
saurabh sahay10-Jun-09 2:27
saurabh sahay10-Jun-09 2:27 
Hi Abdul

There are two options for you.

1) File should be in the webserver location in the server, be in wwwroot folder of IIS or in any apache webserver.
eg. C:\inetpub\wwwroot\pdf\a.pdf

You can then write a c# client code

if (browser == "Firefox" || browser == "firefox")
System.Diagnostics.Process.Start("firefox.exe", urlname);
else
System.Diagnostics.Process.Start("iexplore.exe", urlname);
where urlname = "http://10.1.1.23/pdf/a.pdf" coming from an xml file.

2) you may download the file from server to your machine through the below webservice code.

// name contains path of pdf file in the server
System.IO.FileInfo fInfo = new System.IO.FileInfo(name);
long numBytes = fInfo.Length;
System.IO.FileStream fStream = new System.IO.FileStream(name, System.IO.FileMode.Open, System.IO.FileAccess.Read);
System.IO.BinaryReader br = new System.IO.BinaryReader(fStream);

// convert the file to a byte array
byte[] data = br.ReadBytes((int)numBytes);
br.Close();

fStream.Close();
fStream.Dispose();


// return pdf if we made it this far
return data;

and show it in the browser by the below code

if (browser == "Firefox" || browser == "firefox")
System.Diagnostics.Process.Start("firefox.exe", localpath);
else
System.Diagnostics.Process.Start("iexplore.exe", localpath);

where localpath="c:\a.pdf" coming from xml file
GeneralRe: open Pdf in WebBrowser Control Pin
Abdul Rahman Hamidy10-Jun-09 19:46
Abdul Rahman Hamidy10-Jun-09 19:46 
GeneralFind & Search in text File Pin
Isaac Gordon10-Jun-09 0:26
Isaac Gordon10-Jun-09 0:26 
GeneralRe: Find & Search in text File Pin
0x3c010-Jun-09 0:34
0x3c010-Jun-09 0:34 
QuestionHow to convert any format vedio format to FLV format using FileUpload Control Pin
asbis9-Jun-09 23:38
asbis9-Jun-09 23:38 
AnswerRe: How to convert any format vedio format to FLV format using FileUpload Control PinPopular
Rajesh R Subramanian9-Jun-09 23:43
professionalRajesh R Subramanian9-Jun-09 23:43 
AnswerRe: How to convert any format vedio format to FLV format using FileUpload Control Pin
Tom Deketelaere9-Jun-09 23:47
professionalTom Deketelaere9-Jun-09 23:47 
AnswerRe: How to convert any format vedio format to FLV format using FileUpload Control Pin
0x3c010-Jun-09 0:40
0x3c010-Jun-09 0:40 
QuestionGUI (White backgrounds Problem) Pin
gwithey9-Jun-09 23:09
gwithey9-Jun-09 23:09 
AnswerRe: GUI (White backgrounds Problem) Pin
Colin Angus Mackay9-Jun-09 23:26
Colin Angus Mackay9-Jun-09 23:26 
GeneralRe: GUI (White backgrounds Problem) Pin
gwithey10-Jun-09 0:01
gwithey10-Jun-09 0:01 
QuestionRemoting Problem Pin
Reddy Prakash9-Jun-09 22:39
Reddy Prakash9-Jun-09 22:39 
GeneralDisplaying unicode Pin
dell2249-Jun-09 22:08
dell2249-Jun-09 22:08 
GeneralRe: Displaying unicode Pin
Christian Graus9-Jun-09 22:22
protectorChristian Graus9-Jun-09 22:22 
Question[Message Deleted] Pin
Roshanakak9-Jun-09 21:51
Roshanakak9-Jun-09 21:51 
AnswerRe: "Out of Memory" exception PinPopular
Nagy Vilmos9-Jun-09 21:57
professionalNagy Vilmos9-Jun-09 21:57 
JokeSeems to have become an out of message exception... Pin
Paddy Boyd10-Jun-09 2:04
Paddy Boyd10-Jun-09 2:04 
Questionwrite a search engine for database Pin
prasadbuddhika9-Jun-09 21:37
prasadbuddhika9-Jun-09 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.