奔腾Flash Player source code

'******************************
'奔腾Flash Player

'全部代码包括3个FORM
'author:wgscd(自由奔腾)
'date:2005-3
'QQ:153964481
'说明:由于最后调试的代码丢了,可能form1的code有BUG
'再就是此Application用到了许多picture,你将不能直接将代码贴到IDE里期望会有漂亮的界面出现
'******************************
Imports System.IO
Imports System.Net
Public Module publicVar

Public exitfullScr As Boolean = False

'Public FramNums As Integer

End Module

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "

Public Sub New()
MyBase.New()

'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()

'在 InitializeComponent() 调用之后添加任何初始化

End Sub

'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer

'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。

Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents TrackBar1 As System.Windows.Forms.TrackBar
Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Flashp As AxShockwaveFlashObjects.AxShockwaveFlash
Friend WithEvents Flash As AxShockwaveFlashObjects.AxShockwaveFlash
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents MenuItem14 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem15 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem16 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem17 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem18 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem21 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem22 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem23 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem24 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem25 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem26 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem28 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem29 As System.Windows.Forms.MenuItem
Friend WithEvents ContextMenu2 As System.Windows.Forms.ContextMenu
Friend WithEvents MenuItem30 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem31 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem32 As System.Windows.Forms.MenuItem
Friend WithEvents Timer2 As System.Windows.Forms.Timer
Friend WithEvents MenuItem33 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem34 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem35 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem36 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem37 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem38 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem39 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem
Friend WithEvents Timer3 As System.Windows.Forms.Timer
Friend WithEvents MenuItem40 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem42 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem41 As System.Windows.Forms.MenuItem
Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Friend WithEvents MenuItem20 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem19 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem27 As System.Windows.Forms.MenuItem
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label8 As System.Windows.Forms.Label

  1<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()   
  2Me.components = New System.ComponentModel.Container   
  3Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType 
  4
  5(Form1))   
  6Me.Button1 = New System.Windows.Forms.Button   
  7Me.Button2 = New System.Windows.Forms.Button   
  8Me.Label1 = New System.Windows.Forms.Label   
  9Me.Timer1 = New System.Windows.Forms.Timer(Me.components)   
 10Me.TrackBar1 = New System.Windows.Forms.TrackBar   
 11Me.ContextMenu1 = New System.Windows.Forms.ContextMenu   
 12Me.MenuItem1 = New System.Windows.Forms.MenuItem   
 13Me.MenuItem2 = New System.Windows.Forms.MenuItem   
 14Me.MenuItem6 = New System.Windows.Forms.MenuItem   
 15Me.MenuItem29 = New System.Windows.Forms.MenuItem   
 16Me.MenuItem19 = New System.Windows.Forms.MenuItem   
 17Me.MenuItem3 = New System.Windows.Forms.MenuItem   
 18Me.MenuItem4 = New System.Windows.Forms.MenuItem   
 19Me.MenuItem42 = New System.Windows.Forms.MenuItem   
 20Me.MenuItem5 = New System.Windows.Forms.MenuItem   
 21Me.MenuItem7 = New System.Windows.Forms.MenuItem   
 22Me.MenuItem8 = New System.Windows.Forms.MenuItem   
 23Me.MenuItem33 = New System.Windows.Forms.MenuItem   
 24Me.MenuItem34 = New System.Windows.Forms.MenuItem   
 25Me.MenuItem41 = New System.Windows.Forms.MenuItem   
 26Me.MenuItem35 = New System.Windows.Forms.MenuItem   
 27Me.MenuItem15 = New System.Windows.Forms.MenuItem   
 28Me.MenuItem9 = New System.Windows.Forms.MenuItem   
 29Me.MenuItem11 = New System.Windows.Forms.MenuItem   
 30Me.MenuItem12 = New System.Windows.Forms.MenuItem   
 31Me.MenuItem10 = New System.Windows.Forms.MenuItem   
 32Me.MenuItem13 = New System.Windows.Forms.MenuItem   
 33Me.MenuItem14 = New System.Windows.Forms.MenuItem   
 34Me.MenuItem16 = New System.Windows.Forms.MenuItem   
 35Me.MenuItem18 = New System.Windows.Forms.MenuItem   
 36Me.MenuItem17 = New System.Windows.Forms.MenuItem   
 37Me.MenuItem20 = New System.Windows.Forms.MenuItem   
 38Me.MenuItem21 = New System.Windows.Forms.MenuItem   
 39Me.MenuItem22 = New System.Windows.Forms.MenuItem   
 40Me.MenuItem23 = New System.Windows.Forms.MenuItem   
 41Me.MenuItem25 = New System.Windows.Forms.MenuItem   
 42Me.MenuItem26 = New System.Windows.Forms.MenuItem   
 43Me.MenuItem28 = New System.Windows.Forms.MenuItem   
 44Me.MenuItem39 = New System.Windows.Forms.MenuItem   
 45Me.MenuItem24 = New System.Windows.Forms.MenuItem   
 46Me.MenuItem27 = New System.Windows.Forms.MenuItem   
 47Me.ListBox1 = New System.Windows.Forms.ListBox   
 48Me.ContextMenu2 = New System.Windows.Forms.ContextMenu   
 49Me.MenuItem30 = New System.Windows.Forms.MenuItem   
 50Me.MenuItem31 = New System.Windows.Forms.MenuItem   
 51Me.MenuItem40 = New System.Windows.Forms.MenuItem   
 52Me.MenuItem32 = New System.Windows.Forms.MenuItem   
 53Me.MenuItem36 = New System.Windows.Forms.MenuItem   
 54Me.MenuItem37 = New System.Windows.Forms.MenuItem   
 55Me.MenuItem38 = New System.Windows.Forms.MenuItem   
 56Me.Label2 = New System.Windows.Forms.Label   
 57Me.Label3 = New System.Windows.Forms.Label   
 58Me.Label4 = New System.Windows.Forms.Label   
 59Me.Flashp = New AxShockwaveFlashObjects.AxShockwaveFlash   
 60Me.Flash = New AxShockwaveFlashObjects.AxShockwaveFlash   
 61Me.Label5 = New System.Windows.Forms.Label   
 62Me.PictureBox1 = New System.Windows.Forms.PictureBox   
 63Me.Timer2 = New System.Windows.Forms.Timer(Me.components)   
 64Me.Timer3 = New System.Windows.Forms.Timer(Me.components)   
 65Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)   
 66Me.Label6 = New System.Windows.Forms.Label   
 67Me.Label7 = New System.Windows.Forms.Label   
 68Me.Label8 = New System.Windows.Forms.Label   
 69CType(Me.TrackBar1, System.ComponentModel.ISupportInitialize).BeginInit()   
 70CType(Me.Flashp, System.ComponentModel.ISupportInitialize).BeginInit()   
 71CType(Me.Flash, System.ComponentModel.ISupportInitialize).BeginInit()   
 72Me.SuspendLayout()   
 73'   
 74'Button1   
 75'   
 76Me.Button1.Cursor = System.Windows.Forms.Cursors.Hand   
 77Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat   
 78Me.Button1.Image = CType(resources.GetObject("Button1.Image"), System.Drawing.Image)   
 79Me.Button1.Location = New System.Drawing.Point(424, 24)   
 80Me.Button1.Name = "Button1"   
 81Me.Button1.Size = New System.Drawing.Size(56, 23)   
 82Me.Button1.TabIndex = 14   
 83Me.ToolTip1.SetToolTip(Me.Button1, "打开单个文件")   
 84'   
 85'Button2   
 86'   
 87Me.Button2.Cursor = System.Windows.Forms.Cursors.Hand   
 88Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat   
 89Me.Button2.Image = CType(resources.GetObject("Button2.Image"), System.Drawing.Image)   
 90Me.Button2.Location = New System.Drawing.Point(488, 24)   
 91Me.Button2.Name = "Button2"   
 92Me.Button2.Size = New System.Drawing.Size(56, 23)   
 93Me.Button2.TabIndex = 15   
 94Me.ToolTip1.SetToolTip(Me.Button2, "浏览文件夹,该文件夹下的所有以SWF结尾的文件都将添加进列表里")   
 95'   
 96'Label1   
 97'   
 98Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(0, Byte), CType(0, 
 99
100Byte))   
101Me.Label1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, 
102
103System.Drawing.GraphicsUnit.Point, CType(0, Byte))   
104Me.Label1.ForeColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, 
105
106Byte))   
107Me.Label1.Location = New System.Drawing.Point(120, 312)   
108Me.Label1.Name = "Label1"   
109Me.Label1.Size = New System.Drawing.Size(152, 16)   
110Me.Label1.TabIndex = 1   
111Me.Label1.Text = "自由奔腾(wgscd)"   
112Me.ToolTip1.SetToolTip(Me.Label1, "当前播放的Flash")   
113'   
114'Timer1   
115'   
116Me.Timer1.Interval = 50   
117'   
118'TrackBar1   
119'   
120Me.TrackBar1.BackColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, 
121
122Byte))   
123Me.TrackBar1.ContextMenu = Me.ContextMenu1   
124Me.TrackBar1.Location = New System.Drawing.Point(0, 336)   
125Me.TrackBar1.Maximum = 33333   
126Me.TrackBar1.Name = "TrackBar1"   
127Me.TrackBar1.Size = New System.Drawing.Size(384, 45)   
128Me.TrackBar1.TabIndex = 4   
129Me.ToolTip1.SetToolTip(Me.TrackBar1, "时间帧,可拖动")   
130'   
131'ContextMenu1   
132'   
133Me.ContextMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, 
134
135Me.MenuItem2, Me.MenuItem6, Me.MenuItem29, Me.MenuItem19, Me.MenuItem3, Me.MenuItem4, Me.MenuItem42, 
136
137Me.MenuItem5, Me.MenuItem15, Me.MenuItem9, Me.MenuItem14, Me.MenuItem16, Me.MenuItem18, Me.MenuItem17, 
138
139Me.MenuItem20, Me.MenuItem21, Me.MenuItem22, Me.MenuItem23, Me.MenuItem25, Me.MenuItem39, Me.MenuItem24, 
140
141Me.MenuItem27})   
142'   
143'MenuItem1   
144'   
145Me.MenuItem1.Index = 0   
146Me.MenuItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlO   
147Me.MenuItem1.Text = "打开单个文件"   
148'   
149'MenuItem2   
150'   
151Me.MenuItem2.Index = 1   
152Me.MenuItem2.Text = "打开文件夹"   
153'   
154'MenuItem6   
155'   
156Me.MenuItem6.Index = 2   
157Me.MenuItem6.Text = "打开URL"   
158'   
159'MenuItem29   
160'   
161Me.MenuItem29.Index = 3   
162Me.MenuItem29.Text = "-"   
163'   
164'MenuItem19   
165'   
166Me.MenuItem19.Index = 4   
167Me.MenuItem19.Text = "搜索IE缓存"   
168'   
169'MenuItem3   
170'   
171Me.MenuItem3.Index = 5   
172Me.MenuItem3.Text = "-"   
173'   
174'MenuItem4   
175'   
176Me.MenuItem4.Index = 6   
177Me.MenuItem4.Text = "总在最前"   
178'   
179'MenuItem42   
180'   
181Me.MenuItem42.Index = 7   
182Me.MenuItem42.Text = "改背景为图片"   
183'   
184'MenuItem5   
185'   
186Me.MenuItem5.Index = 8   
187Me.MenuItem5.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem7, Me.MenuItem8, 
188
189Me.MenuItem33, Me.MenuItem34, Me.MenuItem41, Me.MenuItem35})   
190Me.MenuItem5.Text = "更改时帧条颜色"   
191'   
192'MenuItem7   
193'   
194Me.MenuItem7.Index = 0   
195Me.MenuItem7.Text = "红"   
196'   
197'MenuItem8   
198'   
199Me.MenuItem8.Index = 1   
200Me.MenuItem8.Text = "绿"   
201'   
202'MenuItem33   
203'   
204Me.MenuItem33.Index = 2   
205Me.MenuItem33.Text = "蓝"   
206'   
207'MenuItem34   
208'   
209Me.MenuItem34.Index = 3   
210Me.MenuItem34.Text = "紫"   
211'   
212'MenuItem41   
213'   
214Me.MenuItem41.Index = 4   
215Me.MenuItem41.Text = "随机"   
216'   
217'MenuItem35   
218'   
219Me.MenuItem35.Index = 5   
220Me.MenuItem35.Text = "自定义"   
221'   
222'MenuItem15   
223'   
224Me.MenuItem15.Index = 9   
225Me.MenuItem15.Text = "-"   
226'   
227'MenuItem9   
228'   
229Me.MenuItem9.Index = 10   
230Me.MenuItem9.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem11, Me.MenuItem12, 
231
232Me.MenuItem10, Me.MenuItem13})   
233Me.MenuItem9.Text = "窗体透明"   
234'   
235'MenuItem11   
236'   
237Me.MenuItem11.Index = 0   
238Me.MenuItem11.Text = "30%"   
239'   
240'MenuItem12   
241'   
242Me.MenuItem12.Index = 1   
243Me.MenuItem12.Text = "60%"   
244'   
245'MenuItem10   
246'   
247Me.MenuItem10.Index = 2   
248Me.MenuItem10.Text = "100%"   
249'   
250'MenuItem13   
251'   
252Me.MenuItem13.Index = 3   
253Me.MenuItem13.Text = "自定义"   
254'   
255'MenuItem14   
256'   
257Me.MenuItem14.Index = 11   
258Me.MenuItem14.Text = "动画循环放"   
259'   
260'MenuItem16   
261'   
262Me.MenuItem16.Index = 12   
263Me.MenuItem16.Text = "列表循环"   
264'   
265'MenuItem18   
266'   
267Me.MenuItem18.Index = 13   
268Me.MenuItem18.Text = "-"   
269'   
270'MenuItem17   
271'   
272Me.MenuItem17.Index = 14   
273Me.MenuItem17.Text = "播放"   
274'   
275'MenuItem20   
276'   
277Me.MenuItem20.Index = 15   
278Me.MenuItem20.Text = "下一曲"   
279'   
280'MenuItem21   
281'   
282Me.MenuItem21.Index = 16   
283Me.MenuItem21.Text = "指定到帧"   
284'   
285'MenuItem22   
286'   
287Me.MenuItem22.Index = 17   
288Me.MenuItem22.Text = "重新开始"   
289'   
290'MenuItem23   
291'   
292Me.MenuItem23.Index = 18   
293Me.MenuItem23.Text = "-"   
294'   
295'MenuItem25   
296'   
297Me.MenuItem25.Index = 19   
298Me.MenuItem25.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem26, 
299
300Me.MenuItem28})   
301Me.MenuItem25.Text = "质量"   
302'   
303'MenuItem26   
304'   
305Me.MenuItem26.Index = 0   
306Me.MenuItem26.Text = "高"   
307'   
308'MenuItem28   
309'   
310Me.MenuItem28.Index = 1   
311Me.MenuItem28.Text = "低"   
312'   
313'MenuItem39   
314'   
315Me.MenuItem39.Index = 20   
316Me.MenuItem39.Text = "全屏幕"   
317'   
318'MenuItem24   
319'   
320Me.MenuItem24.Index = 21   
321Me.MenuItem24.Text = "关于"   
322'   
323'MenuItem27   
324'   
325Me.MenuItem27.Index = 22   
326Me.MenuItem27.Text = "退出(&amp;Exit)"   
327'   
328'ListBox1   
329'   
330Me.ListBox1.ContextMenu = Me.ContextMenu2   
331Me.ListBox1.HorizontalScrollbar = True   
332Me.ListBox1.ItemHeight = 12   
333Me.ListBox1.Location = New System.Drawing.Point(424, 56)   
334Me.ListBox1.Name = "ListBox1"   
335Me.ListBox1.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended   
336Me.ListBox1.Size = New System.Drawing.Size(120, 160)   
337Me.ListBox1.TabIndex = 5   
338Me.ToolTip1.SetToolTip(Me.ListBox1, "Flash列表")   
339'   
340'ContextMenu2   
341'   
342Me.ContextMenu2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem30, 
343
344Me.MenuItem31, Me.MenuItem40, Me.MenuItem32, Me.MenuItem36, Me.MenuItem37, Me.MenuItem38})   
345'   
346'MenuItem30   
347'   
348Me.MenuItem30.Index = 0   
349Me.MenuItem30.Text = "清除列表"   
350'   
351'MenuItem31   
352'   
353Me.MenuItem31.Index = 1   
354Me.MenuItem31.Text = "清除选中项"   
355'   
356'MenuItem40   
357'   
358Me.MenuItem40.Index = 2   
359Me.MenuItem40.Text = "项另存为"   
360'   
361'MenuItem32   
362'   
363Me.MenuItem32.Index = 3   
364Me.MenuItem32.Text = "动画另存为"   
365'   
366'MenuItem36   
367'   
368Me.MenuItem36.Index = 4   
369Me.MenuItem36.Text = "-"   
370'   
371'MenuItem37   
372'   
373Me.MenuItem37.Index = 5   
374Me.MenuItem37.Text = "改变列表背景色"   
375'   
376'MenuItem38   
377'   
378Me.MenuItem38.Index = 6   
379Me.MenuItem38.Text = "改变列表文字颜色"   
380'   
381'Label2   
382'   
383Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(0, Byte), CType(0, 
384
385Byte))   
386Me.Label2.Cursor = System.Windows.Forms.Cursors.Hand   
387Me.Label2.Font = New System.Drawing.Font("华文中宋", 8.999999!, System.Drawing.FontStyle.Bold, 
388
389System.Drawing.GraphicsUnit.Point, CType(134, Byte))   
390Me.Label2.ForeColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, 
391
392Byte))   
393Me.Label2.Image = CType(resources.GetObject("Label2.Image"), System.Drawing.Image)   
394Me.Label2.Location = New System.Drawing.Point(8, 312)   
395Me.Label2.Name = "Label2"   
396Me.Label2.Size = New System.Drawing.Size(40, 16)   
397Me.Label2.TabIndex = 7   
398Me.ToolTip1.SetToolTip(Me.Label2, "播放")   
399'   
400'Label3   
401'   
402Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(0, Byte), CType(0, 
403
404Byte))   
405Me.Label3.Cursor = System.Windows.Forms.Cursors.Hand   
406Me.Label3.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, 
407
408System.Drawing.GraphicsUnit.Point, CType(134, Byte))   
409Me.Label3.ForeColor = System.Drawing.Color.FromArgb(CType(224, Byte), CType(224, Byte), CType(224, 
410
411Byte))   
412Me.Label3.Image = CType(resources.GetObject("Label3.Image"), System.Drawing.Image)   
413Me.Label3.Location = New System.Drawing.Point(64, 312)   
414Me.Label3.Name = "Label3"   
415Me.Label3.Size = New System.Drawing.Size(40, 16)   
416Me.Label3.TabIndex = 8   
417Me.ToolTip1.SetToolTip(Me.Label3, "暂停")   
418'   
419'Label4   
420'   
421Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, 
422
423Byte))   
424Me.Label4.Location = New System.Drawing.Point(296, 312)   
425Me.Label4.Name = "Label4"   
426Me.Label4.Size = New System.Drawing.Size(64, 16)   
427Me.Label4.TabIndex = 9   
428Me.ToolTip1.SetToolTip(Me.Label4, "帧数")   
429'   
430'Flashp   
431'   
432Me.Flashp.Enabled = True   
433Me.Flashp.Location = New System.Drawing.Point(424, 256)   
434Me.Flashp.Name = "Flashp"   
435Me.Flashp.OcxState = CType(resources.GetObject("Flashp.OcxState"), 
436
437System.Windows.Forms.AxHost.State)   
438Me.Flashp.Size = New System.Drawing.Size(120, 88)   
439Me.Flashp.TabIndex = 10   
440Me.ToolTip1.SetToolTip(Me.Flashp, "预览")   
441'   
442'Flash   
443'   
444Me.Flash.Enabled = True   
445Me.Flash.Location = New System.Drawing.Point(8, 24)   
446Me.Flash.Name = "Flash"   
447Me.Flash.OcxState = CType(resources.GetObject("Flash.OcxState"), 
448
449System.Windows.Forms.AxHost.State)   
450Me.Flash.Size = New System.Drawing.Size(376, 272)   
451Me.Flash.TabIndex = 11   
452'   
453'Label5   
454'   
455Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(0, Byte), CType(0, 
456
457Byte))   
458Me.Label5.Cursor = System.Windows.Forms.Cursors.Hand   
459Me.Label5.Image = CType(resources.GetObject("Label5.Image"), System.Drawing.Image)   
460Me.Label5.Location = New System.Drawing.Point(368, 312)   
461Me.Label5.Name = "Label5"   
462Me.Label5.Size = New System.Drawing.Size(16, 16)   
463Me.Label5.TabIndex = 12   
464Me.Label5.Text = " 1"   
465Me.ToolTip1.SetToolTip(Me.Label5, "折叠列表栏")   
466'   
467'PictureBox1   
468'   
469Me.PictureBox1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(224, Byte), 
470
471CType(192, Byte))   
472Me.PictureBox1.Cursor = System.Windows.Forms.Cursors.Hand   
473Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)   
474Me.PictureBox1.Location = New System.Drawing.Point(424, 224)   
475Me.PictureBox1.Name = "PictureBox1"   
476Me.PictureBox1.Size = New System.Drawing.Size(120, 24)   
477Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage   
478Me.PictureBox1.TabIndex = 13   
479Me.PictureBox1.TabStop = False   
480Me.ToolTip1.SetToolTip(Me.PictureBox1, "单击可更改图片")   
481'   
482'Timer2   
483'   
484Me.Timer2.Interval = 10   
485'   
486'Timer3   
487'   
488'   
489'Label6   
490'   
491Me.Label6.Image = CType(resources.GetObject("Label6.Image"), System.Drawing.Image)   
492Me.Label6.Location = New System.Drawing.Point(376, 8)   
493Me.Label6.Name = "Label6"   
494Me.Label6.Size = New System.Drawing.Size(16, 8)   
495Me.Label6.TabIndex = 16   
496'   
497'Label7   
498'   
499Me.Label7.Image = CType(resources.GetObject("Label7.Image"), System.Drawing.Image)   
500Me.Label7.Location = New System.Drawing.Point(352, 8)   
501Me.Label7.Name = "Label7"   
502Me.Label7.Size = New System.Drawing.Size(16, 8)   
503Me.Label7.TabIndex = 17   
504'   
505'Label8   
506'   
507Me.Label8.Image = CType(resources.GetObject("Label8.Image"), System.Drawing.Image)   
508Me.Label8.Location = New System.Drawing.Point(328, 8)   
509Me.Label8.Name = "Label8"   
510Me.Label8.Size = New System.Drawing.Size(16, 8)   
511Me.Label8.TabIndex = 18   
512'   
513'Form1   
514'   
515Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)   
516Me.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))   
517Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)   
518Me.ClientSize = New System.Drawing.Size(552, 360)   
519Me.ContextMenu = Me.ContextMenu1   
520Me.Controls.Add(Me.Label8)   
521Me.Controls.Add(Me.Label7)   
522Me.Controls.Add(Me.Label6)   
523Me.Controls.Add(Me.Flash)   
524Me.Controls.Add(Me.Button2)   
525Me.Controls.Add(Me.Button1)   
526Me.Controls.Add(Me.PictureBox1)   
527Me.Controls.Add(Me.Label5)   
528Me.Controls.Add(Me.Flashp)   
529Me.Controls.Add(Me.Label4)   
530Me.Controls.Add(Me.Label3)   
531Me.Controls.Add(Me.Label2)   
532Me.Controls.Add(Me.ListBox1)   
533Me.Controls.Add(Me.TrackBar1)   
534Me.Controls.Add(Me.Label1)   
535Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None   
536Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)   
537Me.Name = "Form1"   
538CType(Me.TrackBar1, System.ComponentModel.ISupportInitialize).EndInit()   
539CType(Me.Flashp, System.ComponentModel.ISupportInitialize).EndInit()   
540CType(Me.Flash, System.ComponentModel.ISupportInitialize).EndInit()   
541Me.ResumeLayout(False) 
542
543End Sub 
544
545#End Region   
546Dim strad As String = "skill/ad.gif"   
547Dim fbd As New FolderBrowserDialog   
548Dim ofd As New OpenFileDialog   
549Dim path As String = Application.StartupPath 
550
551Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
552
553Timer1.Tick   
554Try   
555Me.Label4.Text = Flash.FrameNum &amp; "/" &amp; Flash.TotalFrames 
556
557Me.TrackBar1.Value = Flash.FrameNum 
558
559Catch ex As Exception 
560
561End Try 
562
563  
564End Sub   
565Private mouse_offset As Point   
566Private Sub form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) 
567
568Handles MyBase.MouseDown   
569mouse_offset = New Point(e.X, e.Y)   
570End Sub 
571
572Private Sub form1_MouseMove(ByVal Sender As System.Object, ByVal e As 
573
574System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove   
575'按住鼠标左右键均可拖动窗体   
576If e.Button = MouseButtons.Left Or e.Button = MouseButtons.Right Then   
577Dim mousePos As Point = Sender.findform().MousePosition   
578'获得鼠标偏移量   
579mousePos.Offset(-mouse_offset.X, -mouse_offset.Y)   
580'设置窗体随鼠标一起移动   
581Sender.findform().Location = mousePos   
582End If   
583End Sub 
584
585  
586#Region " formLoad" 
587
588Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load   
589'.......列表循环(默认) 
590
591MenuItem16.Checked = True   
592bollooplst = True   
593Flash.Loop = False   
594'......................... 
595
596' Me.MaximizedBounds = New Rectangle(22, 22, 526, 355) 
597
598Me.Text = "奔腾 Flash Player 1.0"   
599Try   
600'picturebox   
601strad = GetSetting("FlashPlayer", "ad", "strad", strad) '加载图片的路径   
602Me.PictureBox1.Image = Image.FromFile(strad) '加载图片 
603
604'ICO   
605' Dim myico As New Icon("skill/myico.ico")   
606' Me.Icon = myico 
607
608  
609'===========加载皮肤========================================== 
610
611' from   
612' Me.BackgroundImage = Image.FromFile("skill\formbg.bmp") 
613
614'label   
615' Me.Label2.BackgroundImage = Image.FromFile("skill\play.bmp")   
616' Me.Label3.BackgroundImage = Image.FromFile("skill\pause.bmp")   
617' Me.Label1.BackgroundImage = Image.FromFile("skill\title.bmp")   
618' Me.Label4.BackgroundImage = Image.FromFile("skill\framcount.bmp")   
619' Me.Label5.BackgroundImage = Image.FromFile("skill\openlist.bmp")   
620'button   
621' Me.Button1.BackgroundImage = Image.FromFile("skill\openfile.bmp")   
622' Me.Label2.BackgroundImage = Image.FromFile("skill\opendir.bmp") 
623
624'================================================================= 
625
626path = GetSetting("FlashPlayer", "Movie", "Path", path)   
627Dim file As FileInfo   
628Dim dir As New DirectoryInfo(path)   
629For Each file In dir.GetFiles() 
630
631If file.FullName Like "*.swf" Then   
632Dim str As String = file.FullName 
633
634Me.ListBox1.Items.Add(str.Substring(str.LastIndexOf("\") + 1, str.LastIndexOf(".swf") 
635
636\- str.LastIndexOf("\") - 1)) 
637
638End If 
639
640Next 
641
642Flash.Movie = path &amp; "\" &amp; Me.ListBox1.Items.Item(0) &amp; ".swf" 
643
644Flash.Play()   
645sltcount = 0 
646
647Catch ex As Exception 
648
649MsgBox("皮肤文件加载错误") 
650
651End Try 
652
653End Sub 
654
655#End Region 
656
657  
658#Region "TrackBar1_Scroll" 
659
660Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
661
662TrackBar1.Scroll   
663Flash.GotoFrame(Me.TrackBar1.Value - 1) 
664
665Flash.Play() 
666
667End Sub   
668#End Region 
669
670#Region " Me.BackColor = Color.Green" 
671
672  
673Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
674
675MenuItem8.Click 
676
677  
678End Sub   
679#End Region   
680Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
681
682MenuItem12.Click   
683Me.Opacity = 0.6   
684End Sub 
685
686Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
687
688MenuItem13.Click 
689
690Me.Opacity = Val(InputBox("设置透明度(0.0 - 1.0)", "自由奔腾(wgscd)", 0.8)) 
691
692End Sub 
693
694Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
695
696MenuItem10.Click   
697Me.Opacity = 1.0 
698
699End Sub 
700
701Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
702
703MenuItem11.Click   
704Me.Opacity = 0.3   
705End Sub 
706
707Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
708
709MenuItem4.Click   
710If MenuItem4.Checked = False Then   
711MenuItem4.Checked = True   
712Me.TopMost = True   
713Else : MenuItem4.Checked = False   
714Me.TopMost = False   
715End If   
716End Sub 
717
718Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
719
720MenuItem5.Click 
721
722End Sub 
723
724Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) 
725
726Handles MyBase.Closing   
727SaveSetting("FlashPlayer", "Movie", "Path", path)   
728SaveSetting("FlashPlayer", "ad", "strad", strad)   
729SaveSetting("FlashPlayer", "ad", "strad", strad)   
730End Sub 
731
732Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) 
733
734Handles ListBox1.SelectedIndexChanged 
735
736  
737Dim str As String = Me.ListBox1.SelectedItem 
738
739If str.IndexOfAny("\") &gt;= 0 Then 
740
741Try   
742Flashp.Movie = Me.ListBox1.SelectedItem   
743Flashp.Stop() 
744
745Catch ex As Exception 
746
747End Try 
748
749Else   
750Flashp.Movie = path &amp; "\" &amp; ListBox1.SelectedItem &amp; ".swf" 
751
752  
753Flashp.Stop()   
754End If   
755End Sub   
756Dim sltcount As Integer = 0 '保存当前选择的项的index   
757Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles 
758
759ListBox1.DoubleClick   
760sltcount = CInt(Me.ListBox1.SelectedIndex) '保存当前选择的项的index   
761Dim str As String = Me.ListBox1.SelectedItem 
762
763If str.IndexOfAny("\") &lt; 0 Then 
764
765Flash.Movie = path &amp; "\" &amp; Me.ListBox1.SelectedItem &amp; ".swf"   
766Try 
767
768Me.TrackBar1.Maximum = Flash.TotalFrames 
769
770Catch ex As Exception 
771
772End Try   
773Me.Label1.Text = Me.ListBox1.SelectedItem   
774Timer1.Enabled = True 
775
776Flash.Play() 
777
778  
779Else : Flash.Movie = Me.ListBox1.SelectedItem 
780
781Flash.Play() 
782
783End If   
784End Sub 
785
786  
787Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
788
789Label5.Click   
790If Me.Width &gt; Me.ListBox1.Left + Me.ListBox1.Width + 5 Then 
791
792'   
793' Me.Width = Me.ListBox1.Left + Me.ListBox1.Width + 5 
794
795' Me.Height = Me.ListBox1.Left + Me.ListBox1.Width + 5 
796
797End If 
798
799  
800If Label5.Text = " 1" Then 
801
802Label5.Text = "" 
803
804Else   
805Label5.Text = " 1" 
806
807End If 
808
809Timer2.Enabled = True 
810
811' If (Me.Width &lt;&gt; 528) Or Me.Height &lt;&gt; 360 Then   
812'Me.Text = Me.Width &amp; " " &amp; Me.Height   
813' Me.Text = formW   
814' Me.Width = 528   
815' Me.Height = 360 
816
817' End If   
818' If Me.Width &gt;= Me.Width Then   
819' Me'Width = Me.Width - Me.ListBox1.Width - 8 
820
821' End If 
822
823  
824End Sub   
825Dim clickpuse As Boolean = False   
826Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
827
828Label3.Click   
829Flash.StopPlay()   
830clickpuse = True 
831
832End Sub 
833
834Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
835
836Label2.Click   
837Flash.Play()   
838End Sub 
839
840Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
841
842MenuItem14.Click   
843Flash.Loop = True   
844MenuItem16.Checked = False   
845bollooplst = False 
846
847End Sub 
848
849Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
850
851End Sub 
852
853Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
854
855MenuItem21.Click   
856Try 
857
858  
859Dim f As Integer   
860f = CInt(Val(InputBox("定位的帧数", "设置")))   
861If f &lt; 0 Or f &gt; Flash.TotalFrames Then   
862MsgBox("您的输入不正确") 
863
864Else : Flash.GotoFrame(f) 
865
866End If   
867Catch ex As Exception 
868
869End Try   
870End Sub 
871
872Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
873
874MenuItem22.Click   
875Flash.GotoFrame(1)   
876Flash.Play()   
877End Sub 
878
879Private Sub MenuItem26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
880
881MenuItem26.Click   
882Flash.Quality = 1 
883
884End Sub 
885
886Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
887
888MenuItem28.Click   
889Flash.Quality = 0   
890End Sub 
891
892Private Sub MenuItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 
893
894MenuIt</system.diagnostics.debuggerstepthrough()>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus