EACam
Warrior
154 Posts |
Posted - May 12 2004 : 2:43:32 PM
|
No...don't give up...just use a different solution
|
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - May 12 2004 : 5:56:39 PM
|
This image demonstrates lines being deleted when an image is resized. A good way to see line deletion in action is to quickly create a project in VB, place an IMAGE, not a picture box, on the form in the top left corner, then put image1.height = y : image1.width = x in the form's Mouse Move event. You should be able to move the mouse and interactively change the size of the image and whatch what happens when the image gets bigger and smaller than its original size.
|
|
|
Peter
Administrator
Canada
67 Posts |
Posted - May 13 2004 : 1:16:41 PM
|
Yeah, I've run into this problem before too. Try turning off texture blending when you're resizing the buttons, that fixed it for me, although my borders were a little thicker. |
Talos Studios - VoodooVB - VB Gamer
|
|
|
Almar
Moderator
Netherlands
192 Posts |
Posted - May 15 2004 : 03:08:59 AM
|
Well, still haven't solved it... But the problem still seams to be a bit related t orounding as well..
sngY = (Int(sngY) * constTileSize) \ 1 sngWidth = (sngWidth * constTileSize) \ 1
gives the exit button a "bottom-top", but without, it doesn't.. (Just trying everything that comes to mind)
|
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - May 15 2004 : 6:53:17 PM
|
This this instead... sngY = Int(sngY + 0.5) * ConstTileSize.
Cint is for explicitly specifying the DATA TYPE of a number. The following statements are equivalent, MyNum = 23& : MyNum = CLng(23). Normally VB will use the smallest data type to store a number. The statement MyNum = 23 is really telling VB that the number '23' is either a BYTE or an INTEGER data type, but when the program is run it has to be converted to a LONG data type to fit in the variable MyNum. By explicitly specifying that the number 23 should be used as a LONG number, you save VB from doing an implicit data type conversion.
If you want to take a fractional number, for example, 3.14159 and trim the fractional part, 0.14159, then you would use either Int or Fix. Neither of those functions change the DATA TYPE of the number. For example, if you Dim S as Single: S = 3.14159 : S = INT(S), then NO data type converion is done. The INT and FIX functions are overloaded. Whatever data type you pass IN the function, you get the same thing OUT of the function. Of course, this only works with number data.
INT and FIX only truncate the fractional part of a number. If you want to round a fractional number to the nearest whole number, you can either use the ROUND function, or you can add 0.5 to the number before using INT or FIX. 1.5 should be rounded to 2 by normal mathematical rules. To get a correct answer, use INT(1.5 + 0.5). If you add 0.5 to the number before using INT, then this will work for negative nubmers as well, so you wouldn't need to use FIX. Also, this method doesn't have the same rounding errors as ROUND or CINT will cause.
|
|
|
|
|