WebBrowser中的图像被截断 [英] Images cut off in WebBrowser

查看:72
本文介绍了WebBrowser中的图像被截断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在手机上的WebBrowser中导航到以下网址。

I am trying to navigate to the following URL in a WebBrowser on my mobile phone.

http://www.aggiebus.com/M/Route.aspx? RouteID = 1

http://www.aggiebus.com/M/Route.aspx?RouteID=1

如果我在IE中这样做,则不显示完整的图像,只显示其前20%。 如果我在页面下载后单击菜单按钮,则会显示图像的其余部分。 那是为什么? 我正在尝试在.NET Compact
框架中编写WebBrowser控件,它正在做同样的事情,除了我无法获取要下载的完整图像。 似乎这是Pocket IE的一个问题。 关于如何解决这个问题的任何想法?

If I do so in I.E., it doesn't show the full image, just the first 20% of it.  If I click the menu button after the page downloads, the rest of the image shows up.  Why is that?  I am trying to code a WebBrowser control in the .NET Compact Framework, and it is doing the same thing, except I can't get the full image to download.  Seems this is an issue with Pocket IE.  Any ideas on how to get around this?

推荐答案

我有一个带有WebBrowser控件的表单,应该导航到以下网页:

I have a form with a WebBrowser control that should navigate to the following web page:

http://www.aggiebus.com/M/Route.aspx?RouteID=1

http://www.aggiebus.com/M/Route.aspx?RouteID=1

在Compact Framework webbrowser中打开它控制,图像被切断,仅显示图像的上半部分。 我无法弄清楚为什么,或如何获得完整的图像显示。 只有在浏览webbrowser控件时,我才能在浏览计算机,
或移动设备时遇到此问题。 我尝试刷新控件和表单无济于事。

When it is opened in the Compact Framework webbrowser control, the image is cut off, only showing the top half of the image.  I can not figure out why, or how to get the full image to display.  I don't get this problem when browsing on my computer, or on the mobile device, only when navigating through the webbrowser control.  I have tried refreshing the control and the form to no avail.

 

任何帮助都将不胜感激。

Any help would be appreciated.

 

以下是我的表格代码。

   公共部分类FormWebBrowser:表格

    {

        #region私人变量

        #endregion



        #region构造函数

        public FormWebBrowser(string title,string url)

        {

            InitializeComponent();

            this.Text = title;

            labelTitle.Text = title;

            webBrowser.Navigate(new Uri(url));

        }
        #endregion



        private void buttonClose_Click(object sender,EventArgs e)

        {

            this.Close();

        }
    }

    public partial class FormWebBrowser : Form
    {
        #region Private Variables
        #endregion

        #region Constructor
        public FormWebBrowser(string title, string url)
        {
            InitializeComponent();
            this.Text = title;
            labelTitle.Text = title;
            webBrowser.Navigate(new Uri(url));
        }
        #endregion

        private void buttonClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }

 

以下是我的表单:

      ;        private void buttonMap_Click(object sender,EventArgs e)

            {

               使用(FormWebBrowser frm = new FormWebBrowser(" Test Map"," http://www.aggiebus.com/M/Route.aspx?RouteID = 1")))
                 {

                    frm.ShowDialog();&
                }
            }

            private void buttonMap_Click(object sender, EventArgs e)
            {
                using (FormWebBrowser frm = new FormWebBrowser("Test Map", "http://www.aggiebus.com/M/Route.aspx?RouteID=1"))
                {
                    frm.ShowDialog();
                }
            }


这篇关于WebBrowser中的图像被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