Trying to update an old desktop app from 2000 to run on 64bit. All outdated graphics things. Seemed easy to fix and was up to a point. The app uses many mouseEnters and keyDowns to change the color of text in a canvas and play a tone. The updated code in the canvas paint each work separately but not together. Only the keyDown will work mouseEnter stops working. I use the canvas.mouseEnter and the window.keyDown to trigger the canvas paint code. Con’t find the conflict, help. I was never very good at this and haven’t used Xojo since 2015. I think I forgot more than I used to know! The canvas.paint code is below. Thanks.
//normal state - black to red on mouseenter/exit
if isEnter = true then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(300,0,0)//red
g.DrawString "do",5,20
elseif isEnter = false Then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(0,0,0)//black
g.DrawString "do",5,20
End if
//color state - black to blue on mouseenter/exit
if ColorBox.value and isEnter = true Then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(10,10,255)//blue
g.DrawString "do",5,20
elseif ColorBox.value = false and isEnter = false Then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(0,0,0)//black
g.DrawString "do",5,20
end if
//keyDown normal state black to red
if isDown = true then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(300,0,0)//red
g.DrawString "do",5,20
elseif isDown = false then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(0,0,0)//black
g.DrawString "do",5,20
end
//keyDown color state black to blue
if ColorBox.value and isDown = true Then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(10,10,255)//blue
g.DrawString "do",5,20
ElseIf ColorBox.value and isDown = False then
g.ClearRectangle(0, 0, me.Width, me.Height)
g.TextFont="Charcoal"
g.TextSize=18
g.DrawingColor=RGB(0,0,0)//black
g.DrawString "do",5,20
end