home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / activex / demos / oletrial / samples / vb / mhmarq / mhmq200.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-28  |  9.6 KB  |  293 lines

  1. VERSION 4.00
  2. Begin VB.Form MhMQ200 
  3.    Caption         =   "MhMQ200.MAK"
  4.    ClientHeight    =   4620
  5.    ClientLeft      =   1248
  6.    ClientTop       =   2076
  7.    ClientWidth     =   7368
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   0
  11.       weight          =   700
  12.       size            =   7.8
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    ForeColor       =   &H80000008&
  18.    Height          =   5220
  19.    Left            =   1200
  20.    LinkTopic       =   "Form1"
  21.    ScaleHeight     =   4620
  22.    ScaleWidth      =   7368
  23.    Top             =   1524
  24.    Width           =   7464
  25.    Begin VB.PictureBox picStatus 
  26.       Align           =   2  'Align Bottom
  27.       Appearance      =   0  'Flat
  28.       ForeColor       =   &H80000008&
  29.       Height          =   372
  30.       Left            =   0
  31.       ScaleHeight     =   348
  32.       ScaleWidth      =   7344
  33.       TabIndex        =   0
  34.       Top             =   4248
  35.       Width           =   7368
  36.    End
  37.    Begin Mhmq200Lib.MhMarque MhMarque1 
  38.       Height          =   3972
  39.       Left            =   144
  40.       TabIndex        =   1
  41.       Top             =   120
  42.       Width           =   3972
  43.       _Version        =   65536
  44.       _ExtentX        =   7011
  45.       _ExtentY        =   7011
  46.       _StockProps     =   79
  47.       Caption         =   "MhMarque Custom Control"
  48.       TintColor       =   16711935
  49.       MouseIcon       =   "Mhmq200.frx":0000
  50.       FontTransparent =   -1  'True
  51.       LightColor      =   16777215
  52.       OuterFillColor  =   -2147483633
  53.       ShadowColor     =   8421504
  54.       TextFillColor   =   -2147483633
  55.       Interval        =   100
  56.       Picture1        =   "Mhmq200.frx":001C
  57.       Picture2        =   "Mhmq200.frx":E1BE
  58.       Picture3        =   "Mhmq200.frx":1C360
  59.       Direction       =   0
  60.       FontStyle       =   0
  61.       PictureTop      =   10
  62.       PictureLeft     =   10
  63.       PictureRight    =   10
  64.       PictureBottom   =   10
  65.       CaptionTop      =   40
  66.       CaptionLeft     =   40
  67.       CaptionRight    =   40
  68.       CaptionBottom   =   40
  69.    End
  70.    Begin VB.Menu mnuAutoSize 
  71.       Caption         =   "AutoSize"
  72.    End
  73.    Begin VB.Menu mnuColor 
  74.       Caption         =   "Color"
  75.       Begin VB.Menu mnuBorderColor 
  76.          Caption         =   "BorderColor"
  77.       End
  78.       Begin VB.Menu mnuLightColor 
  79.          Caption         =   "LightColor"
  80.       End
  81.       Begin VB.Menu mnuOuterFillColor 
  82.          Caption         =   "OuterFillColor"
  83.       End
  84.       Begin VB.Menu mnuShadowColor 
  85.          Caption         =   "ShadowColor"
  86.       End
  87.       Begin VB.Menu mnuTextColor 
  88.          Caption         =   "TextColor"
  89.       End
  90.       Begin VB.Menu mnuTextFillColor 
  91.          Caption         =   "TextFillColor"
  92.       End
  93.    End
  94.    Begin VB.Menu mnuCaption 
  95.       Caption         =   "Caption"
  96.       Begin VB.Menu mnuCaptionBottom 
  97.          Caption         =   "CaptionBottom"
  98.       End
  99.       Begin VB.Menu mnuCaptionLeft 
  100.          Caption         =   "CaptionLeft"
  101.       End
  102.       Begin VB.Menu mnuCaptionRight 
  103.          Caption         =   "CaptionRight"
  104.       End
  105.       Begin VB.Menu mnuCaptionTop 
  106.          Caption         =   "CaptionTop"
  107.       End
  108.    End
  109.    Begin VB.Menu mnuDirection 
  110.       Caption         =   "Direction"
  111.    End
  112.    Begin VB.Menu mnuMiscellaneous 
  113.       Caption         =   "Miscellaneous"
  114.       Begin VB.Menu mnuFontStyle 
  115.          Caption         =   "FontStyle"
  116.       End
  117.       Begin VB.Menu mnuInterval 
  118.          Caption         =   "Interval"
  119.       End
  120.       Begin VB.Menu mnuStyle 
  121.          Caption         =   "Style"
  122.       End
  123.    End
  124.    Begin VB.Menu mnuPicture 
  125.       Caption         =   "Picture"
  126.       Begin VB.Menu mnuPicture1 
  127.          Caption         =   "Picture1"
  128.       End
  129.       Begin VB.Menu mnuPicture2 
  130.          Caption         =   "Picture2"
  131.       End
  132.       Begin VB.Menu mnuPicture3 
  133.          Caption         =   "Picture3"
  134.       End
  135.       Begin VB.Menu mnuPictureBottom 
  136.          Caption         =   "PictureBottom"
  137.       End
  138.       Begin VB.Menu mnuPictureLeft 
  139.          Caption         =   "PictureLeft"
  140.       End
  141.       Begin VB.Menu mnuPictureRight 
  142.          Caption         =   "PictureRight"
  143.       End
  144.       Begin VB.Menu mnuPictureTop 
  145.          Caption         =   "PictureTop"
  146.       End
  147.    End
  148. Attribute VB_Name = "MhMQ200"
  149. Attribute VB_Creatable = False
  150. Attribute VB_Exposed = False
  151. Private Sub Form_Load()
  152.     Me.Top = (Screen.Height - Me.Height) / 2
  153.     Me.Left = (Screen.Width - Me.Width) / 2
  154. End Sub
  155. Private Sub mnuAutoSize_Click()
  156.     ReDim sgOptionArray(0 To 1)
  157.     sgOptionArray(0) = "False"
  158.     sgOptionArray(1) = "True"
  159.     igOptionState = MhMarque1.AutoSize
  160.     MhMarque1.AutoSize = GetOption("AutoSize")
  161. End Sub
  162. Private Sub mnuBorderColor_Click()
  163.     ColorSelect.Show 1
  164.     MhMarque1.BorderColor = lgCurrentColor
  165. End Sub
  166. Private Sub mnuCaptionBottom_Click()
  167.     igRangeArray(0) = MhMarque1.CaptionTop
  168.     igRangeArray(1) = MhMarque1.CaptionBottom
  169.     igRangeArray(2) = 100
  170.     MhMarque1.CaptionBottom = GetRange("CaptionBottom")
  171. End Sub
  172. Private Sub mnuCaptionLeft_Click()
  173.     igRangeArray(0) = MhMarque1.CaptionLeft - 500
  174.     igRangeArray(1) = MhMarque1.CaptionLeft
  175.     igRangeArray(2) = MhMarque1.CaptionRight
  176.     MhMarque1.CaptionLeft = GetRange("CaptionLeft")
  177. End Sub
  178. Private Sub mnuCaptionRight_Click()
  179.     igRangeArray(0) = MhMarque1.CaptionLeft
  180.     igRangeArray(1) = MhMarque1.CaptionRight
  181.     igRangeArray(2) = MhMarque1.CaptionRight + 500
  182.     MhMarque1.CaptionRight = GetRange("CaptionRight")
  183. End Sub
  184. Private Sub mnuCaptionTop_Click()
  185.     igRangeArray(0) = 0
  186.     igRangeArray(1) = MhMarque1.CaptionTop
  187.     igRangeArray(2) = MhMarque1.CaptionBottom
  188.     MhMarque1.CaptionTop = GetRange("CaptionTop")
  189. End Sub
  190. Private Sub mnuDirection_Click()
  191.     ReDim sgOptionArray(0 To 1)
  192.     sgOptionArray(0) = "Text moves forward"
  193.     sgOptionArray(1) = "Text moves backward"
  194.     igOptionState = MhMarque1.Direction
  195.     MhMarque1.Direction = GetOption("Direction")
  196. End Sub
  197. Private Sub mnuFontStyle_Click()
  198.     ReDim sgOptionArray(0 To 4)
  199.     sgOptionArray(0) = "None"
  200.     sgOptionArray(1) = "Raised"
  201.     sgOptionArray(2) = "Raised with more shading"
  202.     sgOptionArray(3) = "Lowered"
  203.     sgOptionArray(4) = "Lowered with more shading"
  204.     igOptionState = MhMarque1.FontStyle
  205.     MhMarque1.FontStyle = GetOption("FontStyle")
  206. End Sub
  207. Private Sub mnuInterval_Click()
  208.     igRangeArray(0) = 0
  209.     igRangeArray(1) = MhMarque1.Interval
  210.     igRangeArray(2) = 100
  211.     MhMarque1.Interval = GetRange("Interval")
  212. End Sub
  213. Private Sub mnuLightColor_Click()
  214.     ColorSelect.Show 1
  215.     MhMarque1.LightColor = lgCurrentColor
  216. End Sub
  217. Private Sub mnuOuterFillColor_Click()
  218.     ColorSelect.Show 1
  219.     MhMarque1.OuterFillColor = lgCurrentColor
  220. End Sub
  221. Private Sub mnuPicture1_Click()
  222.     Dim spResp As String
  223.     spResp = InputBox$("Enter the name of the picture", ".Picture1", "", Me.Left + 120, Me.Top + 120)
  224.     If Len(spResp) And Dir$(spResp) <> "" Then
  225.         MhMarque1.Picture1 = LoadPicture(spResp)
  226.     Else
  227.         MsgBox "Action canceled", , "Error"
  228.     End If
  229. End Sub
  230. Private Sub mnuPicture2_Click()
  231.     Dim spResp As String
  232.     spResp = InputBox$("Enter the name of the picture", ".Picture2", "", Me.Left + 120, Me.Top + 120)
  233.     If Len(spResp) And Dir$(spResp) <> "" Then
  234.         MhMarque1.Picture2 = LoadPicture(spResp)
  235.     Else
  236.         MsgBox "Action canceled", , "Error"
  237.     End If
  238. End Sub
  239. Private Sub mnuPicture3_Click()
  240.     Dim spResp As String
  241.     spResp = InputBox$("Enter the name of the picture", ".Picture3", "", Me.Left + 120, Me.Top + 120)
  242.     If Len(spResp) And Dir$(spResp) <> "" Then
  243.         MhMarque1.Picture3 = LoadPicture(spResp)
  244.     Else
  245.         MsgBox "Action canceled", , "Error"
  246.     End If
  247. End Sub
  248. Private Sub mnuPictureBottom_Click()
  249.     igRangeArray(0) = MhMarque1.PictureTop
  250.     igRangeArray(1) = MhMarque1.PictureBottom
  251.     igRangeArray(2) = 100
  252.     MhMarque1.PictureBottom = GetRange("PictureBottom")
  253. End Sub
  254. Private Sub mnuPictureLeft_Click()
  255.     igRangeArray(0) = 0
  256.     igRangeArray(1) = MhMarque1.PictureLeft
  257.     igRangeArray(2) = MhMarque1.PictureRight
  258.     MhMarque1.PictureLeft = GetRange("PictureLeft")
  259. End Sub
  260. Private Sub mnuPictureRight_Click()
  261.     igRangeArray(0) = MhMarque1.PictureLeft
  262.     igRangeArray(1) = MhMarque1.PictureRight
  263.     igRangeArray(2) = 500
  264.     MhMarque1.PictureRight = GetRange("PictureRight")
  265. End Sub
  266. Private Sub mnuPictureTop_Click()
  267.     igRangeArray(0) = 0
  268.     igRangeArray(1) = MhMarque1.PictureTop
  269.     igRangeArray(2) = MhMarque1.PictureBottom
  270.     MhMarque1.CaptionTop = GetRange("CaptionTop")
  271. End Sub
  272. Private Sub mnuShadowColor_Click()
  273.     ColorSelect.Show 1
  274.     MhMarque1.ShadowColor = lgCurrentColor
  275. End Sub
  276. Private Sub mnuStyle_Click()
  277.     ReDim sgOptionArray(0 To 3)
  278.     sgOptionArray(0) = "Moving caption cycles through picture 1,2,3"
  279.     sgOptionArray(1) = "Moving caption static picture1 or 3d effect"
  280.     sgOptionArray(2) = "Static caption cycles through picture 1,2,3"
  281.     sgOptionArray(3) = "Static caption static picture1 or 3d effect"
  282.     igOptionState = MhMarque1.Style
  283.     MhMarque1.Style = GetOption("Style")
  284. End Sub
  285. Private Sub mnuTextColor_Click()
  286.     ColorSelect.Show 1
  287.     MhMarque1.TextColor = lgCurrentColor
  288. End Sub
  289. Private Sub mnuTextFillColor_Click()
  290.     ColorSelect.Show 1
  291.     MhMarque1.TextFillColor = lgCurrentColor
  292. End Sub
  293.