Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleOther Common Upgrade Problems
  1. Variant

    1. Replace with object when array data type is involved
      Replace with string when both numeric and non-numeric data types are involved

  2. Color type
    > System.Drawing.Color
    > System.Drawing.SystemColor

  3. Windows API Any Type
    > Specify the data type
    > Overload the function if necessary

  4. Shape Control
    > Use TPRI.Shape control instead

  5. Line Control
    > Draw a line in code:
     Imports System.Drawing
     Imports System.Drawing.Drawing2D

    > Dim lobjGraphics as Graphics
     LobjGraphics.DrawLine(Pens.Red, X1, Y1, X2, Y2)
     LobjGraphics.Dispose()

  6. File and Directory
    > Use .NET File class
     Imports System.IO
     Dim lobjFile As File
     lobjFile.Copy(SourceName, DestinationName, True)
     lobjFile.Delete(SourceName)

    > Use .NET Directory class
     Imports System.IO
     Directory.Exists(Name)
     Directory.CreateDirectory(Name)

...