المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# WebBrowser control setting folder views window blank until right-click [modified]



C# Programming
11-11-2009, 11:22 AM
Good morning.

I was wondering if anyone has come across this anomoly.

I have code to populate a WebBrowser control based on the folder address (e.g. C:\). This code works well and is as follows:


private void cboFolder_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboFolder.SelectedIndex != -1)
{
Cursor.Current = Cursors.WaitCursor;
SetProgressBarMarquee();
lblLoading.Visible = true;
progressBar1.Visible = true;
Application.DoEvents();
this.viewToolStripMenuItem.Enabled = true;
cboSP_Site.SelectedIndex = -1;
cboWS.SelectedIndex = -1;
txtAddress.Text = cboFolder.SelectedValue.ToString();
WebBrowser1.Url = new Uri(cboFolder.SelectedValue.ToString());
}
}

private void WebBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
{
SetProgressBarContinuous();
lblLoading.Visible = false;
progressBar1.Visible = false;
Cursor.Current = Cursors.Default;
}


I used some code to set up the different folder views from the view menu. Everything seems to work well, but when I try to switch to details, the web browser window go blank until I right click and then it appears. Also periodically, the folder icons will not show up.

Any suggestions? Thank you, WHEELS

modified on Tuesday, November 10, 2009 8:01 AM