| ASoft 
 
 
 Anmeldungsdatum: 06.12.2014
 Beiträge: 2
 
 
 | 
			
				|  Verfasst am: 06.12.2014, 19:26    Titel: Problem mit Mausabfrage und GetKey |   |  
				| 
 |  
				| hallo Comunity Habe ein Malprogramm geschrieben und habe ein Problem mit der Maus abfrage. Hier mal der code (Problemteil unten extra nochmal aufgeschrieben)
 -------------------------------------------------------------------------------------
 
  	  | Code: |  	  | Function Mousei(posi As integer)As Integer
 Dim As Integer x,y,Mouse,buttons,z,k,b,n,i,l,col=1,fab=4,key1
 Screen 19
 
 ScreenInfo b,n
 For l=0 To b+1
 Color col
 For i = 0 To n+1
 If i <51 Then
 PSet(l,i)
 col+=1
 EndIf
 Next
 
 Next
 Do
 Mouse = GetMouse(x,y,,buttons)
 Print x,y
 If buttons And 1 Then
 If x<b+1 And x >-1 And y <51 And y>-1 Then
 For fab=1 to Point(x,y)
 Next
 Print fab
 
 
 ElseIf x >-1 And x <b+1 And y >51 And y <n+1 And z >-1 And z <b+1 And k >51 And k <n+1 Then
 Line(x,y)-(z,k),fab
 EndIf
 EndIf
 Sleep 10,1
 z = x
 k = y
 key1 = GetKey
 If key1 = 113 Then
 GoTo ende
 EndIf
 Loop
 Sleep
 ende:
 End Function
 Print Mousei(1)
 
 | 
 -------------------------------------------------------------------------------------
 Speziel liegt der Fehler wohl in diesem Teil bei der Mausabfrage
 -------------------------------------------------------------------------------------
 
  	  | Code: |  	  | Do
 Mouse = GetMouse(x,y,,buttons)
 Print x,y
 If buttons And 1 Then
 If x<b+1 And x >-1 And y <51 And y>-1 Then
 For fab=1 to Point(x,y)
 Next
 Print fab
 ElseIf x >-1 And x <b+1 And y >51 And y <n+1 And z >-1 And z <b+1 And k >51 And k <n+1 Then
 Line(x,y)-(z,k),fab
 EndIf
 EndIf
 Sleep 10,1
 z = x
 k = y
 Loop
 -------------------------------------------------------------------------------------
 | 
 
 Editiert durch Moderator: Ursprünglichen Titel "Programmier problem" durch etwas Konkreteres ersetzt. (Sebastian)
 |  |