📄 15532.html
字号:
<html>
<head>
<title>提供API 的做法</title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>提供API 的做法</h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by <a href="mailto:sephiroth@optimasoft.com.tw">Sephiroth</a> on July 12, 1999 at 14:17:51:<p>
In Reply to: <a href="15474.html">Re: 如何用vb6取得图档的大小等相关资讯</a> posted by 小琳 on July 10, 1999 at 14:33:03:<p>
Private Type BITMAP<br> bmType As Long<br> bmWidth As Long<br> bmHeight As Long<br> bmWidthBytes As Long<br> bmPlanes As Integer<br> bmBitsPixel As Integer<br> bmBits As Long<br>End Type<p>Private Declare Function GetObject Lib "gdi32" Alias "GetObjectA" ( _<br> ByVal hObject As Long, _<br> ByVal nCount As Long, _<br> lpObject As Any) As Long<p>Private mobjPicture As StdPicture<p><br>Private Sub Form_Load()<p> Set mobjPicture = LoadPicture("C:\Test.jpg")<p>End Sub<p>Private Sub Form_Click()<p>Dim oBmp As BITMAP, tIconInfo As ICONINFO<br>Dim iPicWidth As Integer, iPicHeight As Integer<br> <br>'// 依图片种类算出图片大小<br> Select Case mobjPicture.Type<br> Case vbPicTypeBitmap<br> GetObject mobjPicture, LenB(oBmp), oBmp<br> With oBmp<br> iPicWidth = .bmWidth<br> iPicHeight = .bmHeight<br> End With<br> Case vbPicTypeIcon<br> '// 省略<br> .... <br> Case Else<br> End Select<p>End Sub
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 15532-->
</ul><!--end: 15532-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -