15,919,931 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 Member 11890082 (Top 4 by date)
Member 11890082
8-Sep-15 5:37am
View
Whilst I very much appreciate your responses I would like to make the following points.
I realise you all think my code is not that good which is hardly surprising as I'm not a programmer.
The code works perfectly on Windows 7 but run the upgrade to Windows 10 and it starts causing errors so downgrade back to Windows 7 and hey presto it all works fine again.
IMHO this sort of proves that Microsoft did something on the upgrade.
So I'll close this question as everyone here thinks it's my code. It's just that I don't.
Thanks.
Tim
Member 11890082
6-Sep-15 7:02am
View
Sorry for delay in getting back. I have discovered one other thing about the code.
It works in Windows 7 but NOT in Windows 10! Have you any idea why that might be?
Member 11890082
6-Aug-15 7:46am
View
Here's the code I'm using - can't see where it could go wrong, but thanks for your help.
Dim myDict As New Dictionary(Of Integer, Integer) From {{2013, 8888}, {2014, 9231}, {2015, 3715}, {2016, 1650}, {2017, 1923}, _
{2018, 3591}, {2019, 7835}, {2020, 9083}, {2021, 1234}, {2022, 9681}, {2023, 5619}, {2024, 7304}, {2025, 3693}, _
{2026, 3892}, {2027, 8547}, {2028, 2641}, {2029, 5807}, {2030, 7312}, {2031, 1671}, {2032, 5398}, {2033, 2761}, _
{2034, 3945}, {2035, 1793}, {2036, 9882}, {2037, 4963}, {2038, 9671}, {2039, 2001}, {2040, 4489}, {2099, 7714}}
Dim checkno1 As String, noblanks As String, r5 As String, r3 As String, r2 As String, r4 As String, r6 As String, z As Integer, checkno As String
r1 = Trim(r1)
r6 = ""
noblanks = ""
For z = 1 To Len(r1)
r3 = Mid(r1, z, 1)
If r3 <> " " Then
noblanks = noblanks + r3
End If
Next z
Dim yy As Integer = 0
For Each entry In myDict
If mRegNo1 = entry.Value Then
yy = entry.Key
End If
Next
If yy <> 0 Then
If yy > Year(Now) Then
r6 = myDict(yy)
' ElseIf yy <= Year(Now) And Month(Now) <= 6 Then
ElseIf yy = Year(Now) And Month(Now) <= 6 Then
r6 = myDict(yy)
Else
r6 = 9999
End If
Else
r6 = myDict(2099)
End If
checkno1 = Trim(Str(r6))
If Len(noblanks) < 15 Then
noblanks = noblanks + "AEHNPRUYZCDJKQS"
End If
r1 = AscW(Left(noblanks, 1))
r2 = AscW(Mid(noblanks, 3, 1))
r3 = AscW(Mid(noblanks, 6, 1))
r4 = AscW(Mid(noblanks, 10, 1))
r5 = AscW(Mid(noblanks, 15, 1))
r1 = Int((Val(r1) * 21) / 18)
r2 = Int((Val(r2) * 21) / 18)
r3 = Int((Val(r3) * 21) / 18)
r4 = Int((Val(r4) * 21) / 18)
r5 = Int((Val(r5) * 21) / 18)
checkno = Right(Trim(Str(r1)), 2) & Right(Trim(Str(r2)), 2) & Right(Trim(Str(r3)), 2) & Right(Trim(Str(r4)), 2) & Right(Trim(Str(r5)), 2)
If mRegNo = checkno And mRegNo1 = checkno1 Then
Return True
Else
Return False
End If
Member 11890082
6-Aug-15 6:18am
View
Thanks I'll look there. The other question is of course. Why has this just started happening? It was all working OK until just recently & it works perfectly well on my pc, I can't get it to go wrong.