📄 2762.html
字号:
<html>
<head>
<title>VB 存 picturebox 做 BMP 档</title>
</head>
<BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="red" VLINK="#808080" ALINK="">
<center>
<h1>VB 存 picturebox 做 BMP 档</h1>
</center>
<HR><p>
Posted by <a href="mailto:kurama@mindless.com">Kurama</a> on May 05, 1998 at 14:54:09:<p>
本人是VB新手, 请各位高手多多指教:<p>为何picture7 (PictureBox) 内的图形能在程式内正常显示,<br>但用SavePicture存做bmp档时只存到一幅灰色的图 ?<br>请问错在何处 ? OR 应该用其他指令 ?<br>THANKS !!!!!<p>----------<br>'一个Form, 七个PictureBox<br>'a.bmp, b.bmp, 1.bmp, 2.bmp, 3.bmp, 4.bmp : 24bits 100*100 BMP 档<br>'存出来的 car1.bmp : 24bits 600*100 BMP 档, 但不知为何只得灰色 ?<p>Private Sub Form_Activate()<br> Picture7.PaintPicture Picture1, 0, 0, 100, 100, 0, 0, 100, 100<br> Picture7.PaintPicture Picture2, 100, 0, 100, 100, 0, 0, 100, 100<br> Picture7.PaintPicture Picture3, 200, 0, 100, 100, 0, 0, 100, 100<br> Picture7.PaintPicture Picture4, 300, 0, 100, 100, 0, 0, 100, 100<br> Picture7.PaintPicture Picture5, 400, 0, 100, 100, 0, 0, 100, 100<br> Picture7.PaintPicture Picture6, 500, 0, 100, 100, 0, 0, 100, 100<br>End Sub<p><br>Private Sub Form_Load()<p>AutoRedraw = True<br>ScaleMode = 3<p>Picture1 = LoadPicture("c:\project\a.bmp")<br>Picture2 = LoadPicture("c:\project\b.bmp")<br>Picture3 = LoadPicture("c:\project\1.bmp")<br>Picture4 = LoadPicture("c:\project\2.bmp")<br>Picture5 = LoadPicture("c:\project\3.bmp")<br>Picture6 = LoadPicture("c:\project\4.bmp")<p> With Picture1:<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture2<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture3<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture4<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture5<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture6<br> .Visible = False<br> .AutoRedraw = True<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 100<br> .Height = 100<br> End With<p> With Picture7<br> .ScaleMode = 3<br> .BorderStyle = 0<br> .Width = 600<br> .Height = 100<br> .AutoRedraw = True<br> End With<p>SavePicture Picture7.Image, "c:\project\car1.bmp"<p>End Sub<br>----------
<br>
<p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 2762-->
<!--top: 2763--><li><a href="2763.html"><b>顺序不对</b></a> 小吴 <i>18:34:55 5/05/98</i>
(<!--responses: 2763-->0)
<ul><!--insert: 2763-->
</ul><!--end: 2763-->
</ul><!--end: 2762-->
<br><HR><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -