billy_bob169 Posted February 26, 2003 Posted February 26, 2003 Is there a way, in VB.NET, to check what operating system the user is running. I have run into a problem with the printpreview control when my program is running on Win 98. I can get around the problem by just printing the document (no preview), but what would be the fun in that. Here is what I am trying to accomplish...if the user is running Win 98 or Win ME, I want the print preview option in my Menu to be disabled, leaving only the option to print. That way if they are running a newer OS, the option to preview it will be there. Is this possible??? Quote I'd rather be riding than working
*Gurus* divil Posted February 26, 2003 *Gurus* Posted February 26, 2003 If Environment.OSVersion.Platform = PlatformID.Win32Windows Then 'They're on 98 or ME End If You could use this at any time to disable that menu option. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
billy_bob169 Posted February 26, 2003 Author Posted February 26, 2003 Thanks Divil...I'll try it out, and get back to ya'll! Quote I'd rather be riding than working
billy_bob169 Posted February 26, 2003 Author Posted February 26, 2003 Seems to work beautifully! Thanks again Divil. Is this all stuff that you just know "off the top of your head"? Or is there a reference point (other than this forum) that I can search so I don't have to bug everyone with such simple questions! Quote I'd rather be riding than working
*Gurus* divil Posted February 26, 2003 *Gurus* Posted February 26, 2003 I guess I learned it somewhere... I knew that things like that are in the Environment or Application classes a lot, and usually let intellisense and the documentation guide me from there. Helping others with problems is a good way of learning too. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.