Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached]
Help with DLC Control [attached] Help with DLC Control [attached]
Help with DLC Control [attached]
Go Back  Xtreme Visual Basic Talk > > > Help with DLC Control [attached]


Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2004, 02:19 AM
shiba126 shiba126 is offline
Centurion
 
Join Date: Jul 2003
Posts: 127
Question Help with DLC Control [attached]


Hi,

I have downloaded the DLC control to download files from the internet. I downloaded the control and compiled it into a VB6 OCX file, and have used it in VB.NET and it seems to download a single file OK.

However...

I need to download several files at once, so I thought - hell, why not create an array!!

I used the following

Code:
Public downloadControl(50) As Project1.DLCClass Public downloadCount As Integer = 0 Private Sub cmdDownload_Click() Handles cmdDownload.Click Dim strURL = [I]databasefield[/I] downloadControl(downloadCount).FileURL = strURL downloadControl(downloadCount).BeginDownload() downloadCount = downloadCount + 1 End Sub

However each time that I go to download a file, I get an error pointing at the .FileURL statement. I cannot remember the exact error as I am at a public terminal, but if you post that code into VB.NET 2003 or VB.NET 2005 Beta then you should get the same error.

If any help can be given, then thank you very much

Yours Chris

Note: the DLC is attached as the original OCX ready to be put into the .NET project.
Attached Files
File Type: zip DLC.zip (8.8 KB, 3 views)
Reply With Quote
  #2  
Old 11-03-2004, 06:26 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

Hi shiba126,

I have not looked at the OCX code but It's relatively easy to write a control to download a file(vb.net). Then you can leave the VB6 legency code behind.

I'll try to help you if i can, we can post the Code/Control here in this thread for others to use, unless a moderator will transfer it to the tuts section etc.

Just let me know what you want to do by (PM or Emailing Me).

the pig..
Reply With Quote
  #3  
Old 11-04-2004, 07:13 AM
shiba126 shiba126 is offline
Centurion
 
Join Date: Jul 2003
Posts: 127
Exclamation

Quote:
Originally Posted by piggybank1974
Hi shiba126,

I have not looked at the OCX code but It's relatively easy to write a control to download a file(vb.net). Then you can leave the VB6 legency code behind.

I'll try to help you if i can, we can post the Code/Control here in this thread for others to use, unless a moderator will transfer it to the tuts section etc.

Just let me know what you want to do by (PM or Emailing Me).

the pig..
On Error Goto PS

Hi,

Thanks for the reply. I really like this control, but to be frank I am finding it a pain in the *** to get an array going - I think I might understand it if I made my own control.

What I would like the control to do:

-Download numerous files at once
-Give each downloads progress

If anybody can help me with this, then I would graciously add my own two cents.

Thanks,
Chris.

PS:
I tried creating a Control Array on the actual DLC control, god **** Microsoft for taking them out!! The trouble is I can get the downloads to work in VB6 as I am able to create control arrays which help, but then there are some aspects in the project which require the VB.NET framework.
I found out about coding some control arrays in .NET, but the DLC control works in some funny way which doesn't let you use the

Code:
Friend DLCControl As New DLC 'It doesn't allow the use of New DLC, you have to go through classes and all kinds of crap, which doesn't guarantee an answer!

Cheers
Reply With Quote
  #4  
Old 11-05-2004, 12:54 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

The good old fashioned Control Array was a godsend, a lot of people including myself sometimes don't know why they left it out, probably to do with its not very .net ish.

that said there are loads of work around, I figured it out on my Server and Client classes in the end.

The trouble is you cannot use Withevents on a Control array.

the pig..
Reply With Quote
  #5  
Old 11-05-2004, 06:48 AM
blindreaper666's Avatar
blindreaper666 blindreaper666 is offline
Junior Contributor
 
Join Date: Aug 2004
Posts: 317
Default

Not sure if this will work for you but:

Code:
Public downloadControl(50) As Project1.DLCClass Public downloadCount As Integer = 0 Private Sub cmdDownload_Click() Handles cmdDownload.Click Dim i as integer For i = 0 to downloadcontrol.GetUpperBound(0) Dim strURL = [I]databasefield[/I] downloadControl(downloadCount).FileURL = strURL downloadControl(downloadCount).BeginDownload() downloadCount = downloadCount + 1 Next End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached] Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached] Help with DLC Control [attached]
Help with DLC Control [attached]
Help with DLC Control [attached]
 
Help with DLC Control [attached]
Help with DLC Control [attached]
 
-->