Solved

Array of Forms

Posted on 2006-06-29
5
316 Views
Last Modified: 2012-05-05
Hi, I was wondering how to create an Array of Form due to the fact that Index Property is no longer possible in VB 2005
So What I want to do, TheLearnedOne if you remember our last conversation

I need to send a message to (for example) Room 2.
What I dont undestand is, the RoomID is on a SQL databse okay, I get can it no problem in VB. But last time, you were saying it could the solution to get the frm as instance and send message to room(roomNumber)

Thats mean my rooms would be on array right ?
0
Comment
Question by:PhilippeRenaud
  • 3
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17010735
Philippe,

I don't understand your question.  Do you have the link to the previous question still?

Bob
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 17011342
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21899336.html


You told me to do that:

Private m_hashRooms As New Hashtable

...
   Dim frm As New frmRoom(roomNumber)
   m_hashRooms.Add(roomNumber, frm)

    Public Sub SendMessageToRoom(ByVal roomNumber As Integer, ByVal message As String)
         Dim frm As frmRoom = m_hashRooms(roomNumber)
         frm.SendMessage(message)
      End Sub

But the frmRoom(roomNumber) means an Array of form right?
So where or or do I create this array.  For example, when the user open the Room 1, write Hello on the chat, press send. It should send to all Room 1.  my question is Do i have to create an Array of Form for that
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17011519
Sorry, I was thinking about adding an argument to the form's New constructor, and passing in a room number:

Public Sub New(ByVal roomNumber As Integer)

End Sub

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17011528
I guess you aren't a mind reader, huh?  *WINK*

Bob
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 17011575
Well, im confused on what i am doing.
Maybe I go too far though, im trying to create a Multi-Chat users and Rooms. There is no such examples with VB.NET and VB2005 . I didnt find. I found some for Vb6 with winsock but Its quite old now.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now