Click here to Skip to main content
16,011,949 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionClose 'alert' windows in webbrowser control Pin
Member 377616228-Sep-08 0:37
Member 377616228-Sep-08 0:37 
QuestionTimer_Tick event not called Pin
Sonhospa28-Sep-08 0:30
Sonhospa28-Sep-08 0:30 
AnswerRe: Timer_Tick event not called Pin
Wendelius28-Sep-08 4:40
mentorWendelius28-Sep-08 4:40 
QuestionRe: Timer_Tick event not called Pin
Sonhospa28-Sep-08 5:10
Sonhospa28-Sep-08 5:10 
AnswerRe: Timer_Tick event not called Pin
Wendelius28-Sep-08 5:34
mentorWendelius28-Sep-08 5:34 
QuestionRe: Timer_Tick event not called Pin
Sonhospa28-Sep-08 5:49
Sonhospa28-Sep-08 5:49 
AnswerRe: Timer_Tick event not called Pin
Wendelius29-Sep-08 3:31
mentorWendelius29-Sep-08 3:31 
NewsRe: Timer_Tick event not called Pin
Sonhospa29-Sep-08 3:58
Sonhospa29-Sep-08 3:58 
Hi Mika,

thanks for still taking care.
Mika Wendelius wrote:
The need to optimize rises from a bad design

I have to admit that being a newbie I seem to fall into almost every bad design trap I can find Sigh | :sigh:
What I did meanwhile is that I eliminated Mad | :mad: the timer as well as the Backgroundworker. Instead of that, the looping function (which used to be in the background worker) calculates the time elapsed within every loop and updates my lblTimer label. This way might not be elegant (and I still didn't learn how to use the Timer right) but it works Shucks | :-\ for my small purpose and I see how much time the function needed.
Mika Wendelius wrote:
However, it's possible that you are blocking the whole UI thread (I take it that the timer is in main UI thread) and in that case the tick won't occur. If that's true your UI should also be non-responding.

I had started the timer in the main UI thread of a form, in which (I guess) also the Timer_Tick event runs (I placed the component in the form). The update of the lblTimer label was supposed to come from the Timer_Tick event (after starting / before ending the timer) every second and independently from the looping stuff done in the backgroundworker (that was the idea). Other controls (a progressbar and another label), which are updated in the backgroundworkers ProcessChanged event, do update with every loop!

Do you think it's possible that the BW takes so much of the processor time that it doesn't leave any for the main thread? Somehow that doesn't make sense for a backgroundworker, does it?
GeneralRe: Timer_Tick event not called Pin
Wendelius29-Sep-08 4:19
mentorWendelius29-Sep-08 4:19 
GeneralRe: Timer_Tick event not called Pin
Sonhospa29-Sep-08 5:03
Sonhospa29-Sep-08 5:03 
GeneralRe: Timer_Tick event not called Pin
Wendelius29-Sep-08 5:56
mentorWendelius29-Sep-08 5:56 
GeneralRe: Timer_Tick event not called Pin
Sonhospa29-Sep-08 6:17
Sonhospa29-Sep-08 6:17 
GeneralRe: Timer_Tick event not called Pin
Wendelius29-Sep-08 6:24
mentorWendelius29-Sep-08 6:24 
GeneralRe: Timer_Tick event not called Pin
Jon_Boy29-Sep-08 7:57
Jon_Boy29-Sep-08 7:57 
JokeRe: Timer_Tick event not called Pin
Sonhospa29-Sep-08 11:25
Sonhospa29-Sep-08 11:25 
QuestionPrint the values in Crystel Reports Pin
vidhish27-Sep-08 22:11
vidhish27-Sep-08 22:11 
AnswerRe: Print the values in Crystel Reports Pin
Mycroft Holmes28-Sep-08 16:31
professionalMycroft Holmes28-Sep-08 16:31 
QuestionHEEELP: Regular Expressions Pin
Sonhospa27-Sep-08 3:20
Sonhospa27-Sep-08 3:20 
AnswerRe: HEEELP: Regular Expressions Pin
Sonhospa27-Sep-08 11:12
Sonhospa27-Sep-08 11:12 
GeneralRe: HEEELP: Regular Expressions Pin
Paul Conrad27-Sep-08 11:18
professionalPaul Conrad27-Sep-08 11:18 
GeneralRe: HEEELP: Regular Expressions Pin
Sonhospa27-Sep-08 12:11
Sonhospa27-Sep-08 12:11 
GeneralRe: HEEELP: Regular Expressions Pin
Paul Conrad27-Sep-08 14:11
professionalPaul Conrad27-Sep-08 14:11 
QuestionIcomparer property Pin
member2727-Sep-08 2:03
member2727-Sep-08 2:03 
AnswerRe: Icomparer property Pin
Dave Kreskowiak27-Sep-08 3:16
mveDave Kreskowiak27-Sep-08 3:16 
QuestionHow to Hide Process from Task Manager. Pin
Anubhava Dimri27-Sep-08 0:17
Anubhava Dimri27-Sep-08 0:17 

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.