Print Page | Close Window

CJ commondialog color

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=19858
Printed Date: 01 November 2024 at 2:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CJ commondialog color
Posted By: Developerx
Subject: CJ commondialog color
Date Posted: 13 June 2012 at 7:38pm

Code for the cmdcolor button

1. note here we use same code as in the code i posted before, also the dialogstyle 0 and flags

are important, flags 2+1 are fullopen and selecting default color to avoid the black default

' HOW TO USE CJ commondialog for COLOR

Private Sub cmdcolor_Click()
Dim whataction As Long
CommonDialog1.ParentHwnd = Me.hWnd
CommonDialog1.Color = &HC0C0C0
CommonDialog1.DialogStyle = 0
CommonDialog1.Flags = 2 + 1

whataction = CommonDialog1.ShowColor
If whataction = 2 Then
Me.Caption = "Cancel..."
Else
Me.Caption = "Ready"
Frame5.BackColor = CommonDialog1.Color
End If

End Sub





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net