G
guan2000
Unregistered / Unconfirmed
GUEST, unregistred user!
我采用以下代码进行图片处理.
WordApp := CreateOleObject('Word.Application');
WordApp.Documents.Open(FileName:=edit1.Text, ReadOnly:=True);
Wordapp.ActiveDocument.PageSetup.LeftMargin :=0;
Wordapp.ActiveDocument.PageSetup.rightMargin :=0;
Wordapp.activeDocument.PageSetup.PageWidth:=500 * 0.75;
WordApp.ActiveDocument.Content.Select;
WordApp.ActiveDocument.content.Copy;
Image1.Picture.Assign(Clipboard);
showmessage('宽度为:'+inttostr(image1.Picture.Width)+'高度为:'+inttostr(image1.Picture.Height));
问题出在:绝大多数电脑得到的IMAGE1的大小是正常的,有个别电脑得到的IMAGE1的PICTURE的宽度,高度为原来宽度(500像数)的好几倍.得到的IMAGE1的图片很大,放大了好几倍.郁闷了三天了还是没有解决.其中WORD的显示比例都正常为100%.程序运完后我在画图里点击粘贴,得到的图片到是正常.宽度也是500.问题出在哪里啊?
即使使用了CLIPBOARD.OPEN,或create,也一样.
WordApp := CreateOleObject('Word.Application');
WordApp.Documents.Open(FileName:=edit1.Text, ReadOnly:=True);
Wordapp.ActiveDocument.PageSetup.LeftMargin :=0;
Wordapp.ActiveDocument.PageSetup.rightMargin :=0;
Wordapp.activeDocument.PageSetup.PageWidth:=500 * 0.75;
WordApp.ActiveDocument.Content.Select;
WordApp.ActiveDocument.content.Copy;
Image1.Picture.Assign(Clipboard);
showmessage('宽度为:'+inttostr(image1.Picture.Width)+'高度为:'+inttostr(image1.Picture.Height));
问题出在:绝大多数电脑得到的IMAGE1的大小是正常的,有个别电脑得到的IMAGE1的PICTURE的宽度,高度为原来宽度(500像数)的好几倍.得到的IMAGE1的图片很大,放大了好几倍.郁闷了三天了还是没有解决.其中WORD的显示比例都正常为100%.程序运完后我在画图里点击粘贴,得到的图片到是正常.宽度也是500.问题出在哪里啊?
即使使用了CLIPBOARD.OPEN,或create,也一样.