主婦と.NETと犬のぶろぐ

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

目次

Blog 利用状況

ニュース

書庫

日記カテゴリ

GroupBox(System.Windows.Forms.GroupBox)

VB6.0 の時からお世話になってるコントロールです。
.NET Framework2.0 だと、AutoSize なるプロパティがあります。
今回はそいつで遊んでみました。


あと、関係ないんですけども、HTML で GroupBox っぽいのを実現するタグの名前をいつも忘れるので
メモ。fieldset(とほほのWWW入門)

ふじことえでんとかの人気投票 ふじこ
えでん
オット

■参考文献
GroupBox コントロール (Windows フォーム)
GroupBox クラス
AutoSizeMode 列挙体

■実行画像
AutoSize=False
GroupBox AutoSize=False
AutoSize=True
GroupBox AutoSize=True

Public Class GroupBoxTest

Private Sub GroupBoxTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList ' AutoSizeMode With Me.ComboBox1.Items .Add(System.Windows.Forms.AutoSizeMode.GrowAndShrink) .Add(System.Windows.Forms.AutoSizeMode.GrowOnly) End With
' 現在の GroupBox の値を ComboBox に設定 Me.CheckBox1.Checked = Me.GroupBox1.AutoSize Me.ComboBox1.Enabled = Me.CheckBox1.Checked Me.ComboBox1.SelectedItem = Me.GroupBox1.AutoSizeMode ' ComboBox が変更されたら、その値を GroupBox のプロパティに反映する AddHandler ComboBox1.SelectedIndexChanged, AddressOf Me.SetComboBoxValueToGroupBox
' Control を詰め込む。 For index As Integer = 1 To 10 Dim chk As CheckBox = New CheckBox() chk.Text = index.ToString() chk.Location = New Point(10, 20 * (index - 1) + 15) Me.GroupBox1.Controls.Add(chk) Next Me.GroupBox1.Text = "ふじことえでん~♪" End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Me.ComboBox1.Enabled = Me.CheckBox1.Checked Me.SetComboBoxValueToGroupBox(sender, EventArgs.Empty) End Sub
' ComboBox とかの値を GroupBox の該当プロパティにセットする Private Sub SetComboBoxValueToGroupBox(ByVal sender As Object, ByVal e As System.EventArgs) Me.GroupBox1.AutoSize = Me.CheckBox1.Checked If Me.GroupBox1.AutoSize AndAlso Not Me.ComboBox1.SelectedItem Is Nothing Then Me.GroupBox1.AutoSizeMode = DirectCast(Me.ComboBox1.SelectedItem, AutoSizeMode) End If End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '' GroupBox 内の CheckBox の状態を一覧出力 'For Each ctrl As Control In Me.GroupBox1.Controls ' If TypeOf (ctrl) Is CheckBox Then ' Dim chk As CheckBox = DirectCast(ctrl, CheckBox) ' System.Diagnostics.Debug.WriteLine(chk.Text & ":" & chk.Checked.ToString()) ' End If 'Next
' 現在の GroupBox の大きさを表す四角形を描画 Dim rect As Rectangle = Me.GroupBox1.DisplayRectangle System.Diagnostics.Debug.WriteLine("Rectangle_H:" & rect.Size.Height.ToString()) System.Diagnostics.Debug.WriteLine("Rectangle_W:" & rect.Size.Width.ToString()) System.Diagnostics.Debug.WriteLine("GroupBox_H:" & Me.GroupBox1.Size.Height.ToString()) System.Diagnostics.Debug.WriteLine("GroupBox_W:" & Me.GroupBox1.Size.Width.ToString()) End Sub End Class

投稿日時 : 2007年1月23日 12:44

Feedback

# HVIHVWRXsTTZuRlhGP 2014/08/27 23:21 http://crorkz.com/

oYHzCf You must participate in a contest for probably the greatest blogs on the web. I'll suggest this website!

