[英]How to make Google authentication page fit in my webbrowser control?
Windows.Forms.Webbrowser以顯示Google身份驗證屏幕。 Webbrowser控件在尺寸為450x480 pxl的窗口中,並且它會填充整個窗口。 我正在打電話:
String UrlString = String.Format(
@"https://accounts.google.com/o/oauth2/auth?"+
@"display=popup" +
@"&scope=email profile" +
@"&redirect_uri=urn:ietf:wg:oauth:2.0:oob:auto" +
@"&response_type=code"+
@"&client_id=xxxx
);
_webBrowser.Navigate(UrlString);
對於Webbrowser控件,我得到的頁面太大,因此它放置了水平和垂直滾動條。 當我在Facebook身份驗證頁面中使用“ display = popup”時,它呈現為無滾動條。 是否可以讓Google身份驗證頁面適合我的Web瀏覽器控件?
在文檔加載完成事件中,您可以調用一個eval javascript代碼,該代碼返回頁面的高度和寬度。 在此,您可以根據此值設置控件的寬度和高度。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.