问题描述
我正试图在手机上的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?
推荐答案
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中的图像被截断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!