View Single Post
  #1 (permalink)  
Old 03-05-2008, 06:50 PM
cpc6128 cpc6128 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 17
Default 'sprite' dragging (made progress but have new problems)

I was wondering whether someone who is better at basic4ppc than I could take a look at my code and tell me where I'm going wrong!

The attached project works on my desktop but has the following problems on my PPC:

a) the subroutine:

Sub hk_HardKeyPressed

Select hk.KeyPressed
Case hk.KeyEnter:
AppClose
End Select

End Sub

does not function as expected (i.e. to end the program). I am sure this is something very simple but I have the exact same subroutine in another program and it works fine!

b) The screen does not display properly on my PPC. This is probably due to the method I am using, which as is follows
1. in App_Start, I use formMain.DrawImage to draw a permanent background image onto the backlayer of formMain
2. then, every timer tick, I erase the entire forelayer of formMain and use formMain.fDrawImage to draw the appropriate icons onto it

The reason I want to draw the screen this way (rather than use Sprites) is so that the icons can be dragged around smoothly using the touch screen (currently they are constrained so they can only be dragged 2 hexes straight up). I realise that erasing and then re-drawing the entire forelayer every time is inefficient but that is something I can look at later.

Any ideas?
Attached Files
File Type: zip space.zip (62.1 KB, 15 views)
Reply With Quote