Click here to Skip to main content
16,006,768 members
Home / Discussions / C#
   

C#

 
AnswerRe: visual source safe v8.0 : how to see undo checkouts? Pin
Abhijit Jana25-Jun-08 19:14
professionalAbhijit Jana25-Jun-08 19:14 
Questionhow to send PJL command to USB connected printer ? Pin
$unil Dhiman25-Jun-08 16:54
$unil Dhiman25-Jun-08 16:54 
AnswerRe: how to send PJL command to USB connected printer ? Pin
Bert delaVega25-Jun-08 17:54
Bert delaVega25-Jun-08 17:54 
GeneralRe: how to send PJL command to USB connected printer ? Pin
$unil Dhiman25-Jun-08 18:58
$unil Dhiman25-Jun-08 18:58 
Questionvb code conversion to c#.... Pin
moomoooomoo25-Jun-08 16:39
moomoooomoo25-Jun-08 16:39 
AnswerRe: vb code conversion to c#.... Pin
Lilupa25-Jun-08 18:02
Lilupa25-Jun-08 18:02 
AnswerRe: vb code conversion to c#.... Pin
Jasmine250125-Jun-08 18:08
Jasmine250125-Jun-08 18:08 
QuestionTimer control freezing the UI Pin
steve_rm25-Jun-08 16:32
steve_rm25-Jun-08 16:32 
Hello,

CF 3.5 VS 2008

I have a timer control that is being used to do some work. Code below. The timer interval is set for 1 second. However, when the timer is running the UI freezes for a short period.

I understand that the timer control is uses the UI thread, but I didn't think the amount of work was too much to make the UI freeze for short periods.

I couldn't see any server timers for the compact framework.

Any suggestions would be most helpful.

<br />
//Get the signal strength of the AP that the adapter is currently connected to<br />
        private void GetSignalStrength()<br />
        {<br />
            try<br />
            {<br />
                //Loop through all the AP nearby and find the one that is currently being connected (Associated)<br />
                if (currentAdapter.NearbyAccessPoints.Count > 0)<br />
                {                 <br />
                    foreach (AccessPoint ap in currentAdapter.NearbyAccessPoints)<br />
                    {<br />
                        if (ap.Name == currentAdapter.AssociatedAccessPoint)<br />
                        {<br />
                           this.DisplaySignalStrength(ap.SignalStrength.ToString());<br />
                           //Break out of for loop when the currently connected AP has been found.<br />
                           break;<br />
                        }<br />
                    }<br />
                }<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show(ex.Message);<br />
            }<br />
        }<br />
<br />
        //Display the signal strength by filling the bars depending on<br />
        //the strength of the access point.<br />
        private void DisplaySignalStrength(string strength)<br />
        {<br />
            this.pbExcellent.BackColor = Color.Transparent;<br />
            this.pbVeryGood.BackColor = Color.Transparent;<br />
            this.pbGood.BackColor = Color.Transparent;<br />
            this.pbLow.BackColor = Color.Transparent;<br />
            this.pbVeryLow.BackColor = Color.Transparent;<br />
<br />
            switch (strength)<br />
            {<br />
                case "Excellent":<br />
                    this.pbExcellent.BackColor = Color.Green;<br />
                    this.pbVeryGood.BackColor = Color.Green;<br />
                    this.pbGood.BackColor = Color.Green;<br />
                    this.pbLow.BackColor = Color.Green;<br />
                    this.pbVeryLow.BackColor = Color.Green;<br />
                    break;<br />
                case "Very Good":<br />
                    this.pbVeryGood.BackColor = Color.Green;<br />
                    this.pbGood.BackColor = Color.Green;<br />
                    this.pbLow.BackColor = Color.Green;<br />
                    this.pbVeryLow.BackColor = Color.Green;<br />
                    break;<br />
                case "Good":<br />
                    this.pbGood.BackColor = Color.Green;<br />
                    this.pbLow.BackColor = Color.Green;<br />
                    this.pbVeryLow.BackColor = Color.Green;<br />
                    break;<br />
                case "Low":<br />
                    this.pbLow.BackColor = Color.Green;<br />
                    this.pbVeryLow.BackColor = Color.Green;<br />
                    break;<br />
                case "Very Low":<br />
                    this.pbVeryLow.BackColor = Color.Green;<br />
                    break;<br />
                default:<br />
                    break;<br />
            }<br />
        }<br />
<br />
        //Check the signal strength every 1 second<br />
        private void tmrPollAP_Tick(object sender, EventArgs e)<br />
        {<br />
            this.GetSignalStrength();   <br />
        }<br />

AnswerRe: Timer control freezing the UI Pin
AB777125-Jun-08 17:43
AB777125-Jun-08 17:43 
GeneralRe: Timer control freezing the UI Pin
Abydosgater25-Jun-08 17:48
Abydosgater25-Jun-08 17:48 
QuestionRe: Timer control freezing the UI Pin
steve_rm25-Jun-08 19:17
steve_rm25-Jun-08 19:17 
AnswerRe: Timer control freezing the UI Pin
Mbah Dhaim25-Jun-08 23:37
Mbah Dhaim25-Jun-08 23:37 
QuestionUpdater/Downloader Not Work Online? Pin
Abydosgater25-Jun-08 16:07
Abydosgater25-Jun-08 16:07 
AnswerRe: Updater/Downloader Not Work Online? Pin
leppie25-Jun-08 21:25
leppie25-Jun-08 21:25 
GeneralRe: Updater/Downloader Not Work Online? Pin
Abydosgater26-Jun-08 3:46
Abydosgater26-Jun-08 3:46 
QuestionDifferent between component and user control Pin
cocoonwls25-Jun-08 15:25
cocoonwls25-Jun-08 15:25 
AnswerRe: Different between component and user control Pin
Christian Graus25-Jun-08 15:37
protectorChristian Graus25-Jun-08 15:37 
GeneralRe: Different between component and user control Pin
cocoonwls25-Jun-08 15:40
cocoonwls25-Jun-08 15:40 
GeneralRe: Different between component and user control Pin
MarkB77725-Jun-08 17:58
MarkB77725-Jun-08 17:58 
GeneralRe: Different between component and user control Pin
Christian Graus25-Jun-08 18:07
protectorChristian Graus25-Jun-08 18:07 
GeneralRe: Different between component and user control Pin
MarkB77725-Jun-08 18:37
MarkB77725-Jun-08 18:37 
AnswerRe: Different between component and user control Pin
DaveyM6925-Jun-08 22:16
professionalDaveyM6925-Jun-08 22:16 
QuestionHow can we enable <b>CTRL+A</b> on textBox in C# form ? Pin
Mohammad Dayyan25-Jun-08 11:36
Mohammad Dayyan25-Jun-08 11:36 
AnswerRe: How can we enable CTRL+A on textBox in C# form ? Pin
DaveyM6925-Jun-08 13:18
professionalDaveyM6925-Jun-08 13:18 
GeneralRe: How can we enable CTRL+A on textBox in C# form ? Pin
Mohammad Dayyan25-Jun-08 21:41
Mohammad Dayyan25-Jun-08 21:41 

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.