?
Solved

Array of Forms

Posted on 2006-06-29
5
Medium Priority
?
360 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

764 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