• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revision18 (tree)
Time2017-10-25 21:24:09
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- pdfsecondmonitor/My Project/Application.Designer.vb (nonexistent)
+++ pdfsecondmonitor/My Project/Application.Designer.vb (revision 18)
@@ -0,0 +1,38 @@
1+'------------------------------------------------------------------------------
2+' <auto-generated>
3+' This code was generated by a tool.
4+' Runtime Version:4.0.30319.42000
5+'
6+' Changes to this file may cause incorrect behavior and will be lost if
7+' the code is regenerated.
8+' </auto-generated>
9+'------------------------------------------------------------------------------
10+
11+Option Strict On
12+Option Explicit On
13+
14+
15+Namespace My
16+
17+ 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
18+ ' or if you encounter build errors in this file, go to the Project Designer
19+ ' (go to Project Properties or double-click the My Project node in
20+ ' Solution Explorer), and make changes on the Application tab.
21+ '
22+ Partial Friend Class MyApplication
23+
24+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
25+ Public Sub New()
26+ MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
27+ Me.IsSingleInstance = false
28+ Me.EnableVisualStyles = true
29+ Me.SaveMySettingsOnExit = true
30+ Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
31+ End Sub
32+
33+ <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
34+ Protected Overrides Sub OnCreateMainForm()
35+ Me.MainForm = Global.WindowsApp1.frmView
36+ End Sub
37+ End Class
38+End Namespace
--- pdfsecondmonitor/My Project/AssemblyInfo.vb (nonexistent)
+++ pdfsecondmonitor/My Project/AssemblyInfo.vb (revision 18)
@@ -0,0 +1,35 @@
1+Imports System
2+Imports System.Reflection
3+Imports System.Runtime.InteropServices
4+
5+' アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
6+' アセンブリに関連付けられている情報を変更するには、
7+' これらの属性値を変更してください。
8+
9+' アセンブリ属性の値を確認します
10+
11+<Assembly: AssemblyTitle("WindowsApp1")>
12+<Assembly: AssemblyDescription("")>
13+<Assembly: AssemblyCompany("")>
14+<Assembly: AssemblyProduct("WindowsApp1")>
15+<Assembly: AssemblyCopyright("Copyright © 2017")>
16+<Assembly: AssemblyTrademark("")>
17+
18+<Assembly: ComVisible(False)>
19+
20+'このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
21+<Assembly: Guid("8cb9add5-1e5b-4f00-b708-9a36f1f8de8c")>
22+
23+' アセンブリのバージョン情報は次の 4 つの値で構成されています:
24+'
25+' メジャー バージョン
26+' マイナー バージョン
27+' ビルド番号
28+' Revision
29+'
30+' すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
31+' 既定値にすることができます:
32+' <Assembly: AssemblyVersion("1.0.*")>
33+
34+<Assembly: AssemblyVersion("1.0.0.0")>
35+<Assembly: AssemblyFileVersion("1.0.0.0")>
--- pdfsecondmonitor/My Project/Resources.Designer.vb (nonexistent)
+++ pdfsecondmonitor/My Project/Resources.Designer.vb (revision 18)
@@ -0,0 +1,62 @@
1+'------------------------------------------------------------------------------
2+' <auto-generated>
3+' This code was generated by a tool.
4+' Runtime Version:4.0.30319.42000
5+'
6+' Changes to this file may cause incorrect behavior and will be lost if
7+' the code is regenerated.
8+' </auto-generated>
9+'------------------------------------------------------------------------------
10+
11+Option Strict On
12+Option Explicit On
13+
14+
15+Namespace My.Resources
16+
17+ 'This class was auto-generated by the StronglyTypedResourceBuilder
18+ 'class via a tool like ResGen or Visual Studio.
19+ 'To add or remove a member, edit your .ResX file then rerun ResGen
20+ 'with the /str option, or rebuild your VS project.
21+ '''<summary>
22+ ''' A strongly-typed resource class, for looking up localized strings, etc.
23+ '''</summary>
24+ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
25+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
26+ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
27+ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
28+ Friend Module Resources
29+
30+ Private resourceMan As Global.System.Resources.ResourceManager
31+
32+ Private resourceCulture As Global.System.Globalization.CultureInfo
33+
34+ '''<summary>
35+ ''' Returns the cached ResourceManager instance used by this class.
36+ '''</summary>
37+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
38+ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
39+ Get
40+ If Object.ReferenceEquals(resourceMan, Nothing) Then
41+ Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WindowsApp1.Resources", GetType(Resources).Assembly)
42+ resourceMan = temp
43+ End If
44+ Return resourceMan
45+ End Get
46+ End Property
47+
48+ '''<summary>
49+ ''' Overrides the current thread's CurrentUICulture property for all
50+ ''' resource lookups using this strongly typed resource class.
51+ '''</summary>
52+ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
53+ Friend Property Culture() As Global.System.Globalization.CultureInfo
54+ Get
55+ Return resourceCulture
56+ End Get
57+ Set(ByVal value As Global.System.Globalization.CultureInfo)
58+ resourceCulture = value
59+ End Set
60+ End Property
61+ End Module
62+End Namespace
--- pdfsecondmonitor/My Project/Settings.Designer.vb (revision 17)
+++ pdfsecondmonitor/My Project/Settings.Designer.vb (revision 18)
@@ -12,15 +12,16 @@
1212 Option Explicit On
1313
1414
15-
16-<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
17- Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0"), _
18- Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
19-Partial Friend NotInheritable Class Settings
20- Inherits Global.System.Configuration.ApplicationSettingsBase
15+Namespace My
2116
22- Private Shared defaultInstance As Settings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New Settings()),Settings)
23-
17+ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
18+ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0"), _
19+ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
20+ Partial Friend NotInheritable Class MySettings
21+ Inherits Global.System.Configuration.ApplicationSettingsBase
22+
23+ Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
24+
2425 #Region "My.Settings 自動保存機能"
2526 #If _MyType = "WindowsForms" Then
2627 Private Shared addedHandler As Boolean
@@ -35,10 +36,10 @@
3536 End Sub
3637 #End If
3738 #End Region
38-
39- Public Shared ReadOnly Property [Default]() As Settings
40- Get
41-
39+
40+ Public Shared ReadOnly Property [Default]() As MySettings
41+ Get
42+
4243 #If _MyType = "WindowsForms" Then
4344 If Not addedHandler Then
4445 SyncLock addedHandlerLockObject
@@ -49,34 +50,35 @@
4950 End SyncLock
5051 End If
5152 #End If
52- Return defaultInstance
53- End Get
54- End Property
55-
56- <Global.System.Configuration.UserScopedSettingAttribute(), _
57- Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
58- Global.System.Configuration.DefaultSettingValueAttribute("0")> _
59- Public Property cmbDisplaySelectedIndex() As Integer
60- Get
61- Return CType(Me("cmbDisplaySelectedIndex"),Integer)
62- End Get
63- Set
64- Me("cmbDisplaySelectedIndex") = value
65- End Set
66- End Property
67-
68- <Global.System.Configuration.UserScopedSettingAttribute(), _
69- Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
70- Global.System.Configuration.DefaultSettingValueAttribute("0")> _
71- Public Property cmbView() As Integer
72- Get
73- Return CType(Me("cmbView"),Integer)
74- End Get
75- Set
76- Me("cmbView") = value
77- End Set
78- End Property
79-End Class
53+ Return defaultInstance
54+ End Get
55+ End Property
56+
57+ <Global.System.Configuration.UserScopedSettingAttribute(), _
58+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
59+ Global.System.Configuration.DefaultSettingValueAttribute("0")> _
60+ Public Property cmbDisplaySelectedIndex() As Integer
61+ Get
62+ Return CType(Me("cmbDisplaySelectedIndex"),Integer)
63+ End Get
64+ Set
65+ Me("cmbDisplaySelectedIndex") = value
66+ End Set
67+ End Property
68+
69+ <Global.System.Configuration.UserScopedSettingAttribute(), _
70+ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
71+ Global.System.Configuration.DefaultSettingValueAttribute("0")> _
72+ Public Property cmbView() As Integer
73+ Get
74+ Return CType(Me("cmbView"),Integer)
75+ End Get
76+ Set
77+ Me("cmbView") = value
78+ End Set
79+ End Property
80+ End Class
81+End Namespace
8082
8183 Namespace My
8284
@@ -86,9 +88,9 @@
8688 Friend Module MySettingsProperty
8789
8890 <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
89- Friend ReadOnly Property Settings() As Global.pdfsecondmonitor.Settings
91+ Friend ReadOnly Property Settings() As Global.WindowsApp1.My.MySettings
9092 Get
91- Return Global.pdfsecondmonitor.Settings.Default
93+ Return Global.WindowsApp1.My.MySettings.Default
9294 End Get
9395 End Property
9496 End Module
--- pdfsecondmonitor/UserControl1.xaml.vb (nonexistent)
+++ pdfsecondmonitor/UserControl1.xaml.vb (revision 18)
@@ -0,0 +1,17 @@
1+Public Class UserControl1
2+
3+ Public Sub PlayVideo(ByVal FileName As String)
4+ me1.Source = New Uri(FileName)
5+ me1.Play()
6+
7+ End Sub
8+
9+ Public Sub StopVideo()
10+ me1.Stop()
11+ End Sub
12+
13+ Private Sub UserControl_SizeChanged(sender As Object, e As Windows.SizeChangedEventArgs)
14+ me1.Height = Me.Height
15+ me1.Width = Me.Width
16+ End Sub
17+End Class
--- pdfsecondmonitor/frmOperation.Designer.vb (revision 17)
+++ pdfsecondmonitor/frmOperation.Designer.vb (revision 18)
@@ -23,89 +23,36 @@
2323 <System.Diagnostics.DebuggerStepThrough()> _
2424 Private Sub InitializeComponent()
2525 Me.components = New System.ComponentModel.Container()
26- Me.btnPDFNext = New System.Windows.Forms.Button()
27- Me.btnPDFBack = New System.Windows.Forms.Button()
28- Me.btnOpenPDFFile = New System.Windows.Forms.Button()
29- Me.txtPDFFileName = New System.Windows.Forms.TextBox()
3026 Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
31- Me.btnPDFLast = New System.Windows.Forms.Button()
32- Me.btnPDFFirst = New System.Windows.Forms.Button()
3327 Me.cmbDisplay = New System.Windows.Forms.ComboBox()
3428 Me.Label1 = New System.Windows.Forms.Label()
29+ Me.GroupBox1 = New System.Windows.Forms.GroupBox()
30+ Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
31+ Me.tpMediaPlayer = New System.Windows.Forms.TabPage()
32+ Me.txtMediaFileName = New System.Windows.Forms.TextBox()
33+ Me.btnStartStop = New System.Windows.Forms.Button()
34+ Me.btnOpenMediaFile = New System.Windows.Forms.Button()
35+ Me.tpAdobePDF = New System.Windows.Forms.TabPage()
36+ Me.btnPDFFirst = New System.Windows.Forms.Button()
37+ Me.btnPDFLast = New System.Windows.Forms.Button()
3538 Me.cmbPDFView = New System.Windows.Forms.ComboBox()
39+ Me.txtPDFFileName = New System.Windows.Forms.TextBox()
3640 Me.Label2 = New System.Windows.Forms.Label()
41+ Me.btnPDFBack = New System.Windows.Forms.Button()
3742 Me.btnPDFFileClose = New System.Windows.Forms.Button()
38- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
43+ Me.btnPDFNext = New System.Windows.Forms.Button()
44+ Me.btnOpenPDFFile = New System.Windows.Forms.Button()
3945 Me.tbcFileOpes = New System.Windows.Forms.TabControl()
40- Me.tpAdobePDF = New System.Windows.Forms.TabPage()
41- Me.tpMediaPlayer = New System.Windows.Forms.TabPage()
42- Me.btnOpenMediaFile = New System.Windows.Forms.Button()
43- Me.btnStartStop = New System.Windows.Forms.Button()
44- Me.txtMediaFileName = New System.Windows.Forms.TextBox()
45- Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
4646 Me.GroupBox1.SuspendLayout()
47+ Me.tpMediaPlayer.SuspendLayout()
48+ Me.tpAdobePDF.SuspendLayout()
4749 Me.tbcFileOpes.SuspendLayout()
48- Me.tpAdobePDF.SuspendLayout()
49- Me.tpMediaPlayer.SuspendLayout()
5050 Me.SuspendLayout()
5151 '
52- 'btnPDFNext
53- '
54- Me.btnPDFNext.Location = New System.Drawing.Point(143, 94)
55- Me.btnPDFNext.Name = "btnPDFNext"
56- Me.btnPDFNext.Size = New System.Drawing.Size(50, 23)
57- Me.btnPDFNext.TabIndex = 2
58- Me.btnPDFNext.Text = "次へ"
59- Me.btnPDFNext.UseVisualStyleBackColor = True
60- '
61- 'btnPDFBack
62- '
63- Me.btnPDFBack.Location = New System.Drawing.Point(87, 94)
64- Me.btnPDFBack.Name = "btnPDFBack"
65- Me.btnPDFBack.Size = New System.Drawing.Size(50, 23)
66- Me.btnPDFBack.TabIndex = 2
67- Me.btnPDFBack.Text = "前へ"
68- Me.btnPDFBack.UseVisualStyleBackColor = True
69- '
70- 'btnOpenPDFFile
71- '
72- Me.btnOpenPDFFile.Location = New System.Drawing.Point(26, 16)
73- Me.btnOpenPDFFile.Name = "btnOpenPDFFile"
74- Me.btnOpenPDFFile.Size = New System.Drawing.Size(101, 23)
75- Me.btnOpenPDFFile.TabIndex = 3
76- Me.btnOpenPDFFile.Text = "ファイルを開く"
77- Me.btnOpenPDFFile.UseVisualStyleBackColor = True
78- '
79- 'txtPDFFileName
80- '
81- Me.txtPDFFileName.Location = New System.Drawing.Point(26, 45)
82- Me.txtPDFFileName.Name = "txtPDFFileName"
83- Me.txtPDFFileName.ReadOnly = True
84- Me.txtPDFFileName.Size = New System.Drawing.Size(655, 22)
85- Me.txtPDFFileName.TabIndex = 4
86- '
8752 'OpenFileDialog1
8853 '
8954 Me.OpenFileDialog1.FileName = "OpenFileDialog1"
9055 '
91- 'btnPDFLast
92- '
93- Me.btnPDFLast.Location = New System.Drawing.Point(199, 94)
94- Me.btnPDFLast.Name = "btnPDFLast"
95- Me.btnPDFLast.Size = New System.Drawing.Size(49, 23)
96- Me.btnPDFLast.TabIndex = 5
97- Me.btnPDFLast.Text = "最後へ"
98- Me.btnPDFLast.UseVisualStyleBackColor = True
99- '
100- 'btnPDFFirst
101- '
102- Me.btnPDFFirst.Location = New System.Drawing.Point(31, 94)
103- Me.btnPDFFirst.Name = "btnPDFFirst"
104- Me.btnPDFFirst.Size = New System.Drawing.Size(50, 23)
105- Me.btnPDFFirst.TabIndex = 5
106- Me.btnPDFFirst.Text = "最初へ"
107- Me.btnPDFFirst.UseVisualStyleBackColor = True
108- '
10956 'cmbDisplay
11057 '
11158 Me.cmbDisplay.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
@@ -124,34 +71,6 @@
12471 Me.Label1.TabIndex = 7
12572 Me.Label1.Text = "表示するディスプレイ"
12673 '
127- 'cmbPDFView
128- '
129- Me.cmbPDFView.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
130- Me.cmbPDFView.FormattingEnabled = True
131- Me.cmbPDFView.Items.AddRange(New Object() {"Fit", "FitH", "FitV", "FitB", "FitBH", "FitB"})
132- Me.cmbPDFView.Location = New System.Drawing.Point(97, 141)
133- Me.cmbPDFView.Name = "cmbPDFView"
134- Me.cmbPDFView.Size = New System.Drawing.Size(121, 23)
135- Me.cmbPDFView.TabIndex = 8
136- '
137- 'Label2
138- '
139- Me.Label2.AutoSize = True
140- Me.Label2.Location = New System.Drawing.Point(33, 144)
141- Me.Label2.Name = "Label2"
142- Me.Label2.Size = New System.Drawing.Size(59, 15)
143- Me.Label2.TabIndex = 9
144- Me.Label2.Text = "SetView"
145- '
146- 'btnPDFFileClose
147- '
148- Me.btnPDFFileClose.Location = New System.Drawing.Point(138, 16)
149- Me.btnPDFFileClose.Name = "btnPDFFileClose"
150- Me.btnPDFFileClose.Size = New System.Drawing.Size(105, 23)
151- Me.btnPDFFileClose.TabIndex = 10
152- Me.btnPDFFileClose.Text = "ファイルを閉じる"
153- Me.btnPDFFileClose.UseVisualStyleBackColor = True
154- '
15574 'GroupBox1
15675 '
15776 Me.GroupBox1.Controls.Add(Me.Label1)
@@ -163,16 +82,48 @@
16382 Me.GroupBox1.TabStop = False
16483 Me.GroupBox1.Text = "設定"
16584 '
166- 'tbcFileOpes
85+ 'Timer1
16786 '
168- Me.tbcFileOpes.Controls.Add(Me.tpAdobePDF)
169- Me.tbcFileOpes.Controls.Add(Me.tpMediaPlayer)
170- Me.tbcFileOpes.Location = New System.Drawing.Point(17, 89)
171- Me.tbcFileOpes.Name = "tbcFileOpes"
172- Me.tbcFileOpes.SelectedIndex = 0
173- Me.tbcFileOpes.Size = New System.Drawing.Size(768, 303)
174- Me.tbcFileOpes.TabIndex = 12
17587 '
88+ 'tpMediaPlayer
89+ '
90+ Me.tpMediaPlayer.Controls.Add(Me.btnOpenMediaFile)
91+ Me.tpMediaPlayer.Controls.Add(Me.btnStartStop)
92+ Me.tpMediaPlayer.Controls.Add(Me.txtMediaFileName)
93+ Me.tpMediaPlayer.Location = New System.Drawing.Point(4, 25)
94+ Me.tpMediaPlayer.Name = "tpMediaPlayer"
95+ Me.tpMediaPlayer.Padding = New System.Windows.Forms.Padding(3)
96+ Me.tpMediaPlayer.Size = New System.Drawing.Size(760, 274)
97+ Me.tpMediaPlayer.TabIndex = 1
98+ Me.tpMediaPlayer.Text = "wmvの再生"
99+ Me.tpMediaPlayer.UseVisualStyleBackColor = True
100+ '
101+ 'txtMediaFileName
102+ '
103+ Me.txtMediaFileName.Location = New System.Drawing.Point(15, 48)
104+ Me.txtMediaFileName.Name = "txtMediaFileName"
105+ Me.txtMediaFileName.ReadOnly = True
106+ Me.txtMediaFileName.Size = New System.Drawing.Size(655, 22)
107+ Me.txtMediaFileName.TabIndex = 14
108+ '
109+ 'btnStartStop
110+ '
111+ Me.btnStartStop.Location = New System.Drawing.Point(59, 86)
112+ Me.btnStartStop.Name = "btnStartStop"
113+ Me.btnStartStop.Size = New System.Drawing.Size(82, 23)
114+ Me.btnStartStop.TabIndex = 11
115+ Me.btnStartStop.Text = "再生する"
116+ Me.btnStartStop.UseVisualStyleBackColor = True
117+ '
118+ 'btnOpenMediaFile
119+ '
120+ Me.btnOpenMediaFile.Location = New System.Drawing.Point(15, 19)
121+ Me.btnOpenMediaFile.Name = "btnOpenMediaFile"
122+ Me.btnOpenMediaFile.Size = New System.Drawing.Size(101, 23)
123+ Me.btnOpenMediaFile.TabIndex = 13
124+ Me.btnOpenMediaFile.Text = "ファイルを開く"
125+ Me.btnOpenMediaFile.UseVisualStyleBackColor = True
126+ '
176127 'tpAdobePDF
177128 '
178129 Me.tpAdobePDF.Controls.Add(Me.btnOpenPDFFile)
@@ -192,48 +143,97 @@
192143 Me.tpAdobePDF.Text = "PDFの表示"
193144 Me.tpAdobePDF.UseVisualStyleBackColor = True
194145 '
195- 'tpMediaPlayer
146+ 'btnPDFFirst
196147 '
197- Me.tpMediaPlayer.Controls.Add(Me.btnOpenMediaFile)
198- Me.tpMediaPlayer.Controls.Add(Me.btnStartStop)
199- Me.tpMediaPlayer.Controls.Add(Me.txtMediaFileName)
200- Me.tpMediaPlayer.Location = New System.Drawing.Point(4, 25)
201- Me.tpMediaPlayer.Name = "tpMediaPlayer"
202- Me.tpMediaPlayer.Padding = New System.Windows.Forms.Padding(3)
203- Me.tpMediaPlayer.Size = New System.Drawing.Size(760, 274)
204- Me.tpMediaPlayer.TabIndex = 1
205- Me.tpMediaPlayer.Text = "wmvの再生"
206- Me.tpMediaPlayer.UseVisualStyleBackColor = True
148+ Me.btnPDFFirst.Location = New System.Drawing.Point(31, 94)
149+ Me.btnPDFFirst.Name = "btnPDFFirst"
150+ Me.btnPDFFirst.Size = New System.Drawing.Size(50, 23)
151+ Me.btnPDFFirst.TabIndex = 5
152+ Me.btnPDFFirst.Text = "最初へ"
153+ Me.btnPDFFirst.UseVisualStyleBackColor = True
207154 '
208- 'btnOpenMediaFile
155+ 'btnPDFLast
209156 '
210- Me.btnOpenMediaFile.Location = New System.Drawing.Point(15, 19)
211- Me.btnOpenMediaFile.Name = "btnOpenMediaFile"
212- Me.btnOpenMediaFile.Size = New System.Drawing.Size(101, 23)
213- Me.btnOpenMediaFile.TabIndex = 13
214- Me.btnOpenMediaFile.Text = "ファイルを開く"
215- Me.btnOpenMediaFile.UseVisualStyleBackColor = True
157+ Me.btnPDFLast.Location = New System.Drawing.Point(199, 94)
158+ Me.btnPDFLast.Name = "btnPDFLast"
159+ Me.btnPDFLast.Size = New System.Drawing.Size(49, 23)
160+ Me.btnPDFLast.TabIndex = 5
161+ Me.btnPDFLast.Text = "最後へ"
162+ Me.btnPDFLast.UseVisualStyleBackColor = True
216163 '
217- 'btnStartStop
164+ 'cmbPDFView
218165 '
219- Me.btnStartStop.Location = New System.Drawing.Point(59, 86)
220- Me.btnStartStop.Name = "btnStartStop"
221- Me.btnStartStop.Size = New System.Drawing.Size(82, 23)
222- Me.btnStartStop.TabIndex = 11
223- Me.btnStartStop.Text = "再生する"
224- Me.btnStartStop.UseVisualStyleBackColor = True
166+ Me.cmbPDFView.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
167+ Me.cmbPDFView.FormattingEnabled = True
168+ Me.cmbPDFView.Items.AddRange(New Object() {"Fit", "FitH", "FitV", "FitB", "FitBH", "FitB"})
169+ Me.cmbPDFView.Location = New System.Drawing.Point(97, 141)
170+ Me.cmbPDFView.Name = "cmbPDFView"
171+ Me.cmbPDFView.Size = New System.Drawing.Size(121, 23)
172+ Me.cmbPDFView.TabIndex = 8
225173 '
226- 'txtMediaFileName
174+ 'txtPDFFileName
227175 '
228- Me.txtMediaFileName.Location = New System.Drawing.Point(15, 48)
229- Me.txtMediaFileName.Name = "txtMediaFileName"
230- Me.txtMediaFileName.ReadOnly = True
231- Me.txtMediaFileName.Size = New System.Drawing.Size(655, 22)
232- Me.txtMediaFileName.TabIndex = 14
176+ Me.txtPDFFileName.Location = New System.Drawing.Point(26, 45)
177+ Me.txtPDFFileName.Name = "txtPDFFileName"
178+ Me.txtPDFFileName.ReadOnly = True
179+ Me.txtPDFFileName.Size = New System.Drawing.Size(655, 22)
180+ Me.txtPDFFileName.TabIndex = 4
233181 '
234- 'Timer1
182+ 'Label2
235183 '
184+ Me.Label2.AutoSize = True
185+ Me.Label2.Location = New System.Drawing.Point(33, 144)
186+ Me.Label2.Name = "Label2"
187+ Me.Label2.Size = New System.Drawing.Size(59, 15)
188+ Me.Label2.TabIndex = 9
189+ Me.Label2.Text = "SetView"
236190 '
191+ 'btnPDFBack
192+ '
193+ Me.btnPDFBack.Location = New System.Drawing.Point(87, 94)
194+ Me.btnPDFBack.Name = "btnPDFBack"
195+ Me.btnPDFBack.Size = New System.Drawing.Size(50, 23)
196+ Me.btnPDFBack.TabIndex = 2
197+ Me.btnPDFBack.Text = "前へ"
198+ Me.btnPDFBack.UseVisualStyleBackColor = True
199+ '
200+ 'btnPDFFileClose
201+ '
202+ Me.btnPDFFileClose.Location = New System.Drawing.Point(138, 16)
203+ Me.btnPDFFileClose.Name = "btnPDFFileClose"
204+ Me.btnPDFFileClose.Size = New System.Drawing.Size(105, 23)
205+ Me.btnPDFFileClose.TabIndex = 10
206+ Me.btnPDFFileClose.Text = "ファイルを閉じる"
207+ Me.btnPDFFileClose.UseVisualStyleBackColor = True
208+ '
209+ 'btnPDFNext
210+ '
211+ Me.btnPDFNext.Location = New System.Drawing.Point(143, 94)
212+ Me.btnPDFNext.Name = "btnPDFNext"
213+ Me.btnPDFNext.Size = New System.Drawing.Size(50, 23)
214+ Me.btnPDFNext.TabIndex = 2
215+ Me.btnPDFNext.Text = "次へ"
216+ Me.btnPDFNext.UseVisualStyleBackColor = True
217+ '
218+ 'btnOpenPDFFile
219+ '
220+ Me.btnOpenPDFFile.Location = New System.Drawing.Point(26, 16)
221+ Me.btnOpenPDFFile.Name = "btnOpenPDFFile"
222+ Me.btnOpenPDFFile.Size = New System.Drawing.Size(101, 23)
223+ Me.btnOpenPDFFile.TabIndex = 3
224+ Me.btnOpenPDFFile.Text = "ファイルを開く"
225+ Me.btnOpenPDFFile.UseVisualStyleBackColor = True
226+ '
227+ 'tbcFileOpes
228+ '
229+ Me.tbcFileOpes.Controls.Add(Me.tpAdobePDF)
230+ Me.tbcFileOpes.Controls.Add(Me.tpMediaPlayer)
231+ Me.tbcFileOpes.Location = New System.Drawing.Point(17, 89)
232+ Me.tbcFileOpes.Name = "tbcFileOpes"
233+ Me.tbcFileOpes.SelectedIndex = 0
234+ Me.tbcFileOpes.Size = New System.Drawing.Size(768, 303)
235+ Me.tbcFileOpes.TabIndex = 12
236+ '
237237 'frmOperation
238238 '
239239 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
@@ -245,33 +245,32 @@
245245 Me.Text = "Form2"
246246 Me.GroupBox1.ResumeLayout(False)
247247 Me.GroupBox1.PerformLayout()
248- Me.tbcFileOpes.ResumeLayout(False)
248+ Me.tpMediaPlayer.ResumeLayout(False)
249+ Me.tpMediaPlayer.PerformLayout()
249250 Me.tpAdobePDF.ResumeLayout(False)
250251 Me.tpAdobePDF.PerformLayout()
251- Me.tpMediaPlayer.ResumeLayout(False)
252- Me.tpMediaPlayer.PerformLayout()
252+ Me.tbcFileOpes.ResumeLayout(False)
253253 Me.ResumeLayout(False)
254254
255255 End Sub
256-
257- Friend WithEvents btnPDFNext As Windows.Forms.Button
258- Friend WithEvents btnPDFBack As Windows.Forms.Button
259- Friend WithEvents btnOpenPDFFile As Windows.Forms.Button
260- Friend WithEvents txtPDFFileName As Windows.Forms.TextBox
261256 Friend WithEvents OpenFileDialog1 As Windows.Forms.OpenFileDialog
262- Friend WithEvents btnPDFLast As Windows.Forms.Button
263- Friend WithEvents btnPDFFirst As Windows.Forms.Button
264257 Friend WithEvents cmbDisplay As Windows.Forms.ComboBox
265258 Friend WithEvents Label1 As Windows.Forms.Label
266- Friend WithEvents cmbPDFView As Windows.Forms.ComboBox
267- Friend WithEvents Label2 As Windows.Forms.Label
268- Friend WithEvents btnPDFFileClose As Windows.Forms.Button
269259 Friend WithEvents GroupBox1 As Windows.Forms.GroupBox
270- Friend WithEvents tbcFileOpes As Windows.Forms.TabControl
271- Friend WithEvents tpAdobePDF As Windows.Forms.TabPage
272- Friend WithEvents tpMediaPlayer As Windows.Forms.TabPage
273- Friend WithEvents btnOpenMediaFile As Windows.Forms.Button
274- Friend WithEvents btnStartStop As Windows.Forms.Button
275- Friend WithEvents txtMediaFileName As Windows.Forms.TextBox
276260 Friend WithEvents Timer1 As Windows.Forms.Timer
261+ Friend WithEvents tpMediaPlayer As TabPage
262+ Friend WithEvents btnOpenMediaFile As Button
263+ Friend WithEvents btnStartStop As Button
264+ Friend WithEvents txtMediaFileName As TextBox
265+ Friend WithEvents tpAdobePDF As TabPage
266+ Friend WithEvents btnOpenPDFFile As Button
267+ Friend WithEvents btnPDFNext As Button
268+ Friend WithEvents btnPDFFileClose As Button
269+ Friend WithEvents btnPDFBack As Button
270+ Friend WithEvents Label2 As Label
271+ Friend WithEvents txtPDFFileName As TextBox
272+ Friend WithEvents cmbPDFView As ComboBox
273+ Friend WithEvents btnPDFLast As Button
274+ Friend WithEvents btnPDFFirst As Button
275+ Friend WithEvents tbcFileOpes As TabControl
277276 End Class
--- pdfsecondmonitor/frmOperation.vb (revision 17)
+++ pdfsecondmonitor/frmOperation.vb (revision 18)
@@ -1,7 +1,7 @@
11 Imports System.Windows.Forms
2-Imports QuartzTypeLib
32
43
4+
55 Public Class frmOperation
66
77 #Region "初期処理"
@@ -182,31 +182,28 @@
182182 PlayVideo()
183183 Else
184184 btnStartStop.Text = "再生する"
185+ StopVideo()
185186 End If
186187 End Sub
187188
188189 Sub PlayVideo()
189190
190- Dim filgraphManager = New FilgraphManager
191- filgraphManager.RenderFile(txtMediaFileName.Text)
192- 'Dim bv = DirectCast(filgraphManager, IBasicVideo)
193- Dim vw = DirectCast(filgraphManager, IVideoWindow)
194- Dim mevent = DirectCast(filgraphManager, IMediaEventEx)
191+ frmView.UserControl11.PlayVideo(txtMediaFileName.Text)
192+ End Sub
195193
194+ Sub StopVideo()
195+ frmView.UserControl11.StopVideo()
196+ End Sub
196197
198+ Private Sub tbcFileOpes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles tbcFileOpes.SelectedIndexChanged
199+ If tbcFileOpes.SelectedTab Is tpAdobePDF Then
200+ frmView.pnlCover.Visible = False
201+ frmView.UserControl11.Visibility = Windows.Visibility.Hidden
202+ Else
203+ frmView.pnlCover.Visible = True
204+ frmView.UserControl11.Visibility = Windows.Visibility.Visible
205+ End If
197206
198-
199- vw.Owner = frmView.Handle
200- vw.WindowStyle = &H40000000 Or &H4000000
201-
202-
203- vw.SetWindowPosition(0, 0, frmView.Width, frmView.Height)
204-
205-
206-
207- mevent.SetNotifyWindow(frmView.Handle, &H8000, 0)
208-
209- filgraphManager.Run()
210207 End Sub
211208
212209
--- pdfsecondmonitor/frmView.Designer.vb (revision 17)
+++ pdfsecondmonitor/frmView.Designer.vb (revision 18)
@@ -1,9 +1,9 @@
1-<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
1+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
22 Partial Class frmView
33 Inherits System.Windows.Forms.Form
44
55 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
6- <System.Diagnostics.DebuggerNonUserCode()>
6+ <System.Diagnostics.DebuggerNonUserCode()> _
77 Protected Overrides Sub Dispose(ByVal disposing As Boolean)
88 Try
99 If disposing AndAlso components IsNot Nothing Then
@@ -20,12 +20,15 @@
2020 'メモ: 以下のプロシージャは Windows フォーム デザイナーで必要です。
2121 'Windows フォーム デザイナーを使用して変更できます。
2222 'コード エディターを使って変更しないでください。
23- <System.Diagnostics.DebuggerStepThrough()>
23+ <System.Diagnostics.DebuggerStepThrough()> _
2424 Private Sub InitializeComponent()
2525 Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmView))
2626 Me.AxAcroPDF1 = New AxAcroPDFLib.AxAcroPDF()
2727 Me.pnlCover = New System.Windows.Forms.Panel()
28+ Me.ElementHost1 = New System.Windows.Forms.Integration.ElementHost()
29+ Me.UserControl11 = New WindowsApp1.UserControl1()
2830 CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).BeginInit()
31+ Me.pnlCover.SuspendLayout()
2932 Me.SuspendLayout()
3033 '
3134 'AxAcroPDF1
@@ -37,8 +40,8 @@
3740 Me.AxAcroPDF1.Location = New System.Drawing.Point(0, 0)
3841 Me.AxAcroPDF1.Name = "AxAcroPDF1"
3942 Me.AxAcroPDF1.OcxState = CType(resources.GetObject("AxAcroPDF1.OcxState"), System.Windows.Forms.AxHost.State)
40- Me.AxAcroPDF1.Size = New System.Drawing.Size(400, 400)
41- Me.AxAcroPDF1.TabIndex = 0
43+ Me.AxAcroPDF1.Size = New System.Drawing.Size(478, 365)
44+ Me.AxAcroPDF1.TabIndex = 1
4245 '
4346 'pnlCover
4447 '
@@ -45,28 +48,42 @@
4548 Me.pnlCover.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
4649 Or System.Windows.Forms.AnchorStyles.Left) _
4750 Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
51+ Me.pnlCover.Controls.Add(Me.ElementHost1)
4852 Me.pnlCover.Location = New System.Drawing.Point(0, 0)
4953 Me.pnlCover.Name = "pnlCover"
50- Me.pnlCover.Size = New System.Drawing.Size(400, 400)
51- Me.pnlCover.TabIndex = 1
54+ Me.pnlCover.Size = New System.Drawing.Size(478, 365)
55+ Me.pnlCover.TabIndex = 2
5256 Me.pnlCover.Visible = False
5357 '
58+ 'ElementHost1
59+ '
60+ Me.ElementHost1.Dock = System.Windows.Forms.DockStyle.Fill
61+ Me.ElementHost1.Location = New System.Drawing.Point(0, 0)
62+ Me.ElementHost1.Name = "ElementHost1"
63+ Me.ElementHost1.Size = New System.Drawing.Size(478, 365)
64+ Me.ElementHost1.TabIndex = 0
65+ Me.ElementHost1.Text = "ElementHost1"
66+ Me.ElementHost1.Child = Me.UserControl11
67+ '
5468 'frmView
5569 '
5670 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
5771 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
58- Me.ClientSize = New System.Drawing.Size(401, 401)
72+ Me.ClientSize = New System.Drawing.Size(478, 365)
5973 Me.ControlBox = False
6074 Me.Controls.Add(Me.pnlCover)
6175 Me.Controls.Add(Me.AxAcroPDF1)
6276 Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
6377 Me.Name = "frmView"
64- Me.Text = "View"
78+ Me.Text = "Form1"
6579 CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).EndInit()
80+ Me.pnlCover.ResumeLayout(False)
6681 Me.ResumeLayout(False)
6782
6883 End Sub
6984
85+ Friend WithEvents ElementHost1 As Integration.ElementHost
7086 Friend WithEvents AxAcroPDF1 As AxAcroPDFLib.AxAcroPDF
71- Friend WithEvents pnlCover As Windows.Forms.Panel
87+ Friend WithEvents pnlCover As Panel
88+ Friend UserControl11 As UserControl1
7289 End Class
--- pdfsecondmonitor/frmView.vb (revision 17)
+++ pdfsecondmonitor/frmView.vb (revision 18)
@@ -7,9 +7,4 @@
77 frmOperation.Show()
88
99 End Sub
10-
11- 'todo:アプリが起動したときに一度だけfrmOperationを最前面に出す。
12- 'Private Sub frmView_Activated(sender As Object, e As EventArgs) Handles Me.Activated
13- ' frmOperation.Activate()
14- 'End Sub
15-End Class
\ No newline at end of file
10+End Class