But the curve saves the country, we can save the rotten shit data in the resource as a file on the hard disk first, and then play it. Delete the generated rotten shit file after playing. For users who graduated from Yangshengtang, the effect is to play with the built-in rotten shit. Spray for a long time, paste the program, save it as form 1.frm, and then run it in VB6.
Error in direct operation. Of course there are errors. You must first create a resource file containing rotten shit according to the instructions, or specify a rotten shit file to see the effect.
The code is as follows:
-
Version 5.00
Start VB. Form Form 1
Background color = & amph800000a &
BorderStyle = 1' fixed single precision
Caption = "Form 1 "
ClientHeight = 6045
Client left = 45
ClientTop = 330
Client width = 7650
LinkTopic = "Form 1 "
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6045
Zoom width = 7650
StartUpPosition = 3' window default value
Start VB. Command button command 2
Caption = "Display"
Height = 855
Left = 4080
TabIndex = 1
Top = 4560
Width = 1935
end
Start VB. Command button command 1
Caption = "Close"
Height = 855
Left = 1920
TabIndex = 0
Top = 4560
Width = 1575
end
Start VB. Label 1
BackStyle = 0' transparent
Caption = shit in broadcast resources "
Height = 735
Left = 3960
TabIndex = 2
Top = 840
Width = 24 15
end
end
Attribute VB_Name = "Form 1 "
Attribute VB_GlobalNameSpace = False.
Attribute VB_Creatable = False
Attribute VB _ predicted = true.
Attribute VB_Exposed = False
Function: VB6, play the rotten shit embedded in the resource.
Project: You don't need to add anything else in project-reference and parts, just keep the default.
Resources: VB6 menu-external program-external program manager -VB 6 resource editor. Then Tools-Resource Editor-Add Custom Resource, import a SWF file on the hard disk and save it.
File: If you don't use the SWF file embedded in the resource, the program is simpler and can be used directly. Please refer to the program code comments.
Form: Nothing is needed, just add two button controls.
Test: 64-bit system crash 7, rotten shit control FlashPlayer 32 version.
In 2020, don't forget your initiative and remember your mission.
Production: Zhang Fuguier, an arrogant old bad boss, likes the WeChat old lady who graduated from Yangshengtang.
Dim SWFName As String' defines the file name of rancid excrement and the form of variables.
Private subcommand 1_Click ()
Remove rotten feces.
Command 1. Enabled = False
Command 2. Enabled = true
End joint
Private subcommand 2_Click ()
"ResToFile" saves the customized content in the resource as a swf file. If you use the ready-made swf file directly, just comment out this line.
Play with rotten shit
Command 2. Enabled = False
Command 1. Enabled = true
End joint
Private Sub-Form _Load ()
SWFName = App。 Path and path. "\FKlsn.swf"' uses the directory where this application is located.
SwfName = an existing SWF file of a directory on the hard disk.
swf name = hard " http:// 192. 168. 1.7/example。 Shock wave flash
swf name = Environ(" temp ")& amp; "\FKlsn.swf" uses the system temporary directory.
Command 1. Enabled = False
End joint
Sub RemoveSWF()
Control. Remove the "flash" and remove the rotten excrement.
Kill SWFName' and delete rotten shit files. If you don't use the rotten shit embedded in the resource, that is, use the hard disk or swf on the network, you need to comment out this line, that is, you don't need to delete the file to prevent it from being deleted or making mistakes.
End joint
Subplay file ()
Play rotten shit files
Dim tmpCtl as the object
Set tmpCtl = Me. Controls.Add("ShockwaveFlash。 Shock wave flash ","flash ")
tmpCtl。 Width = 2000
tmpCtl。 Height = 3200
tmpCtl。 Top = 200
tmpCtl。 Left = 0
tmpCtl。 Visible = true
My back color = RGB (192, 192, 192)' color, cement ash, looks beautiful.
Tmpctl. object.backgroundcolor = mybackcolor' stinking excrement background color.
Me. BackColor = MyBackColor' form background color. Her background color, like rotten excrement, seems to be transparent.
tmpCtl.object.LoadMovie 0,SWFName
End joint
Sub-recovery file ()
Write resources to a file.
Because shit control can't use resources, only files.
The name of the decaying feces file to be generated.
Dim FileByte() As Byte' is used to cache file contents.
If Dir(SWFName) = SWFName, delete the file (if it exists).
Kill SWFName
If ... it will be over.
File byte () = loadresdata (10 1, "custom")' reads the data in the resource,1kloc-0/is the index number.
Open the SWFName of the binary file as # 1
Put # 1,, file bytes.
Close # 1
End joint