掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ウィンドウの比率を保ちながら大きさを変えたい (ID:53592)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
'現在のウィンドウサイズ取得 NowWindowHeight = ScaleHeight NowWindowWidth = ScaleWidth '設定するウィンドウサイズ設定 SetWindowHeight = 480 SetWindowWidth = 640 For I = 0 To Me.Controls.Count - 1 If TypeName(Controls(I)) = "TextBox" Then Me.Controls(I).Height = (Me.Controls(I).Height * SetWindowHeight) / NowWindowHeight Me.Controls(I).Width = (Me.Controls(I).Width * SetWindowWidth) / NowWindowWidth Me.Controls(I).Top = (Me.Controls(I).Top * SetWindowHeight) / NowWindowHeight Me.Controls(I).Left = (Me.Controls(I).Left * SetWindowWidth) / NowWindowWidth Me.Controls(I).FontSize = (Me.Controls(I).FontSize * SetWindowHeight) / NowWindowHeight End If Next 自己レスですがこんな感じでできました。 後はフォーム自体のサイズを変えるぐらいですね。 問題あるようでしたら誰かご指摘ください
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.