Why did not show in the lower right corner in picBack ah, but to slant on many
CodePudding user response:
The computer image coordinate system default origin is the upper left cornerCodePudding user response:
Above or use the digital speak,In addition your picturebox scalemode is the use of a pixel?
CodePudding user response:
Coordinate unit, VB controls twip by default, USES the API function is pixel, suggested that the control's first units unified into pixelCodePudding user response:
PictureBox. PaintPicture is the BitBlt encapsulation, unit conversion all need not you do,Why trouble trouble until trouble troubles you,
CodePudding user response:
I want to draw the curve of a period of time, checked the online, but I don't how to use theBITBIT?
CodePudding user response:
In any position drawingsUse PaintPicture method, can be in the form, picture box and Printer anywhere on the object, drawing graphics, PaintPicture method syntax is:
[object] PaintPicture PIC, destX destY [destWidth [destHeight [, srcX _
[srcY [, srcWidth, srcHeight [[, Op]]]]]]]
Target object refers to the form, the Picture box or Printer objects, these places are premises of PIC image performance, if the object is ignored, argues that the specified is the current form, the PIC parameter must be an object images, it is decided by the Picture form or control properties,
DestX and destY parameters, it is according to the objec ScaleMode, the image will appear in the horizontal and vertical position, destWidth and destHeight parameter is optional and is used to set width and height of the image in the target object,
SrcX and srcY parameters are optional, used to define the top left corner of the PIC in the cutting area x and y coordinates,
Optional Op parameters used to define when drawing on the target object, AND perform on the image of the raster operation (for example, the AND AND XOR),
PaintPicture method can replace the BitBlt Windows API functions, the rectangular graphics block any move from one place to another place, it can perform a wide range of various operations,
For example, you can use PaintPicture method to generate multiple copies of the same type of bitmap, and put them flat out on the form, using this method, faster than moving images controls in the form, the following code is used for tile image control of 100 copies, and through setting a negative value to destWidth, can make each image to flip horizontal,
For I=0 To 10
For j=0 To 10
Form1. PaintPicture picF. Picture, j * _
PicF. Width, I * picF. Height, _
PicF. - picF. Height Width,
Next j, I
Details please refer to the "language reference" PaintPicture method ", "