Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
GeneralRe: hourglass mouse still clicking Pin
lushgrass6-Jul-06 22:24
lushgrass6-Jul-06 22:24 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi6-Jul-06 22:58
Nader Elshehabi6-Jul-06 22:58 
GeneralRe: hourglass mouse still clicking Pin
lushgrass6-Jul-06 23:21
lushgrass6-Jul-06 23:21 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi7-Jul-06 2:46
Nader Elshehabi7-Jul-06 2:46 
GeneralRe: hourglass mouse still clicking [modified] Pin
lushgrass9-Jul-06 16:59
lushgrass9-Jul-06 16:59 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi9-Jul-06 20:49
Nader Elshehabi9-Jul-06 20:49 
GeneralRe: hourglass mouse still clicking Pin
lushgrass9-Jul-06 23:26
lushgrass9-Jul-06 23:26 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi9-Jul-06 23:40
Nader Elshehabi9-Jul-06 23:40 
Hello

Well, something like that. Yet there are two modifications

public class Form1
{
    private StatusBar status;
    private bool busy;
    private Control control;
    
    public Form1()
    {
        //status.Capture = true;    1)Don't put this or you'll lose capture to the status bar. Whyis that?
        busy = false;
        control = new Control();
        control.Capture = false;
        control.LostFocus += new EventHandler(control_LostFocus);
    }

    private void control_LostFocus()
    {
        if(busy)
            control.Capture = true;
    }

    private void Search()
    {
        status.Text = "Searching";
        busy = true;
        control.Capture = true;
    
        // search code here
    
        busy = false;    //2)This must be before changing the capture to false
        control.Capture = false;
        status.Text = "";
    }
}


NB.
Next time use the "pre" instead of "code" formatting

RegardsRose | [Rose]
GeneralRe: hourglass mouse still clicking Pin
lushgrass9-Jul-06 23:48
lushgrass9-Jul-06 23:48 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi10-Jul-06 1:42
Nader Elshehabi10-Jul-06 1:42 
GeneralRe: hourglass mouse still clicking [modified] Pin
lushgrass12-Jul-06 16:22
lushgrass12-Jul-06 16:22 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi12-Jul-06 22:43
Nader Elshehabi12-Jul-06 22:43 
GeneralRe: hourglass mouse still clicking [modified] Pin
lushgrass13-Jul-06 0:51
lushgrass13-Jul-06 0:51 
AnswerRe: hourglass mouse still clicking [modified] Pin
Nader Elshehabi13-Jul-06 3:08
Nader Elshehabi13-Jul-06 3:08 
GeneralRe: hourglass mouse still clicking Pin
lushgrass13-Jul-06 4:02
lushgrass13-Jul-06 4:02 
GeneralRe: hourglass mouse still clicking Pin
Nader Elshehabi13-Jul-06 10:45
Nader Elshehabi13-Jul-06 10:45 
GeneralRe: hourglass mouse still clicking Pin
lushgrass13-Jul-06 23:44
lushgrass13-Jul-06 23:44 
QuestionRe: hourglass mouse still clicking [modified] Pin
lushgrass16-Jul-06 21:24
lushgrass16-Jul-06 21:24 
AnswerRe: hourglass mouse still clicking Pin
Nader Elshehabi19-Jul-06 21:14
Nader Elshehabi19-Jul-06 21:14 
QuestionDetecting CTL+M Pin
picasso26-Jul-06 19:09
picasso26-Jul-06 19:09 
AnswerRe: Detecting CTL+M Pin
stancrm6-Jul-06 20:17
stancrm6-Jul-06 20:17 
QuestionHow can I populate a treeView from a database? Pin
AngryC6-Jul-06 18:59
AngryC6-Jul-06 18:59 
AnswerRe: How can I populate a treeView from a database? Pin
Nader Elshehabi6-Jul-06 21:41
Nader Elshehabi6-Jul-06 21:41 
QuestionGraphics Display Pin
ah_jiang_96-Jul-06 15:30
ah_jiang_96-Jul-06 15:30 
AnswerRe: Graphics Display Pin
Nader Elshehabi6-Jul-06 21:08
Nader Elshehabi6-Jul-06 21:08 

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.