|
-
Feb 3rd, 2001, 05:43 AM
#1
Thread Starter
Member
The pic don't leave the form in the top, or left side, but i cant get it to not leave the form in the bottom, or right side..
What's wrong?
Code:
If blnKeys(vbKeyUp) Then
If picFly.Top > 0 Then
picFly.Top = picFly.Top - 1
End If
End If
If blnKeys(vbKeyDown) Then
If picFly.Top < Me.Height Then
picFly.Top = picFly.Top + 1
End If
End If
If blnKeys(vbKeyLeft) Then
If picFly.Left > Me.Left Then
picFly.Left = picFly.Left - 1
End If
End If
If blnKeys(vbKeyRight) Then
If (picFly.Left + picFly.Width) > Me.Width - 100 Then
picFly.Left = Me.Width - picFly.Width - 100
End If
End If
-
Feb 3rd, 2001, 07:01 AM
#2
transcendental analytic
change Height to scaleheight and Width to Scalewidth
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 3rd, 2001, 07:48 AM
#3
Fanatic Member
Or do the conversions yourself....
Code:
Me.Height / Screen.TwipsPerPixelY
Me.Width / Screen.TwipsPerPixelX
picFly.Height / Screen.TwipsPerPixelY
picFly.Width / screen.TwipsPerPixelX
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 3rd, 2001, 07:59 AM
#4
transcendental analytic
eh, the height includes titlebar
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 3rd, 2001, 09:33 AM
#5
Fanatic Member
To get the height of the form minus the TitleBar...
Code:
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Private Const SM_CYCAPTION = 4
'.........
(Me.Height / Screen.TwipsPerPixelY) - GetSystemMetrics(SM_CYCAPTION)
'.......
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 3rd, 2001, 09:38 AM
#6
transcendental analytic
Right, and that's gotta be better because it uses api's right? Say shouldn't we stay with ScaleHeight and Scalewidth
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Feb 3rd, 2001, 10:04 AM
#7
Fanatic Member
Why I've been wasting my morning on this post:
1. Mobic doesn't need the Height or Width in Pixels
2. ScaleHeight returns the Height minus the titlebar
YoungBuck = BurntOut
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
Feb 3rd, 2001, 10:38 PM
#8
Good Ol' Platypus
Make sure that your form's scalemode is 3 - vbPixels
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 4th, 2001, 04:51 AM
#9
Thread Starter
Member
Thanx!
My little problem is no more..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|