-
May 18th, 2006, 07:38 PM
#1
Thread Starter
Member
forms .tag property usage?
Hello, I'm trying to make an AIM client and I don't know exactly how to handle multiple forms. I know that I have to give each form a tag but then how would I, when an IM comes in, check to see if it's tag is equal to that tag and then send it to that specific form?
Thanks
-
May 18th, 2006, 07:53 PM
#2
Re: forms .tag property usage?
I don't like the tag property.
Add a custom property in your form and use it instead. That way, you can store any data type you like.
like,
VB Code:
Option Explicit
' Inside your form
Private m_MyProperty As String
Property Get MyProperty() As String
MyProperty = m_MyProperty
End Property
Property Let MyProperty(ByVal Value As String)
m_MyProperty = Value
End Property
Private Sub Form_Load()
m_MyProperty = "DefaultData"
End Sub
You can call it from anywhere in your project like any other default property.
Form1.MyProperty = "YourName"
MsgBox Form1.MyProperty
Last edited by iPrank; May 18th, 2006 at 08:03 PM.
Reason: Example modified to work on strings.
-
May 18th, 2006, 07:54 PM
#3
Thread Starter
Member
Re: forms .tag property usage?
I don't need any data type. all I need is a string. how would I do what I asked above?
-
May 18th, 2006, 07:55 PM
#4
Re: forms .tag property usage?
The Tag property is simply a container for any data related to the control that you want to store. For example, you might use it to store the initial value displayed in a control so that you can easily restore it if the user wants to undo his or her changes.
-
May 18th, 2006, 07:58 PM
#5
Re: forms .tag property usage?
If I remember correctly, the Tag property hasn't upgraded to .NET. So, migration may cause some problem.
Edit:
For restoring original values, you can simply store them as constants inside your form.
Last edited by iPrank; May 18th, 2006 at 08:02 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|