home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD9687962000.psc / MX.ctl < prev    next >
Encoding:
Text File  |  2000-08-29  |  2.5 KB  |  95 lines

  1. VERSION 5.00
  2. Begin VB.UserControl MX 
  3.    ClientHeight    =   585
  4.    ClientLeft      =   0
  5.    ClientTop       =   0
  6.    ClientWidth     =   615
  7.    InvisibleAtRuntime=   -1  'True
  8.    ScaleHeight     =   585
  9.    ScaleWidth      =   615
  10.    Begin VB.Label Title 
  11.       Caption         =   "MX"
  12.       BeginProperty Font 
  13.          Name            =   "MS Sans Serif"
  14.          Size            =   12
  15.          Charset         =   0
  16.          Weight          =   700
  17.          Underline       =   0   'False
  18.          Italic          =   0   'False
  19.          Strikethrough   =   0   'False
  20.       EndProperty
  21.       Height          =   495
  22.       Left            =   0
  23.       TabIndex        =   0
  24.       Top             =   0
  25.       Width           =   615
  26.    End
  27. End
  28. Attribute VB_Name = "MX"
  29. Attribute VB_GlobalNameSpace = False
  30. Attribute VB_Creatable = True
  31. Attribute VB_PredeclaredId = False
  32. Attribute VB_Exposed = True
  33.  
  34. Private Sub UserControl_Initialize()
  35.     SetWinVersion
  36. End Sub
  37.  
  38. Private Sub UserControl_Resize()
  39.     If UserControl.Width <> 32 Then
  40.         UserControl.Width = 400
  41.     End If
  42.     If UserControl.Height <> 32 Then
  43.         UserControl.Height = 250
  44.     End If
  45.     Title.Left = 0
  46. End Sub
  47.  
  48. Public Function GetMX() As String
  49.     If IsNetConnectOnline = True Then
  50.         If Not IsNetConnectViaProxy Then
  51.             GetMX = MX_Query
  52.         Else
  53.             Err.Raise 0, "GetMX", "This computer is connected via a proxy server." & vbCrLf & "At this time, the wMX control does not support proxy servers."
  54.             Exit Function
  55.         End If
  56.     Else
  57.         Err.Raise 0, "GetMX", "This computer is not currently connected to the internet."
  58.     End If
  59. End Function
  60.  
  61. Public Property Get DNSCount() As Integer
  62.     DNSCount = mi_DNSCount
  63. End Property
  64.  
  65. Public Property Get MXCount() As Integer
  66.     MXCount = mi_MXCount
  67. End Property
  68.  
  69. Public Property Get PrefCount() As Integer
  70.     PrefCount = mi_MXCount
  71. End Property
  72.  
  73. Public Property Get Domain() As String
  74.     Domain = ms_Domain
  75. End Property
  76.  
  77. Public Property Let Domain(ByVal New_Domain As String)
  78.     If Len(New_Domain) > 4 Then 'its a good host
  79.         ms_Domain = New_Domain
  80.     End If
  81. End Property
  82.  
  83. Public Function DNS(ByVal Index As String) As String
  84.     DNS = sDNS(Index)
  85. End Function
  86.  
  87. Public Function MX(ByVal Index As String) As String
  88.     MX = sMX(Index)
  89. End Function
  90.  
  91. Public Function Pref(ByVal Index As String) As String
  92.     Pref = sPref(Index)
  93. End Function
  94.  
  95.