Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632018-Jun-19 18:30
Member 1370632018-Jun-19 18:30 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
OriginalGriff18-Jun-19 20:08
mveOriginalGriff18-Jun-19 20:08 
AnswerRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Eddy Vluggen15-Jun-19 1:00
professionalEddy Vluggen15-Jun-19 1:00 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632015-Jun-19 1:35
Member 1370632015-Jun-19 1:35 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Dave Kreskowiak15-Jun-19 5:51
mveDave Kreskowiak15-Jun-19 5:51 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632018-Jun-19 5:46
Member 1370632018-Jun-19 5:46 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Dave Kreskowiak18-Jun-19 9:24
mveDave Kreskowiak18-Jun-19 9:24 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632018-Jun-19 18:17
Member 1370632018-Jun-19 18:17 
I am using Windows application Web browser control

1. in my winforms i have 9 webbrowser control each web browser control load all files
eg: image, pdf, word excel

2. now in my winforms webbrowser control loading image when i drag and drop image in webbrowser1 the image size is not expand to webbrowser control window. i write this code for image expand to webbrowser control.

private void webbrowser1_DocumentCompleted(object sender,WebbrowserDocumentCompletedEventArgs e)
{
var img = webBrowser1.Document.GetElementsByTagName("img").Cast<htmlelement>().FirstOrDefault();
var w = img.ClientRectangle.Width;
var h = img.ClientRectangle.Height;
img.Style = string.Format("{0}: 100%", w > h ? "Width" : "Height");
}
after this code is expanding image in webbrowser1 control and preview full screen.
now i am trying to load pdf in Webbrowser1 show error
Object reference not set to an instance of an object.
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Dave Kreskowiak19-Jun-19 2:59
mveDave Kreskowiak19-Jun-19 2:59 
AnswerRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Eddy Vluggen15-Jun-19 1:32
professionalEddy Vluggen15-Jun-19 1:32 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632015-Jun-19 2:33
Member 1370632015-Jun-19 2:33 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Eddy Vluggen15-Jun-19 2:48
professionalEddy Vluggen15-Jun-19 2:48 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632015-Jun-19 3:20
Member 1370632015-Jun-19 3:20 
QuestionCatching exceptions in fire&forget tasks Pin
Bernhard Hiller14-Jun-19 2:58
Bernhard Hiller14-Jun-19 2:58 
AnswerRe: Catching exceptions in fire&forget tasks Pin
BillWoodruff14-Jun-19 11:58
professionalBillWoodruff14-Jun-19 11:58 
AnswerRe: Catching exceptions in fire&forget tasks Pin
Eddy Vluggen14-Jun-19 13:37
professionalEddy Vluggen14-Jun-19 13:37 
GeneralRe: Catching exceptions in fire&forget tasks Pin
Bernhard Hiller16-Jun-19 20:49
Bernhard Hiller16-Jun-19 20:49 
QuestionRe: Catching exceptions in fire&forget tasks Pin
Eddy Vluggen16-Jun-19 22:45
professionalEddy Vluggen16-Jun-19 22:45 
AnswerRe: Catching exceptions in fire&forget tasks Pin
Gerry Schmitz14-Jun-19 20:59
mveGerry Schmitz14-Jun-19 20:59 
GeneralRe: Catching exceptions in fire&forget tasks Pin
Bernhard Hiller16-Jun-19 20:53
Bernhard Hiller16-Jun-19 20:53 
AnswerRe: Catching exceptions in fire&forget tasks Pin
jschell15-Jun-19 3:56
jschell15-Jun-19 3:56 
GeneralRe: Catching exceptions in fire&forget tasks Pin
Bernhard Hiller16-Jun-19 20:59
Bernhard Hiller16-Jun-19 20:59 
GeneralRe: Catching exceptions in fire&forget tasks Pin
jschell23-Jun-19 5:42
jschell23-Jun-19 5:42 
Questionsome bugs don't retire Pin
BillWoodruff12-Jun-19 13:40
professionalBillWoodruff12-Jun-19 13:40 
AnswerRe: some bugs don't retire Pin
Dave Kreskowiak12-Jun-19 14:52
mveDave Kreskowiak12-Jun-19 14:52 

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.