15,884,099 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Lockwood (Top 14 by date)
Lockwood
15-Dec-17 11:14am
View
Create the new shape at offset coordinates?
Lockwood
8-Dec-17 7:41am
View
Didn't realise I could do that myself. Will do.
Lockwood
18-Nov-17 15:11pm
View
I can fully understand that you're new to this - everyone started somewhere.
However, it seems to me like you are trying to run before you can walk. If you get all of the information spoonfed to you then you will tend not to get as much understanding of the fundamental concepts as if you do some research and then apply that research to your problem.
A case in point would be the sample I gave you earlier (which I now realise has a small bug in it). It creates a timer that runs after 232,000 millisecond (or 3 minutes 52 seconds) and then fires an event. If we modified that code to make something occur after it had been called 10,000 times, that event would fire after almost 27 days!
There are a lot of good books and tutorials out there, but you do need to respect that you are currently inexperienced and will need to look at the basics first and then move on from there.
I would recommend as a starter that you look up these topics:
1: Conditional flow (ie Select Case, If)
2: Iterations/loops (Do While, Do Until, For/Next)
3: Variable scope (Private, Public), also look up Static
These will help you in this task and are essential knowledge for pretty much any subsequent task
Lockwood
18-Nov-17 13:20pm
View
Yeah... That's really not how it works.
You need to use Raif's approach. Stop and think about where you are, where you want to be and how you want to get there.
Lockwood
18-Nov-17 8:08am
View
Wow.
One, that's long intro video.
Two, tie the event in to video events, not a timer.
Lockwood
17-Nov-17 9:07am
View
I'm guessing this is what OP was after.
A 3:52 delay to displaying Form1 would seem a bit strange.
Lockwood
30-Oct-17 9:32am
View
Excellent.
You MUST pay serious thought to SQL Injection attack though, hopefully your different solution takes that into account.
Lockwood
18-Oct-17 7:04am
View
I think I had my mind still working in part on the string concatenation from the original questions, which took me down that road.
Lockwood
18-Oct-17 7:02am
View
That's a fair point - I'd not thought of the possibility of using culture settings as an attack vector.
Lockwood
16-Oct-17 6:28am
View
This is one of the few examples where that is not going to be a problem - Date.Now is not user-provided information.
Edit: That sounded a lot meaner than I meant it to.
You are correct, parameters are important things to use.
Lockwood
9-Aug-17 8:45am
View
You're not going to like this but the best thing to do with this project is to stop, take a deep breath and have a look at the whole thing from a distance.
As others have said, your data structure is not that great. Your object names are not that great either. Take the time now to refactor as much as you can and then look at the project again once you have completed that housekeeping.
Lockwood
26-Jul-17 11:14am
View
I'll do it for nine!
Lockwood
25-Jul-17 6:42am
View
As I said, it is a solution that warrants a link to a discussion on the pros and cons of it.
For very simple UI thread tricks, it is a very useful tool. for more complex stuff, it is not the safest tool to use.
If the OP does just want to spin some text on screen on a timer, DoEvents is safe and full threading is overkill. If OP is wanting to do more than that then other alternatives need to be looked into.
Lockwood
22-Nov-11 10:53am
View
Deleted
Reason for my vote of 1
Ctrl Ins?
Show More