본문 바로가기

VB.net106

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.
WebBrowser IE 버전 매칭 Public Function GetEmbVersion() As Integer Dim ieVer As Integer = GetBrowserVersion() If ieVer > 9 Then Return ieVer * 1000 + 1 'IE 10/11 이상 If ieVer > 7 Then Return ieVer * 1111 'IE 8/9 End Function Public Sub FixBrowserVersion() Dim appName As String = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().Location) FixBrowserVersion(appName) FixBrowserVer.. 2021. 7. 23.
스텔스 프로세스 참고 https://reversecore.com/66 API Hooking - '스텔스' 프로세스 (2) 특정 프로세스를 감추는 은폐(stealth) 기법에 대해 설명하고, 예제 파일을 통해서 실습을 해보도록 하겠습니다. 아래 내용은 이전 포스트에서 이어지는 내용입니다. ☞ API Hooking – '스텔스' 프로 reversecore.com 2021. 6. 3.