Solved

SIMPLE Question on Variables....

Posted on 2004-10-17
1
222 Views
Last Modified: 2010-04-23
I am writing a Irc client, and you will be seeing a lot more questions like this =) but, for this one, I want to accomplish this:

declare a new dcc, what im thinking is something like dim newdcc(dcc-cnt) as new dcc-connection

and under that variable newdcc() i would like

newdcc().ip
newdcc().filename
newdcc().port
newdcc().length

how would i go about creating that type of variable ? im just looking to declare it at this point...
0
Comment
Question by:addicktz
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 350 total points
ID: 12336105
Declare a Structure

Public Structure DCC_Connection
        Dim ip As String
        Dim filename As String
        Dim port As Integer
        Dim length As Long
    End Structure

Then you can have the above statement

However you wil not be able to use a variable in the array Dimension i.e. dcc-cnt

So what you can do is just declare

dim newdcc() as new dcc_connection

i.e. leave the dimension empty, then later on in your program you can write

ReDim  newdcc(dcc_Cnt)

This will work




0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question