這是我的自定義WebBrowser control
。如何更改自定義控件中的光標?
using System;
using System.Text.RegularExpressions;
using System.Windows.Forms;
public class RunescapeClient : WebBrowser
{
private const string RUNESCAPE_CLIENT_URL = "http://oldschool33.runescape.com/j1";
public RunescapeClient()
{
ScrollBarsEnabled = false;
ScriptErrorsSuppressed = true;
IsWebBrowserContextMenuEnabled = false;
AllowWebBrowserDrop = false;
Navigate(RUNESCAPE_CLIENT_URL);
}
protected override void OnDocumentCompleted(WebBrowserDocumentCompletedEventArgs e)
{
if (Document != null && ValidClientUrl(e.Url.ToString()))
{
HtmlElement tableElement = Document.GetElementsByTagName("table")[1];
tableElement.InnerText = string.Empty;
}
}
private static bool ValidClientUrl(string url)
{
return Regex.IsMatch(url, @"http://oldschool\d{1,2}.runescape.com/j1");
}
}
我怎樣才能改變cursor
此control
我embedded .ico
。我GOOGLE了一下,找不到任何東西custom controls
。
謝謝。
你的問題是要改變圖標,而不是(鼠標)-cursor? – joe 2013-04-25 06:21:23
如何將我的資源中的自定義.ICO文件替換爲DEFAULT遊標,因爲WebBrowser控件只有默認圖標可用。 – Andrew 2013-04-25 06:28:04