[VB.net] stripping (11.01) (exe2swf format converter) of flash files in exe format)

Source: Internet
Author: User
Tags visual studio 2010

After several days of hard work, the program has been formed and the source code is now provided. Based on Visual Studio 2010 +. net Framework 3.5, the program is debugged on Windows 7.

Below is the code (writing comments is really annoying ):

Imports SystemImports System. IOPublic Class exe2swf Dim FPBB1 As Integer defines a variable used to save the Private Sub ZH1_Click (ByVal sender As System. object, ByVal e As System. eventArgs) Handles ZH1.Click Dim MBWJ1 As String If MBWenJianLJ1.Text = "" then' MBWJ1 = Mid (YWenJianLJ1.Text, 1, YWenJianLJ1.Text. length-3) & "swf" ': generate the default path, that is, the same as the source file Else MBWJ1 = MBWenJianLJ1.Text'; otherwise, use the entered destination file path End If File. Exists (YWenJianLJ1.Text) = False then', determine whether the source File Exists in MsgBox ("the File cannot be opened, and the source File path may be incorrect or does not exist! ", MsgBoxStyle. okOnly, "file opening error") Else Select Case FPBB1 'use the Select function to process files of different versions separately. Case 1' use the File Processing Method of Flash Player 8.0 r22 Player Dim wjsj () as Byte FileOpen (1, YWenJianLJ1.Text, OpenMode. 'open source file ReDim wjsj (LOF (1)-1581057) 'read source file FileGet (1, wjsj, 1581057) FileClose (1) FileOpen (1, MBWJ1, OpenMode. binary) 'Open the target file FilePut (1, wjsj,-1) 'write the target file FileClose (1) Case 2' use the File Processing Method of the Flash Player 9.0 r45 Player Dim Wjsj () As Byte FileOpen (1, YWenJianLJ1.Text, OpenMode. 'open source file ReDim wjsj (LOF (1)-2447561) 'read source file FileGet (1, wjsj, 2447561) FileClose (1) FileOpen (1, MBWJ1, OpenMode. 'Open the target file FilePut (1, wjsj,-1) 'write to the target file FileClose (1) case 3 'use the File Processing Method of the Flash Player 9.0 r115 Player Dim wjsj () As Byte FileOpen (1, YWenJianLJ1.Text, OpenMode. binary) 'open source file ReDim wjsj (LOF (1)-3391489) 'read source file FileGet (1, wjsj, 3 (391489) FileClose (1) FileOpen (1, MBWJ1, OpenMode. 'Open the target file FilePut (1, wjsj,-1) 'write to the target file FileClose (1) End Select MsgBox (YWenJianLJ1.Text & "has been converted successfully, and save it as "& MBWJ1 &"! ", MsgBoxStyle. OkOnly," converted successfully ") 'The If code segment is used to open the production file when the" open after conversion "option is selected. If WCDK1.Checked = True Then Process. start (MBWJ1,-0) end If YWenJianLJ1.Text = "" 'clear the text box MBWenJianLJ1.Text = ""' clear the text box ZH1.Enabled = false' disable the "convert" button WCDK1.Checked = false' deselect the "open after conversion" option WCDK1.Enabled = False 'Enable after 'Switch finished 'option cannot be DKWJ1.FileName = "" End Sub Private Sub LL1_Click (ByVal sender As System. object, ByVal e As System. eventArgs) Handles LL1.Click DKWJ1.ShowDialog () '. The open file dialog box YWenJianLJ1.Text = DKWJ1.FileName is displayed. The path of the opened file is displayed in the source file path text box. object, ByVal e As System. eventArgs) Handles LL2.Click BCWJ1.ShowDialog () 'show save file dialog box MBWenJianLJ1.Text = BCWJ1.FileName 'show the path of the target file in the destination file path text box End Sub Private Sub partition (ByVal sender As System. object, ByVal e As System. eventArgs) Handles YWenJianLJ1.TextChanged If YWenJianLJ1.Text = "" then' If the "source file path" text box is empty, the three single-choice buttons are unselected and cannot be used. FP8.Checked = False FP91.Checked = False FP92.Checked = False FP8.Enabled = False FP91.Enabled = False FP92.Enabled = False Else 'If the "source file path" text box contains content, the three radio buttons can be FP8.Enabled = True FP91.Enabled = True FP92.Enabled = True End If End Sub Private Sub FP8_CheckedChanged (ByVal sender As System. object, ByVal e As System. eventArgs) handles FP8.CheckedChanged If FP8.Checked = True Then 'If "Flash Player 8 single choice button" is set to ZH1.Enabled = true' "Conversion", use FPBB1 = 1' to assign the value "1" to "Flash Player "version "variable WCDK1.Enabled = true'" open after completion "Check button available End If End Sub Private Sub FP91_CheckedChanged (ByVal sender As System. object, ByVal e As System. eventArgs) Handles FP91.CheckedChanged If FP91.Checked = True Then ZH1.Enabled = True FPBB1 = 2 WCDK1.Enabled = True End If End Sub Private Sub FP92_CheckedChanged (ByVal sender As System. object, ByVal e As System. eventArgs) Handles FP92.CheckedChanged If FP92.Checked = True Then ZH1.Enabled = True FPBB1 = 3 WCDK1.Enabled = True End If End Sub Private Sub About1_Click (ByVal sender As System. object, ByVal e As System. eventArgs) Handles About1.Click About. show () End Sub Private Sub Help1_Click (ByVal sender As System. object, ByVal e As System. eventArgs) Handles Help1.Click Help. show () End SubEnd Class

If you need files, contact me or retrieve them on my network hard drive. At the same time, there are some favorite VB and PS tutorials.

Program and code: http://u.115.com/file/f47704fbea

Tutorial: http://u.115.com/file/f4ccd83c17

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.