본문 바로가기

전체 글202

DataGridview 데이터 추가 시 깜빡임 해결 *참조 선언using System.Reflection;// 클래스 선언public static class ControlHelper { public static void SetDoubleBuffered(this DataGridView ctrl, bool setting) { Type dgvType = ctrl.GetType(); PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); pi.SetValue(ctrl, setting, null); } }// 호출방법dataGr.. 2024. 7. 3.
lable 크기에 맞게 사이즈 자동 조절 Public Sub auto_fontSize_label(label As Label, ByVal text As String) label.Text = text Dim fontSize As Integer = label.Font.Size Do While (label.PreferredWidth label.Height) fontSize -= 1 label.Font = New Font("맑은 고딕", fontSize) Loop End Sub 2024. 4. 19.
textbox 사이즈에 맞게 Font 크기 자동 조정 Private Sub auto_fontSize() Dim g As Graphics = TB1.CreateGraphics() Dim textSize As SizeF = g.MeasureString(TB1.Text, TB1.Font) Dim scale As Single = Math.Min(TB1.Width / textSize.Width, TB1.Height / textSize.Height) Dim fontSize As Single = TB1.Font.Size * scale TB1.Font = New Font(TB1.Font.FontFamily, fontSize, TB1.Font.Style) End Sub textBox 컨트롤의 Graphics object를 구함 text와 font를 매개변수로 넣고 size.. 2024. 4. 19.
개인저장용 개발환경 스타일 세팅 (Theme, Font 등 ) 개요 개발환경의 스타일 일원화를 위한 세팅작업 - Theme : `Dark+` - Font family : "'Cascadia Mono', D2Coding, Consolas, 'Courier New', monospace" - Default font : `Cascadia Mono` (ligatures 제거 버전) - Font size : VS2022(11), VSCode(15), Notepad++(11, Regular), Notepad(11, Regular) - Cascadia Mono가 표시 안되는 문제 : CMD(D2Coding, 16), PowerShell(D2Coding, 16) - Font style : Regular (SemiLight도 괜찮은데 고해상도 모니터에서는 default설정인 Regu.. 2024. 4. 18.