Click here to Skip to main content
15,898,847 members
Home / Discussions / C#
   

C#

 
Generaldatagridview events Pin
arkiboys17-Dec-07 3:40
arkiboys17-Dec-07 3:40 
QuestionHow to resize .tiff image Pin
sher_azam17-Dec-07 1:24
sher_azam17-Dec-07 1:24 
AnswerRe: How to resize .tiff image Pin
Pete O'Hanlon17-Dec-07 2:01
mvePete O'Hanlon17-Dec-07 2:01 
GeneralRe: How to resize .tiff image Pin
sher_azam17-Dec-07 2:18
sher_azam17-Dec-07 2:18 
GeneralRe: How to resize .tiff image Pin
Pete O'Hanlon17-Dec-07 2:26
mvePete O'Hanlon17-Dec-07 2:26 
GeneralRe: How to resize .tiff image Pin
sher_azam17-Dec-07 19:35
sher_azam17-Dec-07 19:35 
AnswerRe: How to resize .tiff image Pin
Thomas-H.26-Nov-13 1:28
Thomas-H.26-Nov-13 1:28 
GeneralIDocHostShowUI Problem - C# Webbrowser Pin
gopher_uk17-Dec-07 1:17
gopher_uk17-Dec-07 1:17 
I've been trying to implement the IDocHostShowUI interface in order to intercept requests to show dialogs and pop-ups etc.

However, my implementation is not working. The ShowMessage method does not get called. I'm navigating the browser to a page that causes pop-ups to be displayed. Here's the code i've used:



public class ExtendedWebBrowser : System.Windows.Forms.WebBrowser, IDocHostShowUI
{
#region IDocHostShowUI Members

int IDocHostShowUI.ShowMessage(IntPtr hwnd, string lpstrText,
string lpstrCaption, uint dwType,
string lpstrHelpFile, uint dwHelpContext, ref int lpResult)
{
return 1;
}

public int ShowHelp(IntPtr hwnd, string pszHelpFile, uint uCommand, uint dwData, tagPOINT ptMouse, object pDispatchObjectHit)
{
throw new Exception("The method or operation is not implemented.");
}

#endregion
}


[ComImport, ComVisible(true)]
[Guid("C4D244B0-D43E-11CF-893B-00AA00BDCE1A")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IDocHostShowUI
{
[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int ShowMessage(
IntPtr hwnd,
[MarshalAs(UnmanagedType.LPWStr)] string lpstrText,
[MarshalAs(UnmanagedType.LPWStr)] string lpstrCaption,
[MarshalAs(UnmanagedType.U4)] uint dwType,
[MarshalAs(UnmanagedType.LPWStr)] string lpstrHelpFile,
[MarshalAs(UnmanagedType.U4)] uint dwHelpContext,
[In, Out] ref int lpResult);

[return: MarshalAs(UnmanagedType.I4)]
[PreserveSig]
int ShowHelp(
IntPtr hwnd,
[MarshalAs(UnmanagedType.LPWStr)] string pszHelpFile,
[MarshalAs(UnmanagedType.U4)] uint uCommand,
[MarshalAs(UnmanagedType.U4)] uint dwData,
[In, MarshalAs(UnmanagedType.Struct)] tagPOINT ptMouse,
[Out, MarshalAs(UnmanagedType.IDispatch)] object pDispatchObjectHit);
}

I put a breakpoint on the ShowMessage method but it doesn't get called. Can anyone see what i've done wrong?

Thanks
GeneralPassword Field Pin
anupamwb17-Dec-07 0:34
anupamwb17-Dec-07 0:34 
GeneralRe: Password Field Pin
Vasudevan Deepak Kumar17-Dec-07 0:38
Vasudevan Deepak Kumar17-Dec-07 0:38 
GeneralRe: Password Field Pin
Abhijit Jana17-Dec-07 2:53
professionalAbhijit Jana17-Dec-07 2:53 
Generaldatagridview Pin
arkiboys17-Dec-07 0:32
arkiboys17-Dec-07 0:32 
GeneralMac address ......... Pin
sindhutiwari16-Dec-07 23:56
sindhutiwari16-Dec-07 23:56 
GeneralRe: Mac address ......... Pin
Vasudevan Deepak Kumar17-Dec-07 0:40
Vasudevan Deepak Kumar17-Dec-07 0:40 
GeneralRe: Mac address ......... Pin
sindhutiwari17-Dec-07 1:17
sindhutiwari17-Dec-07 1:17 
GeneralRe: Mac address ......... Pin
Colin Angus Mackay17-Dec-07 1:50
Colin Angus Mackay17-Dec-07 1:50 
GeneralRe: Mac address ......... Pin
sindhutiwari17-Dec-07 2:00
sindhutiwari17-Dec-07 2:00 
GeneralRe: Mac address ......... Pin
m@u17-Dec-07 2:24
m@u17-Dec-07 2:24 
GeneralRe: Mac address ......... [modified] Pin
DaveyM6917-Dec-07 9:32
professionalDaveyM6917-Dec-07 9:32 
Generalwriting excel cell values to generic list using c# Pin
ramyanaidu16-Dec-07 23:42
ramyanaidu16-Dec-07 23:42 
GeneralRe: writing excel cell values to generic list using c# [modified] Pin
Malcolm Smart17-Dec-07 0:21
Malcolm Smart17-Dec-07 0:21 
Generalvisual basic --> C# help needed Pin
tasumisra16-Dec-07 23:42
tasumisra16-Dec-07 23:42 
GeneralRe: visual basic --> C# help needed Pin
Malcolm Smart17-Dec-07 0:18
Malcolm Smart17-Dec-07 0:18 
JokeRe: visual basic --> C# help needed Pin
tasumisra17-Dec-07 0:23
tasumisra17-Dec-07 0:23 
GeneralRe: visual basic --> C# help needed Pin
Malcolm Smart17-Dec-07 0:36
Malcolm Smart17-Dec-07 0:36 

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.