c# 언어/초급과정
Tris Width:Height(7:4), 기준:this.Height - this.ClientRectangle.Height
여린완자
2022. 3. 28. 14:52
/*
namespace:System
Int To Double -> Convert.ToDouble(int or double)
Double to Int -> Convert.ToInt32(double)
*/
class TrisWidthHeight : Form
{
int titledepth, widthdepth, heightdepth;
public TrisWidthHeight()
{
titledepth = this.Height - this.ClientRectangle.Height;
titlewidth = Convert.ToInt32(Convert.ToDouble(titledepth / 10.0)) * 7
titleheight = Convert.ToInt32(Convert.ToDouble(titledepth / 10.0)) * 4
this.Width = titlewidth;
this.Height = titleheight;
}