• 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

Revision30 (tree)
Time2017-11-13 11:23:10
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- pdfsecondmonitor/frmOperation.Designer.vb (revision 29)
+++ pdfsecondmonitor/frmOperation.Designer.vb (revision 30)
@@ -52,7 +52,7 @@
5252 Me.cmbPDFView = New System.Windows.Forms.ComboBox()
5353 Me.btnPDFLast = New System.Windows.Forms.Button()
5454 Me.btnPDFFirst = New System.Windows.Forms.Button()
55- Me.Button1 = New System.Windows.Forms.Button()
55+ Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
5656 Me.GroupBox1.SuspendLayout()
5757 CType(Me.nudWidth, System.ComponentModel.ISupportInitialize).BeginInit()
5858 CType(Me.nudHeight, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -133,6 +133,9 @@
133133 Me.Label3.TabIndex = 13
134134 Me.Label3.Text = "高さ"
135135 '
136+ 'Timer1
137+ '
138+ '
136139 'tpMediaPlayer
137140 '
138141 Me.tpMediaPlayer.Controls.Add(Me.btnOpenMediaFile)
@@ -334,14 +337,8 @@
334337 Me.btnPDFFirst.Text = "最初へ"
335338 Me.btnPDFFirst.UseVisualStyleBackColor = True
336339 '
337- 'Button1
340+ 'BackgroundWorker1
338341 '
339- Me.Button1.Location = New System.Drawing.Point(695, 60)
340- Me.Button1.Name = "Button1"
341- Me.Button1.Size = New System.Drawing.Size(75, 23)
342- Me.Button1.TabIndex = 13
343- Me.Button1.Text = "Button1"
344- Me.Button1.UseVisualStyleBackColor = True
345342 '
346343 'frmOperation
347344 '
@@ -348,7 +345,6 @@
348345 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
349346 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
350347 Me.ClientSize = New System.Drawing.Size(782, 465)
351- Me.Controls.Add(Me.Button1)
352348 Me.Controls.Add(Me.tbcFileOpes)
353349 Me.Controls.Add(Me.GroupBox1)
354350 Me.Name = "frmOperation"
@@ -395,5 +391,5 @@
395391 Friend WithEvents btnInsert As Button
396392 Friend WithEvents lstPDFFiles As ListBox
397393 Friend WithEvents btnDelete As Button
398- Friend WithEvents Button1 As Button
394+ Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
399395 End Class
--- pdfsecondmonitor/frmOperation.vb (revision 29)
+++ pdfsecondmonitor/frmOperation.vb (revision 30)
@@ -205,12 +205,9 @@
205205 'If backFileName = txtPDFFileName.Text Then
206206 ' Return
207207 'End If
208-
209- frmView.LoadFile(txtPDFFileName.Text)
210- ' 'todo : pdfが開けなかったときの処理
211- ' backFileName = txtPDFFileName.Text
212- 'axPDF.setShowToolbar(False)
213- 'axPDF.setShowScrollbars(False)
208+ If Not BackgroundWorker1.IsBusy Then
209+ BackgroundWorker1.RunWorkerAsync()
210+ End If
214211 End Sub
215212
216213
@@ -285,10 +282,8 @@
285282 frmView.Width = nudWidth.Value
286283 End Sub
287284
288- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
289- axPDF.LoadFile("C:\Users\bellm\Downloads\CA-brpgm18_J.pdf")
290- End Sub
291285
286+
292287 #Region "リストボックス処理"
293288
294289 Private Sub btnInsert_Click(sender As Object, e As EventArgs) Handles btnInsert.Click
@@ -328,6 +323,40 @@
328323 txtPDFFileName.Text = fileviewinfo.fileName
329324 nudPdfZoom.Value = fileviewinfo.zoom
330325 End Sub
326+
327+
328+
329+ Delegate Sub simpleDelegate()
330+
331+ Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
332+ Dim loadfuunc As simpleDelegate = AddressOf loadFile
333+ Me.Invoke(loadfuunc)
334+ Threading.Thread.Sleep(5000)
335+
336+ Dim func As simpleDelegate = AddressOf hideToolBar
337+ Me.Invoke(func)
338+ Threading.Thread.Sleep(100)
339+
340+ Dim func2 As simpleDelegate = AddressOf hideScrollbars
341+ Me.Invoke(func2)
342+ Threading.Thread.Sleep(100)
343+
344+
345+ End Sub
346+
347+ Sub hideScrollbars()
348+ axPDF.setShowScrollbars(False)
349+ End Sub
350+ Sub loadFile()
351+ frmView.LoadFile(txtPDFFileName.Text)
352+ End Sub
353+ Sub hideToolBar()
354+ axPDF.setShowToolbar(False)
355+ End Sub
356+
357+
358+
359+
331360 #End Region
332361
333362 End Class
\ No newline at end of file
--- pdfsecondmonitor/frmView.vb (revision 29)
+++ pdfsecondmonitor/frmView.vb (revision 30)
@@ -34,6 +34,7 @@
3434 Exit Sub
3535 End If
3636 Me.zoom = zoom
37+
3738 AxAcroPDF1.setZoom(zoom)
3839 End Sub
3940 End Class