15,881,424 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 reeselmiller2 (Top 7 by date)
reeselmiller2
31-Dec-14 13:40pm
View
I have actually lost the original source of this code. I copied it along time ago from a tutorial written from Microsoft on how to write a specialized combobox. It had both C# and VB examples. I now believe the VB was converted from the C# with out much thought and the conversion was not actually tested.
reeselmiller2
31-Dec-14 13:21pm
View
Thanks Sergey for your input. The(0) on the end of Decimal.GetBits(18446744073709551583D)(0) I was referring to the low 32 bits because I felt this was the authors intent to narrow from the wider ulong flag for the binary operation. The CInt(Me_flags) simply will not work as intended in VB. I had not considered using System.BitConverter, I'm studying this now. Thank you.
reeselmiller2
30-Dec-14 1:17am
View
Thanks for the reference. This is part of my confusion. The flag is a ulong and can have a value like 18446744073709551583 which converts to a decimal -33, works fine in C#. But in VB if you try "i As Integer = CInt(18446744073709551583UL) you get an overflow error. So you have to use something like Decimal.GetBits(18446744073709551583D)(0) which gives you the low 32bits of the 96 bit Integer. I agree the code is horrible, just trying to understand why it is written this way.
reeselmiller2
30-Dec-14 0:15am
View
Sergey, everyone knows how smart you are and your answers are quite helpful to me. But I felt like you were just in a bad mood. All I wanted was some insight into how the flag value was being used in those lines of code. It seemed like a "magic number" at the time.
reeselmiller2
29-Dec-14 22:54pm
View
Thanks for your solution PIEBALDconsult. This pointed me in the right direction and I understand how that section of code is used now.
reeselmiller2
29-Dec-14 22:46pm
View
Thanks Sergey, I forgot that you know it all. I'll make sure that I learn everything before I ask my next question. Maybe this is why most beginners have so much trouble asking questions. Because there's always someone like you ready to ridicule them instead of HELP them.
reeselmiller2
29-Dec-14 22:27pm
View
It was written by Microsoft, but if you have any REAL input that would be helpful.
Show More