📄 program.vb
字号:
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Namespace CodeForChapter2
Friend Class Program
''' <summary>
''' The main entry point for the application.
''' </summary>
Private Sub New()
End Sub
<MTAThread> _
Shared Sub Main()
'Application.Run(new frmDocListSoftKeys());
'Application.Run(new frmMenuPlusToolbar());
'Application.Run(new frmSquare());
'Application.Run(new frmBaseWithSIP());
'Application.Run(new frmBrokenChild());
'Application.Run(new frmMain());
Application.Run(New frmDockAnchor())
End Sub
Friend Shared ScaleFactor As Single = 1
End Class
#Region "Scaling"
'Friend Class Program
' ''' <summary>
' ''' The main entry point for the application.
' ''' </summary>
' Private Sub New()
' End Sub
' <MTAThread()> _
' Shared Sub Main()
' Dim f As New frmScaling()
' Const designResolution As Single = 96.0 'typical
' System.Drawing.Graphics(g = f.CreateGraphics())
' Dim runningResolution As Single = g.DpiX 'g.DpiY will return the same value
' ScaleFactor = runningResolution / designResolution
' g.Dispose()
' Application.Run(f)
' End Sub
' ' // multiply all custom drawing with Program.ScaleFactor
' ' // most of the time this will have one of 3 values
' ' // 1 , when we designed for exactly what we run on
' ' // 2 , when we designed for 96 dpi but we are running on 192
' ' // 1.365, when we designed for 96 dpi but we are running on 131 (qvga smartphone)
' Friend Shared ScaleFactor As Single
'End Class
#End Region
End Namespace
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -