473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Visual Basic 2005 Express

Hi,

I recently installed that programing environment, and I'm wondering how to do
some of the things

I created a program that renames, moves, and copies file, most of the routine
are located in a DLL file that I created along with the main program, everything
work fine, but I can not get the routine running in the DLL to update a progress
bar and a label field that I would like the name of the file being processed to
appear

I checked in the help that comes with Visual Basic 2005 Express, but I can not
find how to do this

Any help would be appreciated
--
Thank you in Advance

Merci a l'Avance

Martin
Apr 5 '06 #1
1 1125
Martin,

A couple of options:

1. Pass the controls into the class in the dll, either as properties of the
class or as arguments to a method. For example:

Public Class MyClass1

Public Sub DoSomething(ByVal myLabel As System.Windows.Forms.Label)

For i As Integer = 1 To 10
'
'Processing
'
'Display something in the label
myLabel.Text = i.ToString
myLabel.Refresh()
Next

End Sub
End Class

Then on a form, call the method and pass it some control, in this case a
label:

Dim mc1 As New MyClassLibrary.MyClass1

mc1.DoSomething(Label1)

2. In the class in the dll, raise an event. Handle the event on a form. For
example:

Public Class MyClass2

Public Event DidSomething(ByVal SomeValue As Integer)

Public Sub DoSomething()

For i As Integer = 1 To 10
'
'Processing
'
'Raise an event
RaiseEvent DidSomething(i)
Next

End Sub
End Class

On a form:

Private WithEvents mc2 As New MyClassLibrary2.MyClass2

Private Sub mc2_DidSomething(ByVal SomeValue As Integer) Handles
mc2.DidSomething

Label1.Text = SomeValue.ToString
Label1.Refresh()

End Sub

Then call the method and let the event handler update the label:

mc2.DoSomething()

Kerry Moorman


"Martin Racette" wrote:
Hi,

I recently installed that programing environment, and I'm wondering how to do
some of the things

I created a program that renames, moves, and copies file, most of the routine
are located in a DLL file that I created along with the main program, everything
work fine, but I can not get the routine running in the DLL to update a progress
bar and a label field that I would like the name of the file being processed to
appear

I checked in the help that comes with Visual Basic 2005 Express, but I can not
find how to do this

Any help would be appreciated
--
Thank you in Advance

Merci a l'Avance

Martin

Apr 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bootstrap Bill | last post by:
A new Google group has been formed for the purpose of discussing the new Visual Studio Express products. http://groups-beta.google.com/group/Visual-Studio-Express The products are currently in...
6
by: Brian Henry | last post by:
Visual Basic 2005 Express: http://download.microsoft.com/download/f/c/7/fc7debaf-4513-4300-9e6a-8fe27be88cd1/vbsetup.exe Visual C# 2005 Express:...
4
by: Andrew Robinson | last post by:
My main dev machine has WinXp and VS2005 (pro). 1. I need to install VWD Express Edition so that I can do some instruction on this. Any issues with both on the same machine. Installation order?...
2
by: Progman | last post by:
I have Visual Studio 2005 Standard edition. Is ti the same thing as the Express edition or Standard is more?
8
by: Zardax | last post by:
Hi !!! I need to know if there is compatibility between VB 6.0 and Visual Basic 2005 Express Everything I need is to compile the VB 6.0 code in Visual Basic 2005 Express without re-write the...
3
by: Pitaridis Aristotelis | last post by:
Is there any way to create setup for a project made in Microsoft Visual Basic 2005 Express Edition
2
by: Hunk Gym | last post by:
VB.Net of Visual Studio.Net 2003 VS Visual Basic 2005 Express Edition Good Day! Would be appreciate if there is solution for the following problem: - In VB.Net of Visual Studio.Net 2003,...
3
by: pb | last post by:
Is it possible to create a class library in visual web developer 2005 express edition and complie into a dll? If so how?
10
by: kimiraikkonen | last post by:
Visual C#.NET 2005 express has some issues, unlike VB.NET 2005 has none of them: The most annoying one is: For example if there's a coding error, it must be reported at the buttom of the screen...
3
by: =?Utf-8?B?Rmxhc2hwcm8=?= | last post by:
i have googled this question but cannot find an answer. i'm running windows vista and i'm using Visual Basic Express 2008. i know the build event button SHOULD be in under the compile tag but i...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.