Dim dlg As New OpenFileDialogdlg.Filter = "图形文件|*.bmp;*.jpg;*.gif;*.png;*.tif"
If dlg.ShowDialog = DialogResult.OK Then Dim bmp As new bitmap(dlg.FileName) msgbox(bmp.width) msgbox(bmp.height) bmp.disposeEnd If