Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的代码:
Form1.Picture = LoadPicture("C:\Users\User\Desktop\1xxx-LOGO-brand-.jpg", , , 913, 486)
我使用此代码成功加载图片。但是,X 和 Y 坐标不起作用。IT 在默认坐标 (0,0).a 处加载
我应该如何设置要在表单中加载的图片的位置?
谢谢
X/Y 参数是LoadPicture()指从图标或光标文件中提取的宽度/高度。所以这不是你想要的。
LoadPicture()
相反,将Form1's设置AutoRedraw为True和ScaleModeto3 - Pixel并使用以下代码行:
Form1
AutoRedraw
True
ScaleMode
3 - Pixel
Form1.PaintPicture LoadPicture("C:\Users\User\Desktop\1xxx-LOGO-brand-.jpg"), 913, 486