Click here to Skip to main content
16,005,178 members
Home / Discussions / C#
   

C#

 
GeneralRe: structure Pin
Christian Graus30-Mar-05 15:04
protectorChristian Graus30-Mar-05 15:04 
GeneralRe: structure Pin
Sebastian Schneider30-Mar-05 21:10
Sebastian Schneider30-Mar-05 21:10 
GeneralRe: structure Pin
Mathew Hall31-Mar-05 3:26
Mathew Hall31-Mar-05 3:26 
GeneralLocating and Extracting VS.Net Icons for Pluggin use Pin
Tristan Rhodes30-Mar-05 12:56
Tristan Rhodes30-Mar-05 12:56 
GeneralRe: Locating and Extracting VS.Net Icons for Pluggin use Pin
Syed Abdul Khader30-Mar-05 21:39
Syed Abdul Khader30-Mar-05 21:39 
GeneralInherited windows forms control...which event... Pin
Member 9630-Mar-05 12:45
Member 9630-Mar-05 12:45 
GeneralRe: Inherited windows forms control...which event... Pin
Member 9631-Mar-05 8:40
Member 9631-Mar-05 8:40 
GeneralCursors and threads Pin
PaleyX30-Mar-05 12:00
PaleyX30-Mar-05 12:00 
In my main App I run a long running process on a seperate thread so as not to tie up the GUI - while the process is running I want to set the Cursor to the WaitCursor. The first thing the long running process does it fire an event which is handled on the GU thread and sets the cursor to the WaitCursor then when the process has finished it fires another event which is again handled on the GUI thread and sets the Cursor to default - however, the cursor never actually changes to the WaitCursor

The long running process fires off an event every 1000 records or so which is handled on the GU thread thus:

<br />
    Private Delegate Sub xxxDelegate(ByVal sender As Object, ByVal e As xxxEventArgs)<br />
<br />
    Private Sub xxx(ByVal sender As Object, ByVal e As xxxEventArgs) Handles LongProcess.xxx<br />
<br />
        If button.InvokeRequired = False Then<br />
           Console.WriteLine("A - " & Cursor.Current.ToString())<br />
            ...<br />
        Else<br />
            Console.WriteLine("B - " & Cursor.Current.ToString())<br />
            Dim del As New xxxDelegate(AddressOf xxx)<br />
            Me.BeginInvoke(del, New Object() {sender, e})<br />
        End If<br />
    End Sub<br />


When run the following is written to the console:

B - [Cursor: WaitCursor]
A - [Cursor: Default]
B - [Cursor: WaitCursor]
A - [Cursor: Default]
B - [Cursor: WaitCursor]
A - [Cursor: Default]
...

Why is this?
GeneralRe: Cursors and threads Pin
Pyro Joe30-Mar-05 12:22
Pyro Joe30-Mar-05 12:22 
GeneralRe: Cursors and threads Pin
PaleyX30-Mar-05 12:26
PaleyX30-Mar-05 12:26 
Generalreplacement regular expression Pin
Pyro Joe30-Mar-05 11:57
Pyro Joe30-Mar-05 11:57 
GeneralRe: replacement regular expression Pin
Christian Graus30-Mar-05 12:08
protectorChristian Graus30-Mar-05 12:08 
GeneralRe: replacement regular expression Pin
Pyro Joe30-Mar-05 12:18
Pyro Joe30-Mar-05 12:18 
GeneralRe: replacement regular expression Pin
Christian Graus30-Mar-05 12:24
protectorChristian Graus30-Mar-05 12:24 
GeneralRe: replacement regular expression Pin
Dave Kreskowiak30-Mar-05 16:09
mveDave Kreskowiak30-Mar-05 16:09 
GeneralRe: replacement regular expression Pin
Pyro Joe30-Mar-05 16:34
Pyro Joe30-Mar-05 16:34 
GeneralRe: replacement regular expression Pin
Yulianto.30-Mar-05 18:25
Yulianto.30-Mar-05 18:25 
GeneralRe: replacement regular expression Pin
mav.northwind31-Mar-05 0:17
mav.northwind31-Mar-05 0:17 
GeneralRe: replacement regular expression Pin
Dave Kreskowiak31-Mar-05 2:02
mveDave Kreskowiak31-Mar-05 2:02 
GeneralRe: replacement regular expression Pin
Pyro Joe31-Mar-05 3:17
Pyro Joe31-Mar-05 3:17 
GeneralExtract 48x48 size icon using SHGetFileInfo Pin
Milan200730-Mar-05 11:30
Milan200730-Mar-05 11:30 
GeneralRe: Extract 48x48 size icon using SHGetFileInfo Pin
JockerSoft31-Mar-05 4:04
JockerSoft31-Mar-05 4:04 
GeneralRe: Extract 48x48 size icon using SHGetFileInfo Pin
Milan200731-Mar-05 13:54
Milan200731-Mar-05 13:54 
Generalneed some help Pin
Petdav30-Mar-05 10:54
Petdav30-Mar-05 10:54 
GeneralRe: need some help Pin
Christian Graus30-Mar-05 12:10
protectorChristian Graus30-Mar-05 12:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.