Originally posted by TheBigYinJames
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: .Net click through forms
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on ".Net click through forms"
Collapse
-
-
Originally posted by TimberWolf View PostOr to save using a timer, store the system time at form load and if the new form's button is clicked less than 200ms or so after form load, ignore it. 3 lines of code I expect.
Leave a comment:
-
Originally posted by ASB View PostI doubt there is any difference in efficiency between datetime.now.subtract and using a stopwatch.
I liked the modal dialogue suggestion.
And all because the lady loves Milk Tray.
Leave a comment:
-
Originally posted by TheBigYinJames View PostCan't remember off the top of my head what the resolution of DateTime is, in earlier .Net it was as large as 500ms. Stopwatch will use high def if it's available.
https://connect.microsoft.com/Visual...?wa=wsignin1.0
Internally the stopwatch uses datetime.utcnow - which is precisely what datetime.now does.
I doubt there is any difference in efficiency between datetime.now.subtract and using a stopwatch.
Leave a comment:
-
Originally posted by TheBigYinJames View PostCan't remember off the top of my head what the resolution of DateTime is, in earlier .Net it was as large as 500ms. Stopwatch will use high def if it's available.
Leave a comment:
-
display a small modal form saying "Loading..." for about 3secs when first button is pressed.
Leave a comment:
-
Originally posted by TimberWolf View PostOr to save using a timer, store the system time at form load and if the new form's button is clicked less than 200ms or so after form load, ignore it. 3 lines of code I expect.
Leave a comment:
-
Or to save using a timer, store the system time at form load and if the new form's button is clicked less than 200ms or so after form load, ignore it. 3 lines of code I expect.
Leave a comment:
-
Xog,
Firstly I don't think it's a double click, otherwise the doubleclick event of the button should fire. So it's two single clicks not quick enough. The second click message is not dispatched until the click handler completes. However at this point this is just a message up the spout and the target is unknown. After the click event completes the message causes a click even on the second form because this is what is valid at that screen location at the time of dispatch.
The basic problem you have is that you don't want to respond to the second click until you are in a known state and that is after all message pumping.
If you make sure buttons on the form as disabled at load time and then enable them in the show event the second form is fine. Unfortunately this means the click will go to the first form which may be unhelpful........
TheBigYinJames solution is probably the pragmatic one.
However you could use a custom windows message and override the message queue - but this seems like a lot of faffing about.
Leave a comment:
-
Not practical to change forms as both have numerous "buttons", actually labels forming hot spots on a picture. Too restricting to avoid any coincidence of positions. Is the two shown at top here:
http://www.gatekeeperel.co.uk/animalsuk.html
Leave a comment:
-
Originally posted by Scrag Meister View PostDoes sound like a user education issue though.
Can you not just alter the part of the screen it appears on? Or is this a full screen thing. Hard to say without seeing it but i'd look to re-do the layout of the child form before fudging with timers/fade-ins etc.
Leave a comment:
-
Is the Double click event being triggered?
Or is it 2 slow single clicks?
Does sound like a user education issue though.Last edited by Scrag Meister; 23 March 2010, 16:47.
Leave a comment:
-
It's for kids so they probably don't just double click, they go clcik cklickety clicketyclicktey clcick clcikchchhk...
Leave a comment:
-
Originally posted by xoggoth View PostTa but not possible, there are a whole load of buttons on both forms.
What about ignoring the click of the child button for the first 500ms (rather than disabling it?
create a global System.Diagnostics.Stopwatch, start it in the form init code.
In the click handler, wrap the code in an if .ElapsedMilliseconds > 500
Leave a comment:
-
Ta but not possible, there are a whole load of buttons on both forms.
Leave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: