主婦と.NETと犬のぶろぐ

奥様 と プログラム と お犬様 の 楽しい日常

目次

Blog 利用状況

ニュース

書庫

日記カテゴリ

ColorDialog(System.Windows.Forms.ColorDialog)

ColorDialog は、そのまんま Google 検索すると死ぬほど情報が出てきます。
なので、自分的に忘れそうな事をメモっておきました。
ColorDialog クラスは、CommonDialog クラスを継承しています。

■参考文献
ColorDialog クラス
CommonDialog クラス

■実行画像
フォームです。何のヘンテツもありません。
ColorDialog フォーム

Button1 押下時の ColorDialog です。赤がデフォルトで選択されています。
ColorDialog Button1

Button2 押下時の ColorDialog です。プログラムで指定したカスタムカラーが[作成した色]に表示されています。
ColorDialog Button2

Button3 押下時の ColorDialog です。
ColorDialog Button3

Button4 押下時の ColorDialog です。ヘルプボタンを押下時にメッセージがでます。
ColorDialog Button4

Public Class ColorDialogTest
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '' カラーピッカーのようなものを表示する。
        Me.ColorDialog1.FullOpen = True
        ' デフォルトの色を選択する
        Me.ColorDialog1.Color = System.Drawing.Color.Red
        ' ダイアログを開く
        Dim result As DialogResult = Me.ColorDialog1.ShowDialog()
        If result = Windows.Forms.DialogResult.OK Then
            Me.Label1.BackColor = Me.ColorDialog1.Color
            Me.Label1.Text = "R:" & Me.ColorDialog1.Color.R.ToString() & _
                             " G:" & Me.ColorDialog1.Color.G.ToString() & _
                             " B:" & Me.ColorDialog1.Color.B.ToString()
        End If
    End Sub

Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click '' これ以降、プログラム内で ColorDialog を作成する。 Using myColorDialog As ColorDialog = New ColorDialog ' CustomColor を設定 myColorDialog.CustomColors = New Integer() {&H6699, &HFF9933} Dim result As DialogResult = myColorDialog.ShowDialog() If result = Windows.Forms.DialogResult.OK Then Me.Label2.BackColor = myColorDialog.Color End If End Using End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click '' 純色のみ表示する Using myColorDialog As ColorDialog = New ColorDialog myColorDialog.SolidColorOnly = True Dim result As DialogResult = myColorDialog.ShowDialog() If result = Windows.Forms.DialogResult.OK Then Me.Label3.BackColor = myColorDialog.Color End If End Using End Sub
Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click '' AnyColor Using myColorDialog As ColorDialog = New ColorDialog myColorDialog.AllowFullOpen = False myColorDialog.AnyColor = True myColorDialog.SolidColorOnly = False myColorDialog.ShowHelp = True ' ヘルプボタンが押されたときのイベントを登録する AddHandler myColorDialog.HelpRequest, _ New EventHandler(AddressOf Me.ColorDialogHelpRequested) Dim result As DialogResult = myColorDialog.ShowDialog() If result = Windows.Forms.DialogResult.OK Then Me.Label4.BackColor = myColorDialog.Color End If End Using End Sub
Private Sub ColorDialogHelpRequested(ByVal sender As Object, ByVal e As System.EventArgs) ' sender は ColorDialog オブジェクトになります。 MessageBox.Show("好きな色を選んでください") End Sub End Class

投稿日時 : 2006年12月13日 10:43

Feedback

# rlJPylIgmwrjZ 2014/08/04 3:52 http://crorkz.com/

NUjZdQ Great article.Much thanks again. Keep writing.

# nVoBzPCErEdRO 2014/09/06 23:02 http://superandroides.com/2014/06/tubemate-v-2-2-3

I have fun with, cause I found exactly what I was taking a look for. You've ended my 4 day long hunt! God Bless you man. Have a great day. Bye

# sUeCVgWyGwxxLXpbXwF 2014/09/09 18:05 http://Viralfusion.com

you might have a great blog here! would you wish to make some invite posts on my blog?

# eIiHrgiHfmMkPcY 2014/09/15 4:36 http://munservis.mirniy.ru/user/bpcoeaebpoieuc/

Very good blog post.Much thanks again. Awesome.

# zHRYEgYixW 2018/12/20 12:33 https://www.suba.me/

R1SKq9 You ave made some good points there. I looked on the web for more information about the issue and found most individuals will go along with your views on this website.

# RiazstcfpbNYtdXfKQ 2019/04/19 16:08 https://www.suba.me/

tl9GfT Some genuinely great info , Sword lily I observed this.

# SCXscfClzH 2019/04/26 20:07 http://www.frombusttobank.com/

in the early hours in the dawn, because i love to gain knowledge of more and more.

# FrpSwKxGgdKdp 2019/04/26 21:29 http://www.frombusttobank.com/

Your golfing ask to help you arouse your recollection along with improve the

# UZFXvmlsklhh 2019/04/28 1:55 https://is.gd/vJucoo

Looking forward to reading more. Great blog.Really looking forward to read more. Really Great.

# GlbvKmVOYKxsKoCIRKj 2019/04/28 3:22 http://bit.ly/2v3xlzV

This design is steller! You definitely know how to keep

# sZOHFdlGQbKO 2019/05/01 19:45 http://enminteractive.com/__media__/js/netsoltrade

Im thankful for the blog post.Thanks Again. Keep writing.

# SijorPGJKyid 2019/05/02 2:49 http://job.gradmsk.ru/users/bymnApemy439

pretty helpful material, overall I think this is well worth a bookmark, thanks

# KrZBBDxWcDZTkC 2019/05/02 16:39 http://www.facebook-danger.fr/userinfo.php?uid=789

Very neat article post.Much thanks again. Much obliged.

# gJnEzorJYIFF 2019/05/02 20:33 https://www.ljwelding.com/hubfs/tank-fit-up-bed-sy

Very good article. I will be dealing with many of these issues as well..

# mmUaoorHrIP 2019/05/03 3:53 http://baystatesavingsbank.tv/__media__/js/netsolt

Thanks a lot for the article post.Really looking forward to read more. Much obliged.

# sVvOzOBvecALpgm 2019/05/03 10:42 http://bgtopsport.com/user/arerapexign190/

what you have beаА а?а?n dаА аБТ?аА а?а?aming of.

# XpfTxSyCgZoNbHE 2019/05/03 15:15 https://www.youtube.com/watch?v=xX4yuCZ0gg4

It is really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us informed like this. Thanks for sharing.

# CPstzqYYbVzDOYCCyfE 2019/05/03 20:12 https://mveit.com/escorts/united-states/houston-tx

Wow, great blog.Really looking forward to read more.

# UzIosvBxhWBp 2019/05/03 22:07 https://mveit.com/escorts/united-states/los-angele

Well I definitely liked reading it. This tip procured by you is very effective for accurate planning.

# zuysWBTtDJyHzONBmD 2019/05/03 22:25 http://charliemarie.net/__media__/js/netsoltradema

Wow, great article post.Really looking forward to read more. Keep writing.

# aJdfzAcODxQYidM 2019/05/04 4:05 https://www.gbtechnet.com/youtube-converter-mp4/

Wow, awesome weblog layout! How long have you ever been running a blog for?

# XCoJDEzcWifkyBiE 2019/05/07 15:39 https://www.newz37.com

Spot on with this write-up, I absolutely feel this site needs a lot more attention. I all probably be back again to see more, thanks for the advice!

# uBaRWetFptHz 2019/05/07 17:36 https://www.mtcheat.com/

You have made some really good points there. I checked on the net to learn more about the issue and found most people will go along with your views on this site.

# GBoDHidVyacFUcX 2019/05/08 19:50 https://ysmarketing.co.uk/

Wow, great post.Really looking forward to read more. Want more.

# gkcZKaZdqGcMYjuCep 2019/05/08 22:09 https://www.plurk.com/p/na4861

You made some good points there. I looked on the internet for the subject and found most guys will approve with your website.

# JSgEWIUyyBfiFVKQs 2019/05/08 22:47 https://www.youtube.com/watch?v=xX4yuCZ0gg4

This blog is really awesome and diverting. I have found many helpful stuff out of it. I ad love to return again soon. Cheers!

# hsnmuqoRHKDIvFIrYV 2019/05/09 0:06 http://blog.meta.ua/~misbahdickinson/posts/i632842

I think this is a real great blog article.Thanks Again. Great.

# bvutpswnLXgwxjj 2019/05/09 1:17 https://www.youtube.com/watch?v=Q5PZWHf-Uh0

It as really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.

# OgCbbYcWFDoJzMC 2019/05/09 2:26 https://alfredhines.webs.com/

Well I definitely liked reading it. This subject procured by you is very useful for accurate planning.

# EFAGPGdJXpsYsWLAwbo 2019/05/09 6:11 https://www.youtube.com/watch?v=9-d7Un-d7l4

What as up to all, for the reason that I am truly keen of reading this website as post to be updated regularly. It carries good information.

# DRKeiQEessPF 2019/05/09 8:40 https://amasnigeria.com

We all speak a little about what you should speak about when is shows correspondence to simply because Maybe this has more than one meaning.

# PxepDnEaSUWkTJkxBG 2019/05/09 8:42 http://www.skyads.aero/author/aspenpark/

Nonetheless, I am definitely pleased I came across

# yJvOCXviBpWGOWqf 2019/05/09 17:18 https://www.mjtoto.com/

Major thanks for the blog.Much thanks again.

# wNgYYgpFJVNgEXS 2019/05/09 21:20 https://www.sftoto.com/

I truly appreciate this blog. Keep writing.

# eHsrrTdOkcMyrNtY 2019/05/09 23:31 https://www.ttosite.com/

logiciel gestion finance logiciel blackberry desktop software

# wFGFzUCmlwdGRnT 2019/05/10 5:50 https://disqus.com/home/discussion/channel-new/the

You made some good points there. I did a search on the issue and found most people will go along with with your website.

# SBXWkpYBnaB 2019/05/10 6:21 https://bgx77.com/

Useful information for all Great remarkable issues here. I am very satisfied to look your article. Thanks a lot and i am taking a look ahead to touch you. Will you kindly drop me a e-mail?

# nSaJqhScSIPfB 2019/05/10 8:01 https://rehrealestate.com/cuanto-valor-tiene-mi-ca

It as hard to find experienced people about this topic, however, you seem like you know what you are talking about! Thanks

# eLNEmZrtXxDxdzDmUA 2019/05/10 13:28 https://argentinanconstructor.home.blog/

please pay a visit to the web sites we follow, like this one particular, as it represents our picks in the web

# OOAEWTbTITXnQdKvTw 2019/05/10 18:45 https://cansoft.com

You could definitely see your enthusiasm in the work you write. The world hopes for more passionate writers like you who aren at afraid to say how they believe. Always go after your heart.

# lzpTxtfMNWrEvAd 2019/05/10 20:51 http://adfoc.us/x71610768

Lovely blog! I am loving it!! Will be back later to read some more. I am taking your feeds also

# tCPLtvMxxmpMFXabXqA 2019/05/11 4:21 https://www.mtpolice88.com/

I value the blog article.Much thanks again.

# TInePkkErgEZDh 2019/05/11 6:05 http://madmedic.com/__media__/js/netsoltrademark.p

Wanted to drop a remark and let you know your Rss feed isnt working today. I tried including it to my Google reader account but got nothing.

# DgYRXMajtJVd 2019/05/11 8:11 http://wheelchairtennis.org/__media__/js/netsoltra

Major thankies for the post.Much thanks again. Really Great.

# fcKMJdxAqjCS 2019/05/12 19:57 https://www.ttosite.com/

merchandise available boasting that they will cause you to a millionaire by the click on of the button.

# qAyXObSPvLDVOOKM 2019/05/12 21:38 https://www.sftoto.com/

Really informative article.Really looking forward to read more. Want more.

# bRSsmDjlSQvXH 2019/05/12 23:43 https://www.mjtoto.com/

Major thankies for the article.Really looking forward to read more. Really Great.

# RJXKLgrShbwqDTvbIE 2019/05/14 4:08 http://sugarclass01.xtgem.com/__xt_blog/__xtblog_e

You ought to really control the comments listed here

# ylkTnuEfKLRzZZ 2019/05/14 7:12 http://ts-encyclopedia.theosophy.world/index.php/T

Major thankies for the blog post.Much thanks again. Awesome.

# HySAtzzNJq 2019/05/14 11:38 http://www.mefeedia.com/watch/70884949

