• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

デュアルディスプレイのセカンドモニターにPDF、動画、画像を表示。


Commit MetaInfo

Revision29 (tree)
Time2017-11-12 21:50:15
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- pdfsecondmonitor/My Project/Settings.Designer.vb (revision 28)
+++ pdfsecondmonitor/My Project/Settings.Designer.vb (revision 29)
@@ -92,15 +92,27 @@
9292
9393 <Global.System.Configuration.UserScopedSettingAttribute(), _
9494 Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
95- Global.System.Configuration.DefaultSettingValueAttribute("")> _
96- Public Property 設定() As String
95+ Global.System.Configuration.DefaultSettingValueAttribute("0")> _
96+ Public Property nudHeight() As Integer
9797 Get
98- Return CType(Me("設定"),String)
98+ Return CType(Me("nudHeight"),Integer)
9999 End Get
100100 Set
101- Me("設定") = value
101+ Me("nudHeight") = value
102102 End Set
103103 End Property
104+
105+ <Global.System.Configuration.UserScopedSettingAttribute(), _
106+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
107+ Global.System.Configuration.DefaultSettingValueAttribute("0")> _
108+ Public Property nudWidth() As Integer
109+ Get
110+ Return CType(Me("nudWidth"),Integer)
111+ End Get
112+ Set
113+ Me("nudWidth") = value
114+ End Set
115+ End Property
104116 End Class
105117 End Namespace
106118
--- pdfsecondmonitor/frmOperation.vb (revision 28)
+++ pdfsecondmonitor/frmOperation.vb (revision 29)
@@ -27,8 +27,11 @@
2727 End Sub
2828
2929 #Region "設定値"
30+ Private loading As Boolean
3031 Private Sub AppSettingLoad()
31-
32+ loading = True
33+ nudHeight.Value = My.Settings.nudHeight
34+ nudWidth.Value = My.Settings.nudWidth
3235 cmbDisplay.SelectedIndex = My.Settings.cmbDisplaySelectedIndex
3336 cmbPDFView.SelectedIndex = My.Settings.cmbView
3437 nudPdfZoom.Value = My.Settings.nupPDFZoom
@@ -52,7 +55,7 @@
5255 Catch ex As Exception
5356 MessageBox.Show(ex.Message)
5457 End Try
55-
58+ loading = False
5659 End Sub
5760
5861 Private Sub AppSettingSave()
@@ -60,6 +63,8 @@
6063 My.Settings.cmbDisplaySelectedIndex = cmbDisplay.SelectedIndex
6164 My.Settings.cmbView = cmbPDFView.SelectedIndex
6265 My.Settings.nupPDFZoom = nudPdfZoom.Value
66+ My.Settings.nudHeight = nudHeight.Value
67+ My.Settings.nudWidth = nudWidth.Value
6368 My.Settings.Save()
6469
6570 Dim fvinfos As New List(Of fileviewInfo)
@@ -97,6 +102,7 @@
97102
98103 #Region "フォームをセカンドディスプレイに表示"
99104 Private Sub cmbDisplay_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDisplay.SelectedIndexChanged
105+
100106 If cmbDisplay.SelectedIndex < 0 Then
101107 Exit Sub
102108 End If
@@ -108,9 +114,11 @@
108114 ' 'フォームの開始位置をディスプレイの左上座標に設定する
109115 frmView.StartPosition = FormStartPosition.Manual
110116 frmView.Location = s.Bounds.Location
111- frmView.Size = s.Bounds.Size
112- nudHeight.Value = frmView.Size.Height
113- nudWidth.Value = frmView.Size.Width
117+ If Not loading OrElse nudHeight.Value = 0 Then
118+ nudHeight.Value = s.Bounds.Size.Height
119+ nudWidth.Value = s.Bounds.Size.Width
120+ End If
121+
114122 End Sub
115123
116124