Regarding the Delay(400) comment earlier. There is something else that I just thought of that could be a factor. And that is your system mouse settings. Some like to change their system mouse settings button response time to faster or slower. I don't with XP, but I use to with win98. That would have an effect on that part of the program, and changing that delay value would probably be needed.
thefool wrote:
If i move the window, the whole program is taking ages to refresh!
At reading your reply, I immediately tried moving the window while using the various features of the program with out any ill effects. There was no slow down, and every thing worked as normal. I'm using XP Pro, with several other programs running at the same time. The only time that I would see 'everything' slow down, was when I was running my anti virus program which took close to 100% of my CPU time while running, and that would be expected. Also if I could ask. What platform are you using? I don't have Win98 anymore so I can't test on that platform. There maybe some features that allow it to run better in XP then with win 98.
Does any one else have this problem ?
At least I have provided the complete 'commented' source, so anyone can experiment if they want to try something different. As I am new to purebasic and just learning. Perhaps some could post better ideas of how to do some parts in a better way. For example, one thing I couldn't solve was when using the buttons that move all three slides. Only the top number (red) would update during the moving. The lower green and blue numbers would always update after releasing the mouse button. If I switched the order around, in example putting green first. Then the green one would be the only number that would update during the moving. The rest would always update after releasing the mouse button. It would appear to me that they should all update like the first one in line does, as it's using the same code approach.
It's a minor thing because the end results is achieved, but I'm just curious as to why the other two would behave that way in the program. You would think that they should all update at the same time.
Code: Select all
Case 26 ; ButtonGadget #26 "all bars <If>0
If green>0
If blue>0
red=red-1
green=green-1
blue=blue-1
;This should cause all three numbers to change, but only the first
;number, red in this case, changes until you release the mouse button.
;Then they all change to their correct values.
SetGadgetText(2, Str(red))
SetGadgetState(1,red)
SetGadgetText(12, Str(green))
SetGadgetState(11,green)
SetGadgetText(22, Str(blue))
SetGadgetState(21,blue)
i=0
EndIf
EndIf
EndIf
Case 27 ; ButtonGadget #27 "all bars >"
If red<255
If green<255
If blue<255
red=red+1
green=green+1
blue=blue+1
;As above. This should cause all three numbers to change, but
;only the first number changes until you release the mouse button.
;Then they all change to their correct values.
SetGadgetText(2, Str(red))
SetGadgetState(1,red)
SetGadgetText(12, Str(green))
SetGadgetState(11,green)
SetGadgetText(22, Str(blue))
SetGadgetState(21,blue)
i=0
EndIf
EndIf
EndIf