Hello,
Issue 1 :
- Create a new user object < Customer Visual >
- Insert one picture control and one static text controls
- Enter a picture name for picture control and give a title in static text.
- This picture need to be a transparent picture
- Now the picture's background color and window's background color's are same
- Now change the background color of the window. Window background color changes, not of picture's and static text's
- Close the window and re-open
- Now picture's background color also got changed.
Why we need to close and re-open the window to see the changed effect ?
Issue 2
- Now in the constructor of the user object I change the background color of the window. Run it and we could see the effect of change
- Now in the mousemove event / get focus event, I change the color of the window's background color, only window's background color gets changed, not of picture's. Code given below
- Local External Function
- FUNCTION uint SetCapture(uint a_hWnd) LIBRARY "USER32.DLL"
SUBROUTINE ReleaseCapture() LIBRARY "USER32.DLL"
- FUNCTION uint SetCapture(uint a_hWnd) LIBRARY "USER32.DLL"
- Instance variables
-
Long il_backcolor = RGB(87,116,146)Long il_focuscolor = RGB(22,160,133)Long il_rc // Work Var for Return Code.Integer ii_rc // Work Var for Return Code.Boolean ib_rc // Work var for Return Code.Long il_MinX, il_MaxX, il_MinY, il_MaxY, il_x, il_y, il_width, il_heightBoolean ib_captured
-
-
Constructor event of the UO
-
il_Minx = This.X
il_MaxX = This.X + This.Width
il_MinY = This.Y
il_MaxY = This.Y + This.Heightil_X = This.X
il_Y = This.Y
il_Width = This.Width
il_Height = This.HeightThis.Backcolor = il_backcolor
st_1.Backcolor = il_backcolor
-
-
Mouemove event of static text control and picture button control (pbm_mousemove)
If Not ib_captured Then
ib_captured = TrueSetCapture(Handle(This))st_1.BackColor = il_focuscolorThis.Backcolor = il_focuscolorParent.Backcolor = il_focuscolorElseib_captured = xpos > 0 and xpos < this.width and ypos > 0 and ypos < this.HeightIf Not ib_captured ThenReleaseCapture()st_1.Backcolor = il_backcolorThis.Backcolor = il_backcolorParent.Backcolor = il_backcolorEnd IfEnd IfWhen mouse moves over the static text or picture control, back color of every object changes, including the windows, but not of picture's.
- Local External Function
Any thing I need to do, the change of back color of the picture control ? Changing the back color of the window in the editor or at the constructor event gives the correct effect not at run time. Is it a bug or I'm missing anything ?
Happiness Always
BKR Sivaprakash