It as nearly impossible to find educated people on this subject, but you seem like you know what you are talking about! Thanks

# hDdnJpLpjnVOMQFrfoo 2019/05/14 15:51 http://medina5480ld.journalwebdir.com/step-4-choos

time as looking for a similar topic, your website came up, it seems good.

# kDIDDOpAZRvcsP 2019/05/14 18:04 https://www.dajaba88.com/

Real wonderful info can be found on blog.

# PAplOkZIrqixRWm 2019/05/14 19:39 http://emile5705po.tutorial-blog.net/such-lips-inv

Spot on with this write-up, I really suppose this website needs much more consideration. I?ll most likely be again to read much more, thanks for that info.

# RYWtwOVtJRTEAAgTx 2019/05/15 0:50 https://www.mtcheat.com/

Wow, wonderful blog structure! How long have you been running a blog for? you make running a blog look easy. The entire glance of your website is magnificent, let alone the content!

# DTQUWmIOAfJ 2019/05/15 3:23 http://www.jhansikirani2.com

It was hard It was hard to get a grip on everything, since it was impossible to take in the entire surroundings of scenes.

# dtIJIPqIIsm 2019/05/15 7:15 http://freebookmarkidea.info/story.php?title=aba-s

This is my first time visit at here and i am actually pleassant to read everthing at one place.

# ydSXZUfoXuosgG 2019/05/15 20:21 http://009.kharkov.com/raskrutka/chistka_konditsio

Just wanna admit that this is invaluable , Thanks for taking your time to write this.

# cuUHcNsXfSSonw 2019/05/16 23:10 http://golosnadezhdi.ru/bitrix/rk.php?goto=http://

Wonderful post! We will be linking to this great content on our site. Keep up the good writing.

# WXywcoSaKxEOuaSLv 2019/05/16 23:10 https://www.mjtoto.com/

It as not that I want to replicate your web page, but I really like the design. Could you tell me which style are you using? Or was it tailor made?

# iWVuETzVaOuB 2019/05/17 1:49 https://www.sftoto.com/

Thanks for helping out, superb info. а?а?а? Hope is the denial of reality.а? а?а? by Margaret Weis.

# nzcRFVYdbdNrNOhShlP 2019/05/17 2:18 http://all4webs.com/swantable5/dnfawdzohf170.htm

There is visibly a bunch to realize about this. I believe you made certain good points in features also.

# fLrXCUooZKXncbtt 2019/05/17 3:56 https://www.ttosite.com/

Loving the info on this web site, you may have carried out outstanding job on the website posts.

# pNGXCaUWZqCEed 2019/05/18 2:17 https://tinyseotool.com/

I simply could not depart your website before suggesting that I really enjoyed the usual information a person supply to your visitors? Is going to be again regularly in order to check up on new posts.

# PGsCbHgfYWwhJ 2019/05/18 7:09 https://totocenter77.com/

I think this is a real great blog.Thanks Again. Awesome.

# pHdZktxCxKXUm 2019/05/18 9:15 https://bgx77.com/

Spot on with this write-up, I absolutely feel this site needs a lot more attention. I all probably be back again to see more, thanks for the advice!

# mxMeRmTHpKp 2019/05/18 10:57 https://www.dajaba88.com/

That is a very good tip particularly to those new to the blogosphere. Simple but very accurate info Many thanks for sharing this one. A must read post!

# TCVswxpEmQgdomOj 2019/05/18 13:01 https://www.ttosite.com/

Im thankful for the article post. Fantastic.

# YgCQaskMpwY 2019/05/20 16:43 https://nameaire.com

My brother suggested I might like this blog. He was totally right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!

# sdGSdeRTowopKxzag 2019/05/21 1:56 http://qualityfreightrate.com/members/pvchawk53/ac

Looking forward to reading more. Great blog post. Really Great.

# xKxCNgvgYEirbFSnj 2019/05/21 3:04 http://www.exclusivemuzic.com/

It as fantastic that you are getting ideas from this paragraph as well as from our dialogue made here.

# MegbClnVNbxPCtZ 2019/05/21 21:23 https://nameaire.com

They are added for the price in the house, deducted at the closing and paid directly towards the bank my website for example, if you might be in need for cash

タイトル  
名前  
Url
コメント