# kBuDRTqLjiQE 2014/08/29 7:08 http://podle.pl/

I've read a few good stuff here. Definitely worth bookmarking for revisiting. I surprise how much effort you put to make such a magnificent informative web site.

# VizgdJpXpAwNOZGXPfS 2014/08/29 12:02 http://nubiadesign.com/blog/

Very good written story. It will be useful to everyone who employess it, including me. Keep doing what you are doing - i will definitely read more posts.

# LASjKjenAq 2014/08/29 12:49 http://www.fiverr.com/ioliru/submit-200-search-eng

I appreciate you sharing this post.Really looking forward to read more. Awesome.

# BoAxJOShqdMvkD 2014/08/29 18:30 http://www.nicolasandasp.com

Wow, great post.Thanks Again. Fantastic.

# DXYDukLosdy 2014/08/29 19:38 http://criminallawyersottawa.com

This web page is really a stroll-by for all the information you needed about this and didn't know who to ask. Glimpse here, and you'll definitely discover it.

# MVbDvIplxmcxsUKXrp 2014/08/30 18:25 http://junestem56.artician.com/portfolio/Tips-to-g

Really appreciate you sharing this blog.Really looking forward to read more. Much obliged.

# bRnUPXREikvFyc 2014/08/30 22:06 http://www.m88so.com/Main/Home.aspx?affiliateId=97

Super-Duper blog! I am loving it!! Will come back again. I am taking your feeds also.

# CInWKBwxvzhaOktdF 2014/08/30 23:22 https://www.youtube.com/watch?v=CX-BtyBKO8Q

Wonderful blog! I found it while surfing around on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Cheers

# tUVDyTEciZEiomwNNaq 2014/09/01 18:17 http://www.99polls.com/profile_3130510

I value the blog post. Much obliged.

# xyRhEhmlBJZPF 2014/09/01 20:55 https://kupayedili.com

I think this is a real great blog article. Want more.

# ZmiPEHVmXzsQboQuAP 2014/09/02 15:07 http://www.linksanie.com/story/19357/

Im thankful for the blog article.Much thanks again. Fantastic.

# HTUtQRJTYdmJtOD 2014/09/02 17:13 http://www.youtube.com/watch?v=PA2nOMeYB9s

wow, awesome blog post. Much obliged.

# UjFGfjBMneFREYkE 2014/09/02 17:34 http://www.dardarkom.com/user/Caundacravao2v/

Im obliged for the blog article.Really looking forward to read more. Great.

# qAFsekRIoHiB 2014/09/02 23:44 http://www.demalenpeor.es/story.php?title=garcinia

Thanks so much for the blog article.Thanks Again. Will read on...

# cyCUEnSRslwdiF 2014/09/03 7:07 http://n-haus.com/jcow/index.php?p=blogs/viewstory

I really enjoy the blog.Much thanks again. Will read on...

# XemVcwgNTaaHeqPdx 2014/09/03 9:32 http://hotmailcorreobandejadeentrada.wordpress.com

Thanks for sharing, this is a fantastic blog. Fantastic.

# pPwmoxjAgFj 2014/09/04 18:38 http://netishin.e-u.in.ua/user/dneedicgcbirgb/

Thanks-a-mundo for the article post.Really looking forward to read more. Fantastic.

# FTqCaNHTFTY 2014/09/04 23:03 http://www.sanmarcosweightloss.com

This is one awesome article.Much thanks again. Keep writing.

# ZeasSSrynnba 2014/09/05 20:01 http://alpenforum.forumsmotion.com/f1-forum

I just couldn't depart your web site before suggesting that I actually enjoyed the standard info a person provide for your visitors? Is going to be back often in order to check up on new posts

# CihyFEOWcRwIcSCF 2014/09/06 20:52 http://metrocontests.com

I have learn several excellent stuff here. Definitely value bookmarking for revisiting. I surprise how much effort you put to create any such fantastic informative site.

