.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Issue with using the BackgroundWorker - frozen screen and wait cursor not displayed

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :WPF

I have 2 issues which are probably related:

1. My wait cursor does not display
2. My screen is frozen so I cannot click the "Cancel" button to stop the BackgroundWorker thread.

Here is what my code looks like, (I followed the example given at http://msdn.microsoft.com/en-us/library/cc221403(VS.95).aspx )

Class Home

   Dim bkwk As New BackgroundWorker


Public Sub New()

   bkwk.WorkerSupportsCancellation = True

   AddHandler bkwk.DoWork, AddressOf bw_DoWork
   AddHandler bkwk.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted

End Sub

Private Sub btnPreview_Click(ByVal sender As Object, ByVal e As  System.Windows.RoutedEventArgs) Handles btnPreview.Click
      If Not bkwk.IsBusy = True Then
                Cursor = Cursors.Wait
                txtStatus.Text = "Busy ..."
      End If

View Complete Post

More Related Resource Links

Issue with MSCaptcha - image is not displayed occasionally.

Hello! I am using MONDOR's MSCaptcha control in my ASP.NET 3.5 application, and everything seemed to work fine both locally and remotely, till I started receiving complains from rare users. I am using is for my web site registration, and as I see many people are able to register, I assume that the problem is rare. However, I've heard two complaints from two different users that Capthca image is not displayed at all. They did not add any special blocks to browsers, and both tried several browsers and it did not work in all of them. Is there a known issue like this? Did anybody see such a problem?   here is my code for referrence: web.config: <httpHandlers> < add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/><httpHandlers>   On the page   <%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %>    The control itself:   <cc1:captchacontrol id="ccJoin" runat="server" captchabackgroundnoise="Low" captchaheight="60" captchalength="6" captchalinenoise="None" captchamaxtimeout="240" captchamintimeout="6"  captchawidth="200" />       Thanks!

Showing thousands of rows in datagrid, need cursor to wait while loading rows

I´m creating DataGrid columns dynamicly in C# and loading data into a list at the same time. Cursor is waiting at the same time. Now, after columns are created and data is loaded into a list. I set the myDataGrid.Itemssouce = mylist; Cursor=Curosrs.Arrow; Andafter that, I set the Cursor to arrow again as you can see. But when the list contains thousands of rows it takes about 5-10 seconds for the datagrid to show the rows. Its ok but I need the cursor to be in waiting stage allso while data is not shown but the cursor is not waiting, its arrow. Any suggestions, please?

Screen resolution issue in MOSS 2007



I have designed the SharePoint landing page with screen resolution of 1024x768. The layout is desined with 3 column. The header images are designed for fixed size for the above resolution only.
It looks good for the users having 1024x768 screen resol. But for few users who have bigger resolution like 1280x720 & wider screens, the header images still shows the same size and thus the body (three column layout) expanded. As a result there is an empty space in the right side of the header.

Is there anyway to get the screen to resize automaticlly for all the users?  


Cursor issue



What is the utility of the cursor in the SQL operation. I mean what is the advantage that cursor offers

Thank you

The complexity resides in the simplicity

Bulk editing issue - list cannot be displayed in Datasheet view



On a sharepoint page i click on 'Actions' tab then select 'Edit in Datasheet'  and i see the following error message


"The list cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled. "


I am using XP professional, IE 6.02 to access the sharepoint site.


I was hoping that the hot fix KB938888 would fix that issue, but it did not. bulk editing is a nice feature that i would like to use but i have never been able to. The link to export data to Excel works fine.


if anyone has suggestions, thanks in advance


flash animation renders screen black until cursor rolls over



New to SP, using 2007.

I have linked a flash (CS5 AS 2.0) file into a sharepoint page = Page Viewer Web Part. In the Document Libraries>Pages folder I have both the flash .html and the .swf files. I can click on either of these files in the Pages folder and they play normally.

BUT, when this flash file loads into the page viewer web part it does not automatically play; it starts with a black screen and does not play until I roll the mouse over it. This is not the case outside of SP. The file starts automatically, no black screen.

I read that SP strips the <object & script> tags? Is this the problem? Do I replace them using dreamweaver...what does that look like? Or should I be using a different kind of page to play a flash file instead of Page Viewer Web Part? Or is the problem something else completely??

I'm sorry if this info is posted elsewhere; please point me in the right direction.

Much Thanks!!

Snap It! - How to take screen shot using .Net

We all would have used snap shots (screen shots) to illustrate bugs or behavior or something that others could understand by seeing them. For taking snap shots we just hit the "Print Screen" key and copy it to Ms Paint and save it. Ever wondered how to programmatically take a snap shot? Then this article is for you.

Cursor Functions

A cursor allows looping through a record set and performing a certain operation on each record within the set. SQL Server supports three functions that can help you while working with cursors: @@FETCH_STATUS, @@CURSOR_ROWS and CURSOR_STATUS. Cursor functions are non-deterministic.


Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. DECLARE CURSOR accepts both a syntax based on the ISO standard and a syntax using a set of Transact-SQL extensions.

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

Setting Screen Resolution



  I am developing a website in asp.net.How can i make my web pages view same in different screen resolutions.I am using 1024*768 resolution

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend