Click here to Skip to main content
15,887,302 members
Home / Discussions / C#
   

C#

 
QuestionBreak a Method??? Pin
S K Y6-Apr-09 15:41
S K Y6-Apr-09 15:41 
AnswerRe: Break a Method??? Pin
N a v a n e e t h6-Apr-09 15:45
N a v a n e e t h6-Apr-09 15:45 
GeneralRe: Break a Method??? Pin
S K Y6-Apr-09 16:30
S K Y6-Apr-09 16:30 
GeneralRe: Break a Method??? Pin
N a v a n e e t h6-Apr-09 16:43
N a v a n e e t h6-Apr-09 16:43 
QuestionProblem with the ListView control [modified] Pin
Ankit Rajpoot6-Apr-09 14:55
Ankit Rajpoot6-Apr-09 14:55 
AnswerRe: Problem with the ListView control Pin
Luc Pattyn6-Apr-09 15:20
sitebuilderLuc Pattyn6-Apr-09 15:20 
GeneralRe: Problem with the ListView control Pin
Ankit Rajpoot6-Apr-09 16:04
Ankit Rajpoot6-Apr-09 16:04 
AnswerRe: Problem with the ListView control Pin
Luc Pattyn6-Apr-09 16:35
sitebuilderLuc Pattyn6-Apr-09 16:35 
Hi,

much better now.
I still don't see what your problem #2 is, you say it works??

I do have 3 comments:

1. assuming lViewSResultsBrowser is a ListView, you are not allowed to perform a Groups.Add() operation (or any other Control operation) on it since Controls are not thread-safe. Without an InvokeRequired/Invoke construct it may hang your GUI temporarily or forever.

2. IMO all that is required for the cancellation is a simple
if (bgDatabaseSearcher.CancellationPending) break;
since that will bring you in the finally block, hence close the connection and return.

3. I don't particularly like the loop while (bgDatabaseSearcher.IsBusy) Thread.Sleep(500); since it makes your GUI hang for as long as the BGW takes; you have made your GUI thread a slave of your background worker now, so if the BGW never terminates, your app is stuck while the user wanted it to exit. The minimum I would do is impose an upper limit.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: Problem with the ListView control Pin
Ankit Rajpoot6-Apr-09 17:28
Ankit Rajpoot6-Apr-09 17:28 
GeneralRe: Problem with the ListView control Pin
Luc Pattyn6-Apr-09 17:47
sitebuilderLuc Pattyn6-Apr-09 17:47 
GeneralRe: Problem with the ListView control Pin
Ankit Rajpoot7-Apr-09 2:44
Ankit Rajpoot7-Apr-09 2:44 
QuestionWebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
abiemann6-Apr-09 13:36
abiemann6-Apr-09 13:36 
AnswerRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
N a v a n e e t h6-Apr-09 15:51
N a v a n e e t h6-Apr-09 15:51 
GeneralRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
abiemann9-Apr-09 8:50
abiemann9-Apr-09 8:50 
GeneralRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
abiemann9-Apr-09 9:12
abiemann9-Apr-09 9:12 
GeneralRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required PinPopular
abiemann10-Apr-09 13:58
abiemann10-Apr-09 13:58 
GeneralRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
ishant78907-Jul-10 20:35
ishant78907-Jul-10 20:35 
GeneralRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
eeidfn4-Oct-10 8:56
eeidfn4-Oct-10 8:56 
AnswerRe: WebRequest.GetResponse() = error (407) Proxy Authentication Required Pin
ebjean22-Jul-10 2:34
ebjean22-Jul-10 2:34 
QuestionOPC communication in c# Pin
AlessandroOPC6-Apr-09 11:29
AlessandroOPC6-Apr-09 11:29 
QuestionSystem.ArgumentException: The value of DatagridviewComboboxCell is invalid Pin
Priya Prk6-Apr-09 9:41
Priya Prk6-Apr-09 9:41 
QuestionNeed help with binding source Pin
faizych6-Apr-09 9:09
faizych6-Apr-09 9:09 
AnswerRe: Need help with binding source Pin
Henry Minute6-Apr-09 12:08
Henry Minute6-Apr-09 12:08 
GeneralRe: Need help with binding source Pin
faizych6-Apr-09 12:34
faizych6-Apr-09 12:34 
GeneralRe: Need help with binding source Pin
Henry Minute7-Apr-09 1:58
Henry Minute7-Apr-09 1:58 

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.