05-04-14, 12:18 AM
كود :
[align=left]
Friend Class Form1
Private Structure ChooseColor
Dim lStructSize As Integer
Dim hwndOwner As Integer
Dim hInstance As Integer
Dim rgbResult As Integer
Dim lpCustColors As String
Dim flags As Integer
Dim lCustData As Integer
Dim lpfnHook As Integer
Dim lpTemplateName As String
End Structure
Private Declare Function ChooseColor_Renamed Lib "comdlg32.dll" Alias "ChooseColorA" (ByRef pChoosecolor As ChooseColor) As Integer
Private Sub Button1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Button1.Click
Dim cc As ChooseColor
Dim CustColor(16) As Integer
cc.lStructSize = Len(cc)
cc.hwndOwner = Me.Handle.ToInt32
cc.flags = 0
cc.lpCustColors = New String(Chr(0), 16 * 4)
Dim a As Object
Dim x As Object
Dim c1 As Object
Dim c2 As Object
Dim c3 As Object
Dim c4 As Object
a = ChooseColor_Renamed(cc)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
[/align]