Home > Language Reference > Classes > Display
ResID Property
Identifier of the resource associated with the object.
Syntax
Public Property Get ResID() As Integer
Remarks
The ResID property returns the numeric identifier of the resource associated with this instance of the Display object. This identifier may prove useful when calling native API functions, or when a low level access to a resource is required.
According to the exact type of the object on which this property is called, the following remarks apply:
| Type | Remarks |
| Bitmap | If the object is not associated with a resource at design time, the returned value is 0. Calling this property does not cause the bitmap to be loaded. |
| Form | The ID of the form is returned. It is always greater than 2000. Calling this property does not cause the form to be loaded. |
| Any control | The ID of the control is returned. It is always greater than 100. Calling this property causes the form on which the control resides to be loaded, if necessary. |
| Popup | The ID of the popup trigger is returned. To obtain the ID of the associated popup list, simply Or this value with 4096. |
| SpinButton | The ID of the top spin button is returned. To obtain the ID of the bottom button, simply Or this value with 4096. |
| Graffiti | This control does not have an ID. The returned value is always 0. |
You can retrieve the identifier of a popup list associated in a Grid or GridEx control by first getting an instance of the list using the List property. For example:
Private Sub Button1_Click() MsgBox Grid1.List(2).ResID End Sub
You can use the identifier of a bitmap when you need to directly access the raw resource data. For example:
Private Sub Button1_Click()
Dim s As StreamMemory
Dim ptr As Long
Set s = App.Resource("Tbmp",MyBitmap.ResID)
ptr = Lock(s)
' Use ptr wherever a native function expects
' a BitmapType * pointer
Unlock s
End SubYou should not make any assumption other than those listed here on resource identifiers. Notably, you should expect identifiers to vary from one compilation to another.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |