Filedownload1.0 is similar to using the thunder download function.

Source: Internet
Author: User

1. First, you need to add the registry information. You can set the registry information when installing the installation package, right-click the installation project, and choose View> registry. For details, see:

 

 

 

2. You need to use VB6.0 to write an ActiveX DLL,CodeSimple

 

Public sub addurl (byval strurl as string) <br/> dim retval <br/> retval = shell ("G:/project/FD/bin/debug/fd.exe" & strurl, 1) <br/> end sub

It is mainly used for starting. Net write downloads.ProgramAnd pass the downloaded URL path to the previous

 

3.20.write A geturl.htm file. This is actually a javascript code. Call ActiveX dll, and use the code to change the COM control name of thunder to your ActiveX DLL file.

 

Main experiences in this software:

1. If you want to set the default value of the registry key, you need to change the name of this key to the default value automatically when you use the code to obtain or set the default value of the key.

Key3.setvalue ("", my. application. info. directorypath & "/geturl.htm") 'sets the default value of a key. [targetdir] indicates the current program

Installation path, [productname] Code program name.

 

2. in C #, 0x represents the hexadecimal number. & H is used in VB.net.

 

3. To use the ME. bgw. cancelasync () method, set workersuppscanscancellation of backgroundworker to true.

 

4. Use of delegation

Declaration: Delegate sub downloadcompletesafe (byval canceled as Boolean)

 

Entity Functions

Public sub downloadcomplete (byval canceled as Boolean)

 

End sub

 

Call

Dim canceldelegate as new downloadcompletesafe (addressof downloadcomplete)
Me. Invoke (canceldelegate, true)

 

5. Timing

Dim speedtimer as new stopwatch

Speedtimer. Start ()

.....

Speedtimer. Stop ()

Time consumed

Speedtimer. elapsedmilliseconds

Reset

Speedtimer. Reset ()

 

6. Click the shortcut created by the main activity to create the independent activity and drag it to the user desktop and user program menu to create the desktop shortcut and start menu bar.

 

 

 

 

 

 

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.