home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form ColorSelect
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- ClientHeight = 930
- ClientLeft = 2505
- ClientTop = 6030
- ClientWidth = 3795
- ControlBox = 0 'False
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 1335
- KeyPreview = -1 'True
- Left = 2445
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 930
- ScaleWidth = 3795
- Top = 5685
- Width = 3915
- Begin MhgmulLib.Mh3dMulLabel ColorSel
- Height = 495
- Left = 1320
- TabIndex = 1
- Top = 240
- Width = 1215
- _Version = 65536
- _ExtentX = 2143
- _ExtentY = 873
- _StockProps = 77
- ForeColor = 0
- AutoSize = -1 'True
- BevelSize = 0
- BevelStyle = 0
- BorderColor = 0
- BorderStyle = 0
- FillColor = 12632256
- FontStyle = 0
- FontTransparent = 0 'False
- LightColor = 16777215
- ShadowColor = 8421504
- WallPaper = 0
- Picture = "Clrsel32.frx":0000
- Scalemode = 0
- SegmentStyle = 0
- Segment = 0
- Segments = 1
- SegmentVarsize = 0
- DataField = ""
- DataFieldCount = 0
- DataFieldData = "Clrsel32.frx":001C
- SegBevelStyle0 = 0
- SegBevelSize0 = 2
- SegFontStyle0 = 0
- SegPicLeft0 = 0
- SegPicTop0 = 0
- SegPicWidth0 = 0
- SegPicHeight0 = 0
- SegWallpaper0 = 0
- SegBorderStyle0 = 0
- SegMax0 = 100
- SegMin0 = 0
- SegValue0 = 0
- SegFillStyle0 = 0
- SegAlignment0 = 0
- SegRectTop0 = 4
- SegRectLeft0 = 4
- SegRectBottom0 = 27
- SegRectRight0 = 75
- SegLightColor0 = -2147483643
- SegShadowColor0 = -2147483632
- SegBackColor0 = -2147483633
- SegFillColor0 = -2147483643
- SegTextColor0 = -2147483640
- SegTwipLeft0 = 0
- SegTwipTop0 = 0
- SegTwipWidth0 = 0
- SegTwipHeight0 = 0
- SegAutosize0 = 0 'False
- SegMultiline0 = 0 'False
- SegFontStrike0 = 0 'False
- SegFontTransparent0= 0 'False
- SegFontUnder0 = 0 'False
- SegFontBold0 = 0 'False
- SegFontItalic0 = 0 'False
- SegFontSize0 = 0
- SegPicture0 = "Clrsel32.frx":0034
- SegCaption0 = ""
- SegFontName0 = ""
- SegDataField0 = ""
- SegFormat0 = ""
- End
- Begin VB.CommandButton Command1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Cancel = -1 'True
- Caption = "Command1"
- Height = 375
- Left = 5160
- TabIndex = 0
- Top = 2040
- Width = 615
- End
- Attribute VB_Name = "ColorSelect"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim colors&(64)
- Dim cColorselhit
- Private Sub ColorSel_Click()
- lgColorValue = colors&(cColorselhit)
- lgCurrentColor = colors&(cColorselhit)
- Unload ColorSelect
- End Sub
- Private Sub colorsel_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim xcolorsel As Integer
- Dim ycolorsel As Integer
- xcolorsel = Int(X / (ColorSel.Width / 16))
- ycolorsel = Int(Y / (ColorSel.Height / 4))
- cColorselhit = ycolorsel * 16 + xcolorsel
- End Sub
- Private Sub Command1_Click()
- lgColorValue = -1
- ColorSelect.Hide
- End Sub
- Private Sub Form_Load()
- Dim swidth%
- Dim sheight%
- Dim i%
- Screen.MousePointer = 11
- DoEvents
- ColorSel.ScaleMode = 1
- ColorSel.Segments = 64
- swidth% = ColorSelect.ScaleWidth / 16
- sheight% = ColorSelect.ScaleHeight / 4
- setcolors colors&()
- ColorSelect.Top = (Screen.Height - ColorSelect.Height) / 2
- ColorSelect.Left = (Screen.Width - ColorSelect.Width) / 2
- ColorSel.Width = ColorSelect.ScaleWidth
- ColorSel.Height = ColorSelect.ScaleHeight
- ColorSel.Top = 0
- ColorSel.Left = 0
- ColorSel.BorderColor = ColorSel.ShadowColor
- For i% = 0 To 63
- ColorSel.Segment = i%
- ColorSel.SegBackColor = colors&(i%)
- ColorSel.SegWidth = swidth%
- ColorSel.SegHeight = sheight%
- ColorSel.SegLeft = swidth% * (i% Mod 16)
- ColorSel.SegTop = sheight% * Int(i% / 16)
- ColorSel.SegBevelSize = 1
- ColorSel.SegBorderStyle = 1
- ColorSel.SegShadowColor = 0
- ColorSel.SegLightColor = ColorSel.SegShadowColor
- Next
- Screen.MousePointer = 0
- End Sub
- Private Sub setcolors(colors&())
- colors&(0) = 16777215
- colors&(1) = 14737632
- colors&(2) = 12632319
- colors&(3) = 12640511
- colors&(4) = 14745599
- colors&(5) = 12648384
- colors&(6) = 16777152
- colors&(7) = 16761024
- colors&(8) = 16761087
- colors&(9) = 192
- colors&(10) = 16576
- colors&(11) = 49344
- colors&(12) = 49152
- colors&(13) = 12632064
- colors&(14) = 12582912
- colors&(15) = 12583104
- colors&(16) = 12632256
- colors&(17) = 4210752
- colors&(18) = 8421631
- colors&(19) = 8438015
- colors&(20) = 8454143
- colors&(21) = 8454016
- colors&(22) = 16777088
- colors&(23) = 16744576
- colors&(24) = 16744703
- colors&(25) = 128
- colors&(26) = 16512
- colors&(27) = 32896
- colors&(28) = 32768
- colors&(29) = 8421376
- colors&(30) = 8388608
- colors&(31) = 8388736
- colors&(32) = 8421504
- colors&(33) = 0
- colors&(34) = 255
- colors&(35) = 33023
- colors&(36) = 65535
- colors&(37) = 65280
- colors&(38) = 16776960
- colors&(39) = 16711680
- colors&(40) = 16711935
- colors&(41) = 64
- colors&(42) = 4210816
- colors&(43) = 16448
- colors&(44) = 16384
- colors&(45) = 4210688
- colors&(46) = 4194304
- colors&(47) = 4194368
- colors&(48) = 16777215
- colors&(49) = 16777215
- colors&(50) = 16777215
- colors&(51) = 16777215
- colors&(52) = 16777215
- colors&(53) = 16777215
- colors&(54) = 16777215
- colors&(55) = 16777215
- colors&(56) = 16777215
- colors&(57) = 16777215
- colors&(58) = 16777215
- colors&(59) = 16777215
- colors&(60) = 16777215
- colors&(61) = 16777215
- colors&(62) = 16777215
- colors&(63) = 16777215
- End Sub
- Private Sub MHGMUL1_Click()
- End Sub
-