Description: PB in the static text control you can set different background color, but there is no way to set a transparent color, which in some special interface design it is very difficult request. This article provides a simple and transparent method of the text is no need to use API. As follows:
1, the establishment of a working space (workspace), named: transparent_st.
2, the establishment of an application (application), named: transparent_st.
3, the establishment of a visual user object, uo_transparent_st, type statictext, the definition of the following variables:
boolean ib_painting
4, the preparation of the Constructor event uo_transparent_st script:
// Transparent color 536,870,912
This.backcolor = 2 ^ 29
5, the definition of user-defined uo_transparent_st events, ue_paint (Event ID: pbm_paint)
IF IsValid (This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield ()
Loop
File list (Check if you may need any files):
transparent_st.pbl
transparent_st.pbt
transparent_st.pbw