デュアルディスプレイのセカンドモニターにPDF、動画、画像を表示。
@@ -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 |
@@ -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")> |
@@ -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 |
@@ -12,15 +12,16 @@ | ||
12 | 12 | Option Explicit On |
13 | 13 | |
14 | 14 | |
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 | |
21 | 16 | |
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 | + | |
24 | 25 | #Region "My.Settings 自動保存機能" |
25 | 26 | #If _MyType = "WindowsForms" Then |
26 | 27 | Private Shared addedHandler As Boolean |
@@ -35,10 +36,10 @@ | ||
35 | 36 | End Sub |
36 | 37 | #End If |
37 | 38 | #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 | + | |
42 | 43 | #If _MyType = "WindowsForms" Then |
43 | 44 | If Not addedHandler Then |
44 | 45 | SyncLock addedHandlerLockObject |
@@ -49,34 +50,35 @@ | ||
49 | 50 | End SyncLock |
50 | 51 | End If |
51 | 52 | #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 | |
80 | 82 | |
81 | 83 | Namespace My |
82 | 84 |
@@ -86,9 +88,9 @@ | ||
86 | 88 | Friend Module MySettingsProperty |
87 | 89 | |
88 | 90 | <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 | |
90 | 92 | Get |
91 | - Return Global.pdfsecondmonitor.Settings.Default | |
93 | + Return Global.WindowsApp1.My.MySettings.Default | |
92 | 94 | End Get |
93 | 95 | End Property |
94 | 96 | End Module |
@@ -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 |
@@ -23,89 +23,36 @@ | ||
23 | 23 | <System.Diagnostics.DebuggerStepThrough()> _ |
24 | 24 | Private Sub InitializeComponent() |
25 | 25 | 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() | |
30 | 26 | Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() |
31 | - Me.btnPDFLast = New System.Windows.Forms.Button() | |
32 | - Me.btnPDFFirst = New System.Windows.Forms.Button() | |
33 | 27 | Me.cmbDisplay = New System.Windows.Forms.ComboBox() |
34 | 28 | 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() | |
35 | 38 | Me.cmbPDFView = New System.Windows.Forms.ComboBox() |
39 | + Me.txtPDFFileName = New System.Windows.Forms.TextBox() | |
36 | 40 | Me.Label2 = New System.Windows.Forms.Label() |
41 | + Me.btnPDFBack = New System.Windows.Forms.Button() | |
37 | 42 | 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() | |
39 | 45 | 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) | |
46 | 46 | Me.GroupBox1.SuspendLayout() |
47 | + Me.tpMediaPlayer.SuspendLayout() | |
48 | + Me.tpAdobePDF.SuspendLayout() | |
47 | 49 | Me.tbcFileOpes.SuspendLayout() |
48 | - Me.tpAdobePDF.SuspendLayout() | |
49 | - Me.tpMediaPlayer.SuspendLayout() | |
50 | 50 | Me.SuspendLayout() |
51 | 51 | ' |
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 | - ' | |
87 | 52 | 'OpenFileDialog1 |
88 | 53 | ' |
89 | 54 | Me.OpenFileDialog1.FileName = "OpenFileDialog1" |
90 | 55 | ' |
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 | - ' | |
109 | 56 | 'cmbDisplay |
110 | 57 | ' |
111 | 58 | Me.cmbDisplay.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList |
@@ -124,34 +71,6 @@ | ||
124 | 71 | Me.Label1.TabIndex = 7 |
125 | 72 | Me.Label1.Text = "表示するディスプレイ" |
126 | 73 | ' |
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 | - ' | |
155 | 74 | 'GroupBox1 |
156 | 75 | ' |
157 | 76 | Me.GroupBox1.Controls.Add(Me.Label1) |
@@ -163,16 +82,48 @@ | ||
163 | 82 | Me.GroupBox1.TabStop = False |
164 | 83 | Me.GroupBox1.Text = "設定" |
165 | 84 | ' |
166 | - 'tbcFileOpes | |
85 | + 'Timer1 | |
167 | 86 | ' |
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 | |
175 | 87 | ' |
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 | + ' | |
176 | 127 | 'tpAdobePDF |
177 | 128 | ' |
178 | 129 | Me.tpAdobePDF.Controls.Add(Me.btnOpenPDFFile) |
@@ -192,48 +143,97 @@ | ||
192 | 143 | Me.tpAdobePDF.Text = "PDFの表示" |
193 | 144 | Me.tpAdobePDF.UseVisualStyleBackColor = True |
194 | 145 | ' |
195 | - 'tpMediaPlayer | |
146 | + 'btnPDFFirst | |
196 | 147 | ' |
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 | |
207 | 154 | ' |
208 | - 'btnOpenMediaFile | |
155 | + 'btnPDFLast | |
209 | 156 | ' |
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 | |
216 | 163 | ' |
217 | - 'btnStartStop | |
164 | + 'cmbPDFView | |
218 | 165 | ' |
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 | |
225 | 173 | ' |
226 | - 'txtMediaFileName | |
174 | + 'txtPDFFileName | |
227 | 175 | ' |
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 | |
233 | 181 | ' |
234 | - 'Timer1 | |
182 | + 'Label2 | |
235 | 183 | ' |
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" | |
236 | 190 | ' |
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 | + ' | |
237 | 237 | 'frmOperation |
238 | 238 | ' |
239 | 239 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!) |
@@ -245,33 +245,32 @@ | ||
245 | 245 | Me.Text = "Form2" |
246 | 246 | Me.GroupBox1.ResumeLayout(False) |
247 | 247 | Me.GroupBox1.PerformLayout() |
248 | - Me.tbcFileOpes.ResumeLayout(False) | |
248 | + Me.tpMediaPlayer.ResumeLayout(False) | |
249 | + Me.tpMediaPlayer.PerformLayout() | |
249 | 250 | Me.tpAdobePDF.ResumeLayout(False) |
250 | 251 | Me.tpAdobePDF.PerformLayout() |
251 | - Me.tpMediaPlayer.ResumeLayout(False) | |
252 | - Me.tpMediaPlayer.PerformLayout() | |
252 | + Me.tbcFileOpes.ResumeLayout(False) | |
253 | 253 | Me.ResumeLayout(False) |
254 | 254 | |
255 | 255 | 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 | |
261 | 256 | Friend WithEvents OpenFileDialog1 As Windows.Forms.OpenFileDialog |
262 | - Friend WithEvents btnPDFLast As Windows.Forms.Button | |
263 | - Friend WithEvents btnPDFFirst As Windows.Forms.Button | |
264 | 257 | Friend WithEvents cmbDisplay As Windows.Forms.ComboBox |
265 | 258 | 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 | |
269 | 259 | 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 | |
276 | 260 | 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 | |
277 | 276 | End Class |
@@ -1,7 +1,7 @@ | ||
1 | 1 | Imports System.Windows.Forms |
2 | -Imports QuartzTypeLib | |
3 | 2 | |
4 | 3 | |
4 | + | |
5 | 5 | Public Class frmOperation |
6 | 6 | |
7 | 7 | #Region "初期処理" |
@@ -182,31 +182,28 @@ | ||
182 | 182 | PlayVideo() |
183 | 183 | Else |
184 | 184 | btnStartStop.Text = "再生する" |
185 | + StopVideo() | |
185 | 186 | End If |
186 | 187 | End Sub |
187 | 188 | |
188 | 189 | Sub PlayVideo() |
189 | 190 | |
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 | |
195 | 193 | |
194 | + Sub StopVideo() | |
195 | + frmView.UserControl11.StopVideo() | |
196 | + End Sub | |
196 | 197 | |
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 | |
197 | 206 | |
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() | |
210 | 207 | End Sub |
211 | 208 | |
212 | 209 |
@@ -1,9 +1,9 @@ | ||
1 | -<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> | |
1 | +<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ | |
2 | 2 | Partial Class frmView |
3 | 3 | Inherits System.Windows.Forms.Form |
4 | 4 | |
5 | 5 | 'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。 |
6 | - <System.Diagnostics.DebuggerNonUserCode()> | |
6 | + <System.Diagnostics.DebuggerNonUserCode()> _ | |
7 | 7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean) |
8 | 8 | Try |
9 | 9 | If disposing AndAlso components IsNot Nothing Then |
@@ -20,12 +20,15 @@ | ||
20 | 20 | 'メモ: 以下のプロシージャは Windows フォーム デザイナーで必要です。 |
21 | 21 | 'Windows フォーム デザイナーを使用して変更できます。 |
22 | 22 | 'コード エディターを使って変更しないでください。 |
23 | - <System.Diagnostics.DebuggerStepThrough()> | |
23 | + <System.Diagnostics.DebuggerStepThrough()> _ | |
24 | 24 | Private Sub InitializeComponent() |
25 | 25 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmView)) |
26 | 26 | Me.AxAcroPDF1 = New AxAcroPDFLib.AxAcroPDF() |
27 | 27 | Me.pnlCover = New System.Windows.Forms.Panel() |
28 | + Me.ElementHost1 = New System.Windows.Forms.Integration.ElementHost() | |
29 | + Me.UserControl11 = New WindowsApp1.UserControl1() | |
28 | 30 | CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).BeginInit() |
31 | + Me.pnlCover.SuspendLayout() | |
29 | 32 | Me.SuspendLayout() |
30 | 33 | ' |
31 | 34 | 'AxAcroPDF1 |
@@ -37,8 +40,8 @@ | ||
37 | 40 | Me.AxAcroPDF1.Location = New System.Drawing.Point(0, 0) |
38 | 41 | Me.AxAcroPDF1.Name = "AxAcroPDF1" |
39 | 42 | 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 | |
42 | 45 | ' |
43 | 46 | 'pnlCover |
44 | 47 | ' |
@@ -45,28 +48,42 @@ | ||
45 | 48 | Me.pnlCover.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ |
46 | 49 | Or System.Windows.Forms.AnchorStyles.Left) _ |
47 | 50 | Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) |
51 | + Me.pnlCover.Controls.Add(Me.ElementHost1) | |
48 | 52 | Me.pnlCover.Location = New System.Drawing.Point(0, 0) |
49 | 53 | 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 | |
52 | 56 | Me.pnlCover.Visible = False |
53 | 57 | ' |
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 | + ' | |
54 | 68 | 'frmView |
55 | 69 | ' |
56 | 70 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!) |
57 | 71 | 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) | |
59 | 73 | Me.ControlBox = False |
60 | 74 | Me.Controls.Add(Me.pnlCover) |
61 | 75 | Me.Controls.Add(Me.AxAcroPDF1) |
62 | 76 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None |
63 | 77 | Me.Name = "frmView" |
64 | - Me.Text = "View" | |
78 | + Me.Text = "Form1" | |
65 | 79 | CType(Me.AxAcroPDF1, System.ComponentModel.ISupportInitialize).EndInit() |
80 | + Me.pnlCover.ResumeLayout(False) | |
66 | 81 | Me.ResumeLayout(False) |
67 | 82 | |
68 | 83 | End Sub |
69 | 84 | |
85 | + Friend WithEvents ElementHost1 As Integration.ElementHost | |
70 | 86 | 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 | |
72 | 89 | End Class |
@@ -7,9 +7,4 @@ | ||
7 | 7 | frmOperation.Show() |
8 | 8 | |
9 | 9 | 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 |