c# - Replacing obsolete VisualBasic.Compatibility.VB6.Support -


we have upgraded old vb6 windows app c# .net 4.0. looking replace references microsoft.visualbasic.compatibility.vb6.support class, visual basic 2010 warning me 'microsoft.visualbasic.compatibility.* classes obsolete , supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862'

this article assures me that: 'functions in compatibility namespaces created work around shortcomings in version 1.0 of .net framework. in cases, functionality added in later framework versions can used rewrite functions, resulting in improved performance.'

my question is, additions later framework versions need use away compatibility.* classes? need phase out twipstopixelx, twipstopixely, , forth. also, fontchangeunderline, fontchangesize, , other font-related stuff.

the font related functions can replaced enough. example:

function fontchangebold(f font, bold boolean) font     dim alreadyset = (f.style , fontstyle.bold) = fontstyle.bold     if bold = alreadyset return f     if bold return new font(f, f.style or fontstyle.bold)     return new font(f, f.style , not fontstyle.bold) end function 

this checks whether desired style set. if is, returns old font. otherwise return new font has same style, except bold style, set according requirement.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -