Some of you may have seen this thread which is about a tool for formatting forum posts. It's been reported by one user who has VB.Net installed that they get a "You Need to Have CommonDialog ActiveX Control Installed" error when they try to use the application's Gradient function. Here is the html code that refers to the common dialog.

VB Code:
  1. Function GetColor(msg)
  2. Dim Dlg
  3. On Error Resume Next
  4. Set Dlg = CreateObject("MSComDlg.CommonDialog")
  5.   If Err.Number = 0 Then
  6.     Err.Clear
  7.     oWindow.alert(msg)
  8.     Dlg.CancelError = True
  9.     Dlg.ShowColor()
  10.     If Err.Number = 0 Then
  11.       Err.Clear
  12.       GetColor = Clng(Dlg.Color)
  13.       Set Dlg = Nothing
  14.     End If
  15.   Else
  16.       GetColor = -1
  17.   End If
  18. End Function
I have two questions.
  • Have any of you that have VB.Net installed ever used the Gradient function in the forum tool app?
  • How can I modify the above code so that a VB.Net person can use it?