0 votes

I've found a solution for WebBrowserControl but MailBrowserControl doesn't have method ExecWB. So please advise. Thanks

by (220 points)
retagged by

1 Answer

+1 vote

MailBrowserControl inherits WebBrowserControl so you can use ExecWB on WebBrowserControl you can use it on MailBrowserControl

dynamic activeXInstance = mailBrowser.ActiveXInstance;
activeXInstance.ExecWB(
    Exec.OLECMDID_OPTICAL_ZOOM, 
    ExecOpt.OLECMDEXECOPT_DONTPROMPTUSER, 
    150, 
    IntPtr.Zero);

public enum Exec
{
    OLECMDID_OPTICAL_ZOOM = 63
}

public enum ExecOpt 
{
    OLECMDEXECOPT_DODEFAULT = 0,
    OLECMDEXECOPT_PROMPTUSER = 1,
    OLECMDEXECOPT_DONTPROMPTUSER = 2,
    OLECMDEXECOPT_SHOWHELP = 3,
}
by (301k points)
...