在线等待-50分  form的tag属性是什么啊
===============================================================返回或设置一个表达式用来存储程序中需要的额外数据。与其它属性不同,Tag 属性值不被 Visual Basic 使用;可以用该属性来标识对象。
语法
object.Tag [= expression]

Tag 属性语法包含下面部分:
部分 描述object 对象表达式,其值是“应用于”列表中的一个对象。
expression 字符串表达式用来标识对象,缺省值为零长度字符串 ("")。

说明
利用该属性可以给对象赋予一个标识字符串,而不会影响其任何其它属性设置值或引起副作用。当需要检查控件或作为变量传递给过程的 MDIForm 对象的标识时,Tag 属性是有用的。
提示   创建一个新的窗口实例时,给 Tag 属性赋予唯一值。

解决方案 »

  1.   

    Tag 属性示例
    这个例子为每个被拖动的控件显示一个单独的图标。要尝试这个例子,请将代码粘贴到包含三个 PictureBox 控件的窗体的声明部分。将 Picture1 和 Picture2 的 DragMode 属性设置为一,然后按 F5 键。使用鼠标在 Picture3 上面拖曳 Picture1 和 Picture2。Private Sub Form_Load ()
        Picture1.Tag = "ICONS\ARROWS\POINT03.ICO"
        Picture2.Tag = "ICONS\ARROWS\POINT04.ICO" 
    End SubPrivate Sub Picture3_DragOver (Source As Control, X As Single, Y As Single, State As Integer)
       If State = vbEnter Then
          ' 根据每个图片框的 Name 属性选择。
          Select Case Source.Name
          Case "Picture1"
             ' 加载 Picture1 的图标。
              Source.DragIcon = LoadPicture(Picture1.Tag)        Case "Picture2"
             ' 加载 Picture2 的图标。
              Source.DragIcon = LoadPicture(Picture2.Tag)
          End Select
       ElseIf State = vbLeave Then
          ' 当 Source 不在 Picture3 之上时,卸载图标。
          Source.DragIcon = LoadPicture ()
       End If
    End Sub
      

  2.   

    请关注下面的贴子
    http://www.csdn.net/expert/topic/701/701403.xml?temp=.7961542
      

  3.   

    All controls support the Tag property, without exception. This is true even for ActiveX controls, including any third-party controls. How can I be so certain that all controls support this property? The reason is that the property is provided by Visual Basic itself, not by the control. Tag isn't the only property provided by Visual Basic to any control: Index, Visible, TabStop, TabIndex, ToolTipText, HelpContextID, and WhatsThisHelpID properties all belong to the same category. These properties are collectively known as extender properties. Note that a few extender properties are available only under certain conditions. For example, TabStop is present only if the control can actually receive the focus. The Tag property is distinctive because it's guaranteed to be always available, and you can reference it in code without any risk of raising a run-time error.The Tag property has no particular meaning to Visual Basic: It's 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