-
Jun 18th, 2013, 09:33 PM
#1
Thread Starter
Hyperactive Member
Button.click delay
i have this bizare issue and can't see what is causing it. on my form i have about 20 buttons with code in the click events. one particular button hangs for about 15 seconds before triggering the first line of code, note this only occurs on the first load of the form (frm.showdialog(me)) when the application is fired.
i put in some code to record time stamps in an sql table, to try and catch the code delaying it, but apparently, it is hanging on the click event and then it flicks through the code. any one seen this before ?
another question, is it possible to disable the control autoscaling when running the application in a different environment (e.g. smaller screen resolution) , options are font, dpi, inherit and none. tried all 4 of them but none seems to do the trick
Thanks
-
Jun 18th, 2013, 09:41 PM
#2
Re: Button.click delay
Firstly, please don't ask unrelated questions in the same thread. It just makes it harder for everyone. If have questions on two different topics then please create two different threads that each have a title that describes that topic.
With regards to your first question, which is the one that relates to the title of the thread and therefore the only one I will address, is the Button on the form being displayed as a dialogue or is the form being displayed as a dialogue from that Button's Click event handler? What else is on the form? Is there any data access or the like?
-
Jun 18th, 2013, 09:50 PM
#3
Thread Starter
Hyperactive Member
Re: Button.click delay
Button is on a form that is displayed as a dialog. there is another 15 buttons with no such problems, and a read only text box. No data access preceeds the click event. and it only occurs on the very first load of the parent form.
-
Jun 18th, 2013, 10:03 PM
#4
Re: Button.click delay
How are you diagnosing this? If you put a breakpoint on the first line in the button click handler, does the breakpoint get hit before the delay, or after?
My usual boring signature: Nothing
-
Jun 18th, 2013, 10:09 PM
#5
Thread Starter
Hyperactive Member
Re: Button.click delay
Originally Posted by Shaggy Hiker
How are you diagnosing this? If you put a breakpoint on the first line in the button click handler, does the breakpoint get hit before the delay, or after?
After
-
Jun 19th, 2013, 09:32 AM
#6
Re: Button.click delay
Then I've never seen this. The length of the delay suggests that an exception is being raised and caught internally. Alternatively, some rather long running process would have to be launched as a result of that button click, but no such process comes to mind, nor can I think of exactly where it would be happening for you to get results like you describe.
Is there anything different about that one button from any others, such as painting of the button, multiple handlers, or anything like that?
My usual boring signature: Nothing
-
Jun 19th, 2013, 09:57 AM
#7
Re: Button.click delay
note this only occurs on the first load of the form (frm.showdialog(me)) when the application is fired.
i put in some code to record time stamps in an sql table, to try and catch the code delaying it, but apparently, it is hanging on the click event and then it flicks through the code. any one seen this before ?
Two questions:
1) What OS are you using
2) What bit OS are you using
3) When you say 'flicks' through the code, do you mean it processes the first half and not the last portion?
Edit - Well apparently I can't count, two questions plus one.
-
Jun 19th, 2013, 10:00 AM
#8
Re: Button.click delay
Giving a bit extra, I see.
My usual boring signature: Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|