# xkEIKGJaDphCRA 2014/09/06 22:09 http://superandroides.com/2014/06/tubemate-v-2-2-3

I've read some good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to make such a wonderful informative site.

# RMdyAvFOqjqMMqUdfg 2014/09/07 1:42 http://appliancespart.net/

Thanks for the article post.Thanks Again. Much obliged.

# qRibdqODlSItt 2014/09/08 9:31 http://theboatonlinestore.es/

Wow, great blog post.Really looking forward to read more. Will read on...

# yltezisHhZy 2014/09/08 15:27 http://bamadollar.info/story/22281

Thanks so much for the article post.Much thanks again. Great.

# MZDoGzkmceYIBIoiiF 2014/09/08 18:07 http://www.arrasproperties.com/

Hi my loved one! I wish to say that this post is amazing, great written and include almost all vital infos. I'd like to look extra posts like this .

# yHvhJGiKZcXFew 2014/09/08 18:31 http://kinowarez.com/user/groeuiiaucnrcr/

Awesome blog post. Keep writing.

# sJNDYMsLaRULREUfT 2014/09/08 20:16 http://healthdelivery.info/story.php?id=72792

I really like and appreciate your article.Much thanks again. Fantastic.

# YDlmzPaQvVLJJPtayMa 2014/09/08 23:04 https://www.youtube.com/watch?v=mSbbytrVLHY

Thanks a bunch for sharing this with all of us you actually know what you're talking about! Bookmarked. Please also visit my web site =). We could have a link exchange agreement between us!

# teYCUylIAByIP 2014/09/09 1:07 http://fbb15ofi0baraq7hhb4jnjpw7s.hop.clickbank.ne

Looking forward to reading more. Great blog article. Great.

# ORbuzJkmJM 2014/09/09 7:23 http://ecommerce-investments.com/

Im thankful for the blog article. Great.

# MJjUVhdEPM 2014/09/09 7:29 http://vendere-su-internet.com/luis-souto/

Would you be interested by exchanging hyperlinks?

# GedzdMKNdXohEcnd 2014/09/09 10:34 http://vender-na-internet.com/luis-souto/

It's hard to find educated people on this topic, but you sound like you know what you're talking about! Thanks

# HNVQsGCpapZH 2014/09/09 12:06 http://vente-sur-internet.com/

Hi, i believe that i noticed you visited my blog thus i came to ???go back the want???.I'm trying to to find things to improve my web site!I assume its good enough to make use of some of your ideas!!

# eLPOgiAcnIirkOhqNd 2014/09/09 21:00 http://www.designingdigitally.com

fantastic points altogether, you just gained a new reader. What would you suggest in regards to your post that you made a few days ago? Any positive?

# AnsdJTIVjARZ 2014/09/10 0:48 http://www.marshallspetzone.com

Im thankful for the article post.Much thanks again. Keep writing.

# QLliTeRuKOaQLh 2014/09/10 17:13 http://fatherptc.info/story/18488

Thanks a lot for the blog.Thanks Again. Much obliged.

# JONgQmsXzBNQuhQeDD 2014/09/10 18:48 http://www.dardarkom.com/user/yrbbbupecoarnp/

Im thankful for the article.Thanks Again. Keep writing.

# sfJTzFAGtXqLYKMFzEX 2014/09/10 20:24 http://munservis.mirniy.ru/user/bryngyybayydoe/

Thanks for sharing, this is a fantastic post. Much obliged.

# tLlGkcpzPaNmRH 2014/09/11 3:21 http://www.sankakucomplex.com/members/pingfront1/p

Very good blog article.Much thanks again. Fantastic.

# RltRREZeEGpLqIxV 2014/09/11 4:58 http://www.securiteaerienne.net/uprofile.php?UID=1

This is one awesome blog post. Great.

