I don't understand this. Please clarify what you are saying.Yet for some reason when you change the image disappears open window mode, and the menu is still displayed normal.
bitmap resource
Re: bitmap resource
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: bitmap resource
Hi, Roger! I am grateful to you that you responded.
It seems everything has turned out as I wanted
[/size]
And what does this status mean?
Sometimes there is an error:

in the line:
One gets the impression that the file is in use, like hooya should already be available for use
It seems everything has turned out as I wanted
Code: Select all
STATIC FUNCTION ChangeBackground( oDlgBmp, aBitmaps )
LOCAL oBitmap
STATIC snPointer := 0
*MsgBox(TIME())
HH = VAL(SUBSTR(TIME(),1,2)) // Часы
MM = VAL(SUBSTR(TIME(),4,2)) // Минуты
SS = VAL(SUBSTR(TIME(),7,2)) // Секунды
mTime = HH*3600 + MM*60 + SS // Время, прошедшее с начала суток в секундах
D = 86400 / LEN( aBitmaps ) // Величина интервала имен фонов с одинаковым индексом
snPointer = 1 + INT( (mTime-1) / D ) // Индекс отображаемого фона
** Исключить недопустимые значения номера изображения
IF snPointer = 0 .OR. snPointer > Len(aBitmaps)
snPointer := 1
ENDIF
*** Проверять демонстрируемое изображение фона на совпадение контрольной суммы,
*** чтобы его невозможно было заменить использовать массив контрольных сумм/
*** Массив контрольных сумм формировать и записывать после формирования и записи фонов.
IF FILE("_CheckSum.arx")
aCheckSum = DC_ARestore("_CheckSum.arx")
* DC_ASave(aCheckSum, "_CheckSum.arx")
IF aCheckSum[snPointer] = FILECHECK(Disk_dir+'\Aid_data\BackGround\'+aBitmaps[snPointer,1])
IF oDlgBmp == nil .OR. oDlgBmp:status() = 0 .OR. Len(aBitmaps) = 0
RETURN nil
ENDIF
oBitmap := DC_GetBitmap(Disk_dir+'\Aid_data\BackGround\'+aBitmaps[snPointer,1])
oDlgBmp:lockUpdate(.t.)
oDlgBmp:drawingArea:bitmap := oBitmap
oDlgBmp:configure()
oDlgBmp:lockUpdate(.f.)
ENDIF
ENDIF
RETURN nil
And what does this status mean?
Code: Select all
oDlgBmp:status() = 0

in the line:
Code: Select all
IF oDlgBmp == nil .OR. oDlgBmp:status() = 0 .OR. Len(aBitmaps) = 0
Last edited by Eugene Lutsenko on Wed Oct 01, 2014 5:51 am, edited 1 time in total.
Re: bitmap resource
Eugene -
See below for a description of the :status() method.
I don't know why this is happening but apparently the oDlgBmp variable is not an object when this test occurs, probably due to a racing condition between threads. I recommend calling DC_SetTimerEvent() in the EVAL codeblock of DCREAD GUI to insure that the timer thread does not start until the dialog is fully created.
You can then change this:
to this:
Class
XbpPartHandler()
Syntax
:status() --> nStatus
Return
This method returns a numeric value indicating the current status of an Xbase Part. Possible return values correspond with #define constants listed in the XBP.CH file. The following values can be returned:
Return values of oXbp:status()
Constant Description
XBP_STAT_INIT Xbase Part object is initialized
XBP_STAT_CREATE The :create() method was called successfully
XBP_STAT_FAILURE The :create() method failed to obtain system resources
Description
Xbase Part objects can exist in different states during their "life cycle", depending on the methods :create() and :destroy() . The method :status() is used to determine the current status of an Xbase Part.
See below for a description of the :status() method.
I don't know why this is happening but apparently the oDlgBmp variable is not an object when this test occurs, probably due to a racing condition between threads. I recommend calling DC_SetTimerEvent() in the EVAL codeblock of DCREAD GUI to insure that the timer thread does not start until the dialog is fully created.
Code: Select all
DCREAD GUI ... EVAL {|o|oTimer := DC_SetTimerEvent(100,{||ChangeBackground(o,aBitmaps)})}
Code: Select all
IF oDlgBmp == nil .OR. oDlgBmp:status() = 0 .OR. Len(aBitmaps) = 0
Code: Select all
IF Len(aBitmaps) = 0
XbpPartHandler()
Syntax
:status() --> nStatus
Return
This method returns a numeric value indicating the current status of an Xbase Part. Possible return values correspond with #define constants listed in the XBP.CH file. The following values can be returned:
Return values of oXbp:status()
Constant Description
XBP_STAT_INIT Xbase Part object is initialized
XBP_STAT_CREATE The :create() method was called successfully
XBP_STAT_FAILURE The :create() method failed to obtain system resources
Description
Xbase Part objects can exist in different states during their "life cycle", depending on the methods :create() and :destroy() . The method :status() is used to determine the current status of an Xbase Part.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: bitmap resource
Thank you, Roger!
Now clearly always works:
Here's what happened (see 1.8 mode):
https://translate.google.com/translate? ... edit-text=
Now clearly always works:
Code: Select all
IF Len(aBitmaps) = 0
https://translate.google.com/translate? ... edit-text=
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: bitmap resource
How do I make the background is updated, previously open windows do not fall into the background and do not become invisible in the background, and remained in the foreground? Some of the windows are (eg 2.1), and some are lost (eg 1.3, 6.4), but the difference between them in a software implementation, which could affect it, I have not found
Re: bitmap resource
Try this:
Code: Select all
oDlg:drawingArea:bitmap := oBitmap
oDlg:drawingArea:sizeRedraw := .t.
oDlg:drawingArea:setSize(oDlg:drawingArea:currentSize())
oDlg:drawingArea:configure()
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: bitmap resource
Thank you, Roger!
Everything was working fine as I wanted! Of course before this I would never have thought of.
If quick launch system, an error occurs:

This is a string:
Is it possible to make the wait status of the desired object in the program display the background?
Another reason was the background update only after you restart the program.
Everything was working fine as I wanted! Of course before this I would never have thought of.
If quick launch system, an error occurs:

This is a string:
Code: Select all
oDlgBmp:drawingArea:bitmap := oBitmap
Another reason was the background update only after you restart the program.
Re: bitmap resource
I do not understand.
I will need a small sample program.
I will need a small sample program.
The eXpress train is coming - and it has more cars.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: bitmap resource
And let me show system, because to pick out a small portion of hard. There and the menu, and the ways and windows, etc. I'll just say what to call involved in this issue feature. They are easy to find by name and they are in the original text are close by.rdonnay wrote:I do not understand.
I will need a small sample program.
Re: bitmap resource
Then simply show me the code that calls DC_SetTimerEvent() and the function that it calls.
The eXpress train is coming - and it has more cars.