Application object
237
ActiveDocument.InsertText('<p></p>', false);
}
}
}
GetImageHeight
Syntax
GetImageHeight(const wsImageName: WideString): Integer;
Description
Returns the height in pixels of the passed image. Returns
0
on error.
Example
/*
Tests GetImageHeight, GetImageWidth
Looks for first GIF image in current directory
*/
function Main(){
with (Application) {
aFileObj= new ActiveXObject("Scripting.FileSystemObject");
aFolder= aFileObj.GetFolder(CurrentFolder);
aFiles= new Enumerator(aFolder.files);
sExtToTest= 'gif';
sFile= '';
for (; !aFiles.atEnd(); aFiles.moveNext()){
if (aFileObj.GetExtensionName(aFiles.item())
== sExtToTest){
sFile = aFiles.item();
break;
}
}
if (!sFile == ''){
sMsg = sFile + '\n\n' + 'Height = ' +
GetImageHeight(sFile) + '\n';
sMsg = sMsg + 'Width = ' + GetImageWidth(sFile);
MessageBox(sMsg, 'GetImageHeight/Width Test', 0);
}
else{
MessageBox('No images found in current directory',
'GetImageHeight/Width Test', 0);
}
}
}
Summary of Contents for HOMESITE
Page 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Page 12: ...xii Contents...
Page 20: ...xx About This Book...
Page 28: ...8 Chapter 1 Setting Up the Product...
Page 70: ...50 Chapter 4 Managing Files...
Page 88: ...68 Chapter 5 Writing Code and Web Content...
Page 116: ...96 Chapter 6 Editing Pages...
Page 148: ...128 Chapter 7 Using Web Development Languages...
Page 190: ...170 Chapter 11 Deploying Files...
Page 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Page 216: ...196 Chapter 13 Extending the Help System...
Page 350: ...330 Glossary...
Page 358: ...338 Index...