# vmyFwGWqYAnqx 2014/09/11 6:35 http://businessmd.net/news/deer-hunter-2014-cheats

Really appreciate you sharing this blog article. Will read on...

# JsugesgnWnncXGArxBw 2014/09/11 9:42 http://wiki.shol.ru/index.php?title=Top_Six_Top_re

Major thankies for the article post.Thanks Again. Fantastic.

# vrOJtzPKIoIq 2014/09/11 16:05 http://pco.org.br/wiki/index.php?title=Temple_Run_

Awesome article post.

# VcSqlfqhGWG 2014/09/11 18:41 http://www.optimiseonline.com.au/

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

# LyVqsJiHSQqmV 2014/09/11 20:05 http://viralquake.com/category/entertainment/

This is one awesome blog article. Really Great.

# PZRfUYgshMDrRlwnY 2014/09/11 22:25 http://www.stolennudeselfies.com/

Thanks again for the article. Awesome.

# TpLVjjBmbbJkVH 2014/09/12 1:35 http://www.bookjetty.com/forums/6/topics/71700?pos

Im grateful for the post.Much thanks again. Awesome.

# ADoBvAJmundNabiV 2014/09/12 14:44 http://hiprecallattorney.info/story.php?id=29085

wow, awesome blog.Much thanks again. Awesome.

# GrzewCyUShc 2014/09/12 18:25 http://munservis.mirniy.ru/user/yipbieuoudgndc/

I appreciate you sharing this article.Thanks Again. Much obliged.

# maYLbtdsQchDDBj 2014/09/12 19:31 http://www.youtube.com/watch?v=6eoaR-4GvzQ

I have read a few good stuff here. Certainly worth bookmarking for revisiting. I surprise how much attempt you place to make any such great informative web site.

# PHxJPpumRcVDDPcf 2014/09/13 0:37 http://www.kutsenko.ru/forum/index.php?showuser=43

This is one awesome post.Much thanks again. Will read on...

# jSxADyCmAByPgqID 2014/09/13 2:09 http://kinowarez.com/user/iyuibdraadcynn/

Fantastic blog article.Thanks Again. Fantastic.

# zyIbqlPITYoLRWhOug 2014/09/14 17:44 http://www.escortsinlondon.tv/

Excellent web site. A lot of useful info here. I'm sending it to a few buddies ans additionally sharing in delicious. And obviously, thanks on your sweat!

# nXwfTPjnjmUAJOUC 2014/09/15 1:31 http://www.cantpayloan.com

Fantastic blog article.Thanks Again. Awesome.

# dRVgccPTMbcx 2014/09/15 6:36 http://www.dahuasecurity.com/hdcvi/forum/profile.p

Very good blog post.Much thanks again. Will read on...

# oNIcWFdbMItCH 2014/09/15 7:05 http://www.theboatonlinestore.es/index.php?main_pa

You can certainly see your expertise in the work you write. The world hopes for even more passionate writers like you who are not afraid to say how they believe. Always go after your heart.

# iaOkVfBlyPOEsvoW 2014/09/15 8:07 http://www.theboatonlinestore.com/

Very neat post.Thanks Again. Keep writing.

# RbgKwGdhASUqVKncxzb 2014/09/15 8:45 http://www.theboatonlinestore.co.uk/

I simply could not depart your website before suggesting that I extremely enjoyed the standard information a person supply in your visitors? Is gonna be again often in order to inspect new posts

# STmPnUDPYHUC 2014/09/15 10:24 http://www.theboatonlinestore.com/

You can definitely see your expertise in the work you write. The world hopes for even more passionate writers like you who are not afraid to say how they believe. Always go after your heart.

# qxKFZMXqtZGSMDC 2014/09/15 15:17 http://httpadoniaeyetherapy.info/story/21733

Hey, thanks for the blog.Really looking forward to read more. Great.

# pnHMXsnXRFD 2014/09/15 16:48 https://www.youtube.com/watch?v=TwvstEk_Ljg

