Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3391116
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:46:06+00:00 2026-05-18T03:46:06+00:00

we have recently upgraded an old VB6 windows app to C# .NET 4.0. I

  • 0

we have recently upgraded an old VB6 windows app to C# .NET 4.0. I am looking to replace references to the Microsoft.VisualBasic.Compatibility.VB6.Support class, as Visual Basic 2010 is warning me that ‘Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862‘

This article assures me that: ‘Functions in the Compatibility namespaces were created to work around shortcomings in version 1.0 of the .NET Framework. In most cases, functionality added in later framework versions can be used to rewrite the functions, resulting in improved performance.’

My question is, what are the additions to later framework versions that I need to use to do away with the Compatibility.* classes? I need to phase out TwipsToPixelX, TwipsToPixelY, and so forth. Also, FontChangeUnderline, FontChangeSize, and other font-related stuff.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:46:07+00:00Added an answer on May 18, 2026 at 3:46 am

    The font related functions can be replaced easily enough. For example:

    Function FontChangeBold(f As Font, bold As Boolean) As Font
        Dim alreadySet = (f.Style And FontStyle.Bold) = FontStyle.Bold
        If bold = alreadySet Then Return f
        If bold Then Return New Font(f, f.Style Or FontStyle.Bold)
        Return New Font(f, f.Style And Not FontStyle.Bold)
    End Function
    

    This checks whether the desired style is already set. If it is, it returns the old font. Otherwise it will return a new font that has the same style, except for the bold style, which is now set according to the requirement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently upgraded some of my web applications to ASP.NET 3.5 by installing
I have recently written an application(vb.net) that stores and allows searching for old council
I recently upgraded VS 2005 to VS 2008. Unfortunately I have a very basic
Have recently been given a project to complete which uses XML quite extensively.Am looking
I have recently installed .net 3.5 SP1. When I deployed a compiled web site
I have recently upgraded to Visual Studio 2010. I have kept database projects separate
Our dev server was recently upgraded to PHP v5.2.13. With that upgrade we have
I have a solution with about 10 projects, and I recently upgraded to new
I'm currently working on a quite big (and old, sigh) code base, recently upgraded
I recently upgraded my main computer and am now working in windows Vista. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.