update,
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
'This constant indicates whether the Application Framework is in use.
|
||||
#Const APPLICATION_FRAMEWORK = True
|
||||
|
||||
#If APPLICATION_FRAMEWORK Then
|
||||
|
||||
#If NET5_0 And Not NET6_0 Then
|
||||
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
Namespace My
|
||||
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
Public Event ApplyHighDpiMode(sender As Object, e As ApplyHighDpiModeEventArgs)
|
||||
|
||||
Private _highDpiMode As HighDpiMode?
|
||||
|
||||
Friend Shadows Property HighDpiMode As HighDpiMode
|
||||
Get
|
||||
Return If(
|
||||
_highDpiMode Is Nothing,
|
||||
Application.HighDpiMode,
|
||||
_highDpiMode.Value)
|
||||
End Get
|
||||
Set(value As HighDpiMode)
|
||||
_highDpiMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' IMPORTANT:
|
||||
' If this method causes an compilation error after you've unchecked 'Application Framework'
|
||||
' in the project properties, go to the top of this file and change the value to 'False' in this line:
|
||||
' #Const APPLICATION_FRAMEWORK = False
|
||||
|
||||
' For more about using WinForms without the Application Framework
|
||||
' see: https://aka.ms/visualbasic-appframework-net5
|
||||
Protected Overrides Function OnInitialize(commandLineArgs As ReadOnlyCollection(Of String)) As Boolean
|
||||
Dim eventArgs = New ApplyHighDpiModeEventArgs(
|
||||
If(
|
||||
_highDpiMode Is Nothing,
|
||||
HighDpiMode.SystemAware,
|
||||
_highDpiMode.Value))
|
||||
|
||||
RaiseEvent ApplyHighDpiMode(Me, eventArgs)
|
||||
|
||||
Windows.Forms.Application.SetHighDpiMode(eventArgs.HighDpiMode)
|
||||
|
||||
Return MyBase.OnInitialize(commandLineArgs)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class ApplyHighDpiModeEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Sub New(highDpiMode As HighDpiMode)
|
||||
Me.HighDpiMode = highDpiMode
|
||||
End Sub
|
||||
|
||||
Public Property HighDpiMode As HighDpiMode
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
#End If ' #If NET5_0 And Not NET6_0
|
||||
#End If ' #If APPLICATION_FRAMEWORK
|
38
it114105/others/ite3711/module_grade/My Project/Application.Designer.vb
generated
Normal file
38
it114105/others/ite3711/module_grade/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 這段程式碼是由工具產生的。
|
||||
' 執行階段版本:4.0.30319.42000
|
||||
'
|
||||
' 對這個檔案所做的變更可能會造成錯誤的行為,而且如果重新產生程式碼,
|
||||
' 變更將會遺失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'注意:這是自動產生的檔案,請勿直接修改它。若要進行變更,
|
||||
' 或者您在這個檔案發生建置錯誤,請到專案設計工具
|
||||
' (移至專案屬性或者在 [方案總管] 中按兩下 [My Project] 節點),
|
||||
' 然後在 [應用程式] 索引標籤上進行變更。
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.module_grade.Form1
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>Form1</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
Reference in New Issue
Block a user