Thanks so much for the blog post. Great.

# HBgPwLzfUW 2014/09/15 20:15 http://www.youtube.com/watch?v=5nzvSvzYFfA

I truly appreciate this blog post.Much thanks again. Will read on...

# fvvItXXPOYLgyX 2014/09/15 23:46 http://www.india-result.in/

wow, awesome blog article.Thanks Again. Awesome.

# kyEOHmdAnkYavctO 2014/09/16 7:22 http://ecommerce-investments.com/

I like what you guys are up too. Such clever work and reporting! Keep up the excellent works guys I have incorporated you guys to my blogroll. I think it will improve the value of my website :)

# egXUwSGaUvjBDNHbGz 2014/09/16 8:03 http://ecommerce-for-business.com/

I've read some good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to create such a wonderful informative web site.

# nunhvhOeLJORkZio 2014/09/16 15:41 http://easycreditrepairs.wordpress.com/

I value the article.Much thanks again. Keep writing.

# vjIsjgMcFRRG 2014/09/16 19:03 http://digitalmarketinghive.com/dan-brown-anthony-

Hey, thanks for the blog.Really looking forward to read more. Awesome.

# oEEADdcqdPcP 2014/09/17 7:48 http://www.theboatonlinestore.com/

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

# scWKwkbGHVAKwQUY 2014/09/17 17:32 https://local.amazon.com/south-orange-county/B00NF

I am very happy to read this. This is the type of manual that needs to be given and not the random misinformation that's at the other blogs. Appreciate your sharing this best doc.

# mwORGkpiwcjzhvIaMRP 2014/09/17 21:23 http://vsevklucheno.net/user/ndodbucyiaouci/

I appreciate you sharing this article post.Really looking forward to read more. Much obliged.

# IXgFrjeUrjWhBwm 2014/09/17 22:46 http://youtu.be/g68g0W6gbIc

Hello there, You have performed an excellent job. I will definitely digg it and in my view suggest to my friends. I am sure they will be benefited from this site.

# vMRoppRtGQHDc 2014/09/18 0:55 http://www.taiwaner.de/xoops2/userinfo.php?uid=601

Very neat blog article.

# INXVPREFTBREQy 2014/09/18 4:07 http://mindquestkids.com/?p=21850

Thanks a lot for the blog.Thanks Again. Will read on...

# lqjmHwDBxNFdPZSj 2014/09/18 7:01 http://www.wattpad.com/71461118-about-buying-fifa-

I truly appreciate this post. Great.

# ArxoBrHCoA 2014/09/18 15:16 http://trail-gear.ca

Looking forward to reading more. Great blog article.Really looking forward to read more. Keep writing.

# nzoWLuusbIizTvgmwv 2014/09/18 18:39 https://www.youtube.com/watch?v=YLPGYphyJ2s

Looking forward to reading more. Great blog.Much thanks again. Fantastic.

# lIifjwlsIKcuDxW 2014/09/18 22:03 http://youtu.be/9im_Z9iN_XA

Im thankful for the article post. Much obliged.

# 0 2017/02/24 11:21 If you might be a beginner, it's best to select a

If you might be a beginner, it's best to select a full sole because they provide extra support to
the foot which help it easier to educate yourself on the basic jazz dance steps.

Looking on the footwear you will not realise that the shoes are anything apart from performance sports trainers.
It can be very easy to get an injury whilst undertaking a dance
routine and several from the reasons behind these injuries arise from poor fitting or substandard dance sneakers.

# 0 2017/03/04 7:41 You will need either a purse organizer insert or s

You will need either a purse organizer insert or several zippered pouches to get
started. For example, a messenger bag works perfectly;
you may also go with a handbag which has longer straps.
The closer the weight of one's bag is to
the handle, the less pull will likely be exerted in your arm and shoulder.

タイトル  
名前  
Url
コメント