home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / Free / Prg / csplitdc.exe / mfrmMain.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-07-29  |  8.2 KB  |  245 lines

  1. VERSION 5.00
  2. Begin VB.MDIForm mfrmMain 
  3.    BackColor       =   &H8000000C&
  4.    Caption         =   "vbaccelerator Generic Splitter"
  5.    ClientHeight    =   6990
  6.    ClientLeft      =   3780
  7.    ClientTop       =   2865
  8.    ClientWidth     =   9645
  9.    Icon            =   "mfrmMain.frx":0000
  10.    LinkTopic       =   "MDIForm1"
  11.    Begin VB.PictureBox picStatus 
  12.       Align           =   2  'Align Bottom
  13.       BorderStyle     =   0  'None
  14.       Height          =   345
  15.       Left            =   0
  16.       ScaleHeight     =   345
  17.       ScaleWidth      =   9645
  18.       TabIndex        =   2
  19.       Top             =   6645
  20.       Width           =   9645
  21.       Begin VB.Label lblMain 
  22.          BorderStyle     =   1  'Fixed Single
  23.          Caption         =   "Label1"
  24.          Height          =   255
  25.          Left            =   0
  26.          TabIndex        =   3
  27.          Top             =   60
  28.          Width           =   8235
  29.       End
  30.    End
  31.    Begin VB.PictureBox picSearchBar 
  32.       Align           =   3  'Align Left
  33.       BorderStyle     =   0  'None
  34.       Height          =   6645
  35.       Left            =   0
  36.       ScaleHeight     =   6645
  37.       ScaleWidth      =   2160
  38.       TabIndex        =   0
  39.       Top             =   0
  40.       Width           =   2160
  41.       Begin VB.PictureBox picProductBar 
  42.          BackColor       =   &H80000010&
  43.          Height          =   5775
  44.          Left            =   0
  45.          ScaleHeight     =   5715
  46.          ScaleWidth      =   1995
  47.          TabIndex        =   4
  48.          Top             =   0
  49.          Width           =   2055
  50.          Begin VB.CommandButton cmdVBAccel 
  51.             Height          =   420
  52.             Left            =   60
  53.             Picture         =   "mfrmMain.frx":014A
  54.             Style           =   1  'Graphical
  55.             TabIndex        =   12
  56.             ToolTipText     =   "Visit vbAccelerator on the Web"
  57.             Top             =   1980
  58.             Width           =   1875
  59.          End
  60.          Begin VB.CommandButton cmdActiveChannel 
  61.             Height          =   420
  62.             Left            =   60
  63.             Picture         =   "mfrmMain.frx":06A3
  64.             Style           =   1  'Graphical
  65.             TabIndex        =   11
  66.             ToolTipText     =   "Add vbAccelerator's Active Channel"
  67.             Top             =   2460
  68.             Width           =   1875
  69.          End
  70.          Begin VB.ComboBox cboDemo 
  71.             Height          =   315
  72.             Index           =   2
  73.             Left            =   60
  74.             TabIndex        =   9
  75.             Top             =   1440
  76.             Width           =   1515
  77.          End
  78.          Begin VB.ComboBox cboDemo 
  79.             Height          =   315
  80.             Index           =   1
  81.             Left            =   60
  82.             TabIndex        =   7
  83.             Top             =   840
  84.             Width           =   1515
  85.          End
  86.          Begin VB.ComboBox cboDemo 
  87.             Height          =   315
  88.             Index           =   0
  89.             Left            =   60
  90.             TabIndex        =   5
  91.             Top             =   240
  92.             Width           =   1515
  93.          End
  94.          Begin VB.Label lblDemo 
  95.             BackStyle       =   0  'Transparent
  96.             Caption         =   "Price Range:"
  97.             ForeColor       =   &H80000014&
  98.             Height          =   195
  99.             Index           =   2
  100.             Left            =   60
  101.             TabIndex        =   10
  102.             Top             =   1200
  103.             Width           =   1515
  104.          End
  105.          Begin VB.Label lblDemo 
  106.             BackStyle       =   0  'Transparent
  107.             Caption         =   "Category:"
  108.             ForeColor       =   &H80000014&
  109.             Height          =   195
  110.             Index           =   1
  111.             Left            =   60
  112.             TabIndex        =   8
  113.             Top             =   600
  114.             Width           =   1515
  115.          End
  116.          Begin VB.Label lblDemo 
  117.             BackStyle       =   0  'Transparent
  118.             Caption         =   "Product:"
  119.             ForeColor       =   &H80000014&
  120.             Height          =   195
  121.             Index           =   0
  122.             Left            =   60
  123.             TabIndex        =   6
  124.             Top             =   0
  125.             Width           =   1515
  126.          End
  127.       End
  128.       Begin VB.PictureBox picSplitter 
  129.          Height          =   6135
  130.          Left            =   1980
  131.          ScaleHeight     =   6075
  132.          ScaleWidth      =   75
  133.          TabIndex        =   1
  134.          Top             =   0
  135.          Width           =   135
  136.       End
  137.    End
  138.    Begin VB.Menu mnuF0MAIN 
  139.       Caption         =   "&File"
  140.       Begin VB.Menu mnuFile 
  141.          Caption         =   "&New..."
  142.          Index           =   0
  143.          Shortcut        =   ^N
  144.       End
  145.       Begin VB.Menu mnuFile 
  146.          Caption         =   "-"
  147.          Index           =   1
  148.       End
  149.       Begin VB.Menu mnuFile 
  150.          Caption         =   "&Close"
  151.          Index           =   2
  152.       End
  153.    End
  154.    Begin VB.Menu mnuHelpTOP 
  155.       Caption         =   "&Help"
  156.       Begin VB.Menu mnuHelp 
  157.          Caption         =   "&About..."
  158.          Index           =   0
  159.       End
  160.    End
  161. Attribute VB_Name = "mfrmMain"
  162. Attribute VB_GlobalNameSpace = False
  163. Attribute VB_Creatable = False
  164. Attribute VB_PredeclaredId = True
  165. Attribute VB_Exposed = False
  166. Option Explicit
  167. Dim cS As New cSplitDDC
  168. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  169. Public Sub ShellEx(ByVal sLocation As String)
  170. Dim lR As Long
  171.     lR = ShellExecute(Me.hWnd, "open", sLocation, "", "", vbNormalFocus)
  172.     If (lR < 0) Or (lR > 32) Then
  173.         'ok
  174.     Else
  175.         MsgBox "Sorry, I could not go to " & sLocation & ".", vbInformation
  176.     End If
  177. End Sub
  178. Private Sub cmdActiveChannel_Click()
  179.     ShellEx "http://www.dogma.demon.co.uk/vbaccel.cdf"
  180. End Sub
  181. Private Sub cmdVBAccel_Click()
  182.     ShellEx "http://www.dogma.demon.co.uk"
  183. End Sub
  184. Private Sub MDIForm_Load()
  185. Dim i As Long
  186. Dim j As Long
  187.     With cS
  188.         .SplitObject = picSplitter
  189.         .Orientation = espVertical
  190.         .Border(espbLeft) = 32
  191.         .Border(espbRight) = 32
  192.         .Border(espbBottom) = picStatus.Height \ Screen.TwipsPerPixelY
  193.     End With
  194.     lblMain.Caption = " Test Splitting..."
  195.     For i = 0 To 2
  196.         For j = 0 To 10
  197.             cboDemo(i).AddItem "Item" & j
  198.         Next j
  199.     Next i
  200.     frmSplittable.Show
  201. End Sub
  202. Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  203.     cS.SplitterFormMouseMove X, Y
  204. End Sub
  205. Private Sub MDIForm_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  206.     If (cS.SplitterFormMouseUp(X, Y)) Then
  207.         MDIForm_Resize
  208.     End If
  209. End Sub
  210. Private Sub MDIForm_Resize()
  211.     picSplitter.Height = Me.ScaleHeight
  212.     picSearchBar.Width = picSplitter.Left + picSplitter.Width
  213. End Sub
  214. Private Sub mnuFile_Click(Index As Integer)
  215.     Select Case Index
  216.     Case 0
  217.         Dim fS As New frmSplittable
  218.         fS.Show
  219.     Case 2
  220.         Unload Me
  221.     End Select
  222. End Sub
  223. Private Sub mnuHelp_Click(Index As Integer)
  224.     frmAbout.Show vbModal, Me
  225. End Sub
  226. Private Sub picSearchBar_Resize()
  227. Dim i As Long
  228.     With picProductBar
  229.         .Move .Left, .Top, picSearchBar.ScaleWidth - .Left * 2 - 4 * Screen.TwipsPerPixelX, picSearchBar.ScaleHeight - .Top * 2
  230.         For i = 0 To 2
  231.             lblDemo(i).Width = .ScaleWidth - lblDemo(i).Left * 2
  232.             cboDemo(i).Width = .ScaleWidth - lblDemo(i).Left * 2
  233.         Next i
  234.         If .ScaleWidth > cmdVBAccel.Width Then
  235.             cmdVBAccel.Left = (.ScaleWidth - cmdVBAccel.Width) \ 2
  236.         Else
  237.             cmdVBAccel.Left = lblDemo(i).Left
  238.         End If
  239.         cmdActiveChannel.Left = cmdVBAccel.Left
  240.     End With
  241. End Sub
  242. Private Sub picSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  243.     cS.SplitterMouseDown Me.hWnd, X, Y
  244. End Sub
  245.