home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / syswit / syswitch.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  6.6 KB  |  216 lines

  1. VERSION 2.00
  2. Begin Form lalal 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "SySwitch 2.0"
  6.    ClientHeight    =   3420
  7.    ClientLeft      =   2085
  8.    ClientTop       =   2205
  9.    ClientWidth     =   4365
  10.    FontBold        =   -1  'True
  11.    FontItalic      =   0   'False
  12.    FontName        =   "MS Sans Serif"
  13.    FontSize        =   9.75
  14.    FontStrikethru  =   0   'False
  15.    FontUnderline   =   0   'False
  16.    ForeColor       =   &H00C0C0C0&
  17.    Height          =   4110
  18.    Icon            =   SYSWITCH.FRX:0000
  19.    Left            =   2025
  20.    LinkMode        =   1  'Source
  21.    LinkTopic       =   "Form1"
  22.    MaxButton       =   0   'False
  23.    ScaleHeight     =   3420
  24.    ScaleWidth      =   4365
  25.    Top             =   1575
  26.    Width           =   4485
  27.    Begin OptionButton Option1 
  28.       BackColor       =   &H00C0C0C0&
  29.       FontBold        =   0   'False
  30.       FontItalic      =   0   'False
  31.       FontName        =   "MS Sans Serif"
  32.       FontSize        =   8.25
  33.       FontStrikethru  =   0   'False
  34.       FontUnderline   =   0   'False
  35.       Height          =   375
  36.       Index           =   4
  37.       Left            =   360
  38.       TabIndex        =   7
  39.       Top             =   2715
  40.       Width           =   3705
  41.    End
  42.    Begin OptionButton Option1 
  43.       BackColor       =   &H00C0C0C0&
  44.       FontBold        =   0   'False
  45.       FontItalic      =   0   'False
  46.       FontName        =   "MS Sans Serif"
  47.       FontSize        =   8.25
  48.       FontStrikethru  =   0   'False
  49.       FontUnderline   =   0   'False
  50.       Height          =   375
  51.       Index           =   3
  52.       Left            =   345
  53.       TabIndex        =   6
  54.       Top             =   2310
  55.       Width           =   3705
  56.    End
  57.    Begin OptionButton Option1 
  58.       BackColor       =   &H00C0C0C0&
  59.       FontBold        =   0   'False
  60.       FontItalic      =   0   'False
  61.       FontName        =   "MS Sans Serif"
  62.       FontSize        =   8.25
  63.       FontStrikethru  =   0   'False
  64.       FontUnderline   =   0   'False
  65.       Height          =   375
  66.       Index           =   2
  67.       Left            =   345
  68.       TabIndex        =   5
  69.       Top             =   1935
  70.       Width           =   3705
  71.    End
  72.    Begin OptionButton Option1 
  73.       BackColor       =   &H00C0C0C0&
  74.       FontBold        =   0   'False
  75.       FontItalic      =   0   'False
  76.       FontName        =   "MS Sans Serif"
  77.       FontSize        =   8.25
  78.       FontStrikethru  =   0   'False
  79.       FontUnderline   =   0   'False
  80.       Height          =   375
  81.       Index           =   1
  82.       Left            =   345
  83.       TabIndex        =   4
  84.       Top             =   1515
  85.       Width           =   3705
  86.    End
  87.    Begin OptionButton Option1 
  88.       BackColor       =   &H00C0C0C0&
  89.       FontBold        =   0   'False
  90.       FontItalic      =   0   'False
  91.       FontName        =   "MS Sans Serif"
  92.       FontSize        =   8.25
  93.       FontStrikethru  =   0   'False
  94.       FontUnderline   =   0   'False
  95.       ForeColor       =   &H00000000&
  96.       Height          =   375
  97.       Index           =   0
  98.       Left            =   345
  99.       TabIndex        =   3
  100.       Top             =   1125
  101.       Width           =   3705
  102.    End
  103.    Begin CommandButton Command1 
  104.       Cancel          =   -1  'True
  105.       Caption         =   "Cancel"
  106.       Height          =   375
  107.       Left            =   3255
  108.       TabIndex        =   2
  109.       Top             =   615
  110.       Width           =   855
  111.    End
  112.    Begin CommandButton Command2 
  113.       Caption         =   "Restart"
  114.       Height          =   375
  115.       Left            =   3240
  116.       TabIndex        =   0
  117.       Top             =   150
  118.       Width           =   855
  119.    End
  120.    Begin Label Label1 
  121.       BackColor       =   &H00C0C0C0&
  122.       Caption         =   "Select configuration to be used for the SYSTEM.INI file: "
  123.       Height          =   720
  124.       Left            =   420
  125.       TabIndex        =   1
  126.       Top             =   345
  127.       Width           =   2235
  128.    End
  129.    Begin Menu FileMenu 
  130.       Caption         =   "&File"
  131.       Begin Menu FileConfig 
  132.          Caption         =   "&Configure..."
  133.       End
  134.       Begin Menu FileSep 
  135.          Caption         =   "-"
  136.       End
  137.       Begin Menu FileExit 
  138.          Caption         =   "E&xit"
  139.       End
  140.    End
  141.    Begin Menu HelpMenu 
  142.       Caption         =   "&Help"
  143.       Begin Menu HelpInstructions 
  144.          Caption         =   "&Instructions"
  145.       End
  146.       Begin Menu HelpSeparator 
  147.          Caption         =   "-"
  148.       End
  149.       Begin Menu AboutSySwitch 
  150.          Caption         =   "&About..."
  151.       End
  152.    End
  153. DefInt A-Z
  154. Const TRUE = -1
  155. Const FALSE = 0
  156. Sub AboutSySwitch_Click ()
  157. Load form2
  158. form2.Show 1
  159. End Sub
  160. Sub Command1_Click ()
  161. Unload Config
  162. Unload LALAL
  163. End Sub
  164. Sub Command2_Click ()
  165. If Option1(0).Value = True Then Call CopyFile(ConfigFile(1))
  166. If Option1(1).Value = True Then Call CopyFile(ConfigFile(2))
  167. If Option1(2).Value = True Then Call CopyFile(ConfigFile(3))
  168. If Option1(3).Value = True Then Call CopyFile(ConfigFile(4))
  169. If Option1(4).Value = True Then Call CopyFile(ConfigFile(5))
  170. End Sub
  171. Sub FileConfig_Click ()
  172. WasRecordChanged = False
  173. Config.Combo1.Listindex = GetHighLight()
  174. Config.Show 1
  175. End Sub
  176. Sub FileExit_Click ()
  177. Unload LALAL
  178. End Sub
  179. Sub Form_Load ()
  180. ReadProf
  181. Option1(0).Value = True
  182. Load Config
  183. Config.Combo1.Listindex = 0
  184.     MyPointer& = GetDosEnvironment&()
  185.     MyLen = LStrLen(MyPointer&)
  186.     Do
  187.         Mystring$ = LP2Str$(ByVal MyPointer&, MyLen)
  188.         x = Len(Mystring$)
  189.         If Left$(Mystring$, 7) = "windir=" Then WinDir = RTrim$(Right$(Mystring$, x - 7))
  190.         MyPointer& = MyPointer& + MyLen + 1
  191.         MyLen = LStrLen(MyPointer&)
  192.         Loop Until MyLen = 0
  193.        Config.Label4.Caption = WinDir
  194. HandOff = False
  195. End Sub
  196. Sub Form_Paint ()
  197. If HandOff = True Then Option1(Config.Combo1.Listindex).Value = True: Option1(Config.Combo1.Listindex).SetFocus
  198. HandOff = False
  199. Option1(0).Caption = ConfigName(1)
  200. Option1(1).Caption = ConfigName(2)
  201. Option1(2).Caption = ConfigName(3)
  202. Option1(3).Caption = ConfigName(4)
  203. Option1(4).Caption = ConfigName(5)
  204. Call Frame(LALAL, Option1(0).Left - 45, Option1(0).Top - 45, Option1(4).Top + Option1(4).Height + 90 - Option1(0).Top, Option1(4).Left + Option1(4).Width + 90 - Option1(0).Left)
  205. Call Frame2(LALAL, 60, 60, LALAL.Height - 720, LALAL.Width - 150)
  206. End Sub
  207. Function GetHighLight () As Integer
  208. For i = 0 To 4
  209. If Option1(i).Value = True Then GetHighLight = i
  210. Next i
  211. End Function
  212. Sub HelpInstructions_Click ()
  213. Load Instructions
  214. Instructions.Show
  215. End Sub
  216.