?
Solved

Detect Windows Version on application startup.

Posted on 2003-03-11
9
Medium Priority
?
143 Views
Last Modified: 2010-04-07
Please gimme an easy to write code to detect if user's window version is 9x/Me or NT/XP and how can I get user's System Directory as a String variable.

Thank you.
0
Comment
Question by:Snollygoster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 300 total points
ID: 8112269
for part 2:

Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer
As String, ByVal nSize As Long) As Long

Private Const MAX_SIZE = 255

   Dim buff As String
   Dim sysdir as String
   Dim rc As Long
   
   buff = Space$(MAX_SIZE)
   rc = GetSystemDirectory(buff, MAX_SIZE)
   sysdir = Left$(buff, rc)
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 8112343
0
 

Author Comment

by:Snollygoster
ID: 8112370
I will check these and reply later.

BTW I am using VB .NET does this code apply there as well?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 18

Expert Comment

by:bobbit31
ID: 8112371
it's windows api, so it should
0
 

Author Comment

by:Snollygoster
ID: 8112388
I will check these and reply later.

BTW I am using VB .NET does this code apply there as well?
0
 

Expert Comment

by:CleanupPing
ID: 9056438
Snollygoster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 9072305
recommendation: points to bobbit31
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9097076
Moderator, my recommended disposition is:

    Accept bobbit31's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question