阅读:1057回复:0
如何实现打开多个表文件的问题
<P>procedure Tmain.N3Click(Sender: TObject);<BR>var filename : string;<BR> i:integer;<BR>begin<BR> OpenDialog1.Filter := 'MapInfo Tables(*.TAB)|*.TAB|(*.TIF)|*.TIF|jpg图片|*.jpg|Bmp位图|*.bmp|';<BR> OpenDialog1.Title := '选择要打开的图层';<BR> OpenDialog1.Execute;<BR> for i:=0 to opendialog1.Files.Count-1 do<BR> begin<BR> filename:=openDialog1.Files.Strings;<BR> If FileExists(filename)=true Then<BR> begin<BR> map1.OleObject.layers.add(filename);<BR> map1.Update;<BR> end<BR> else<BR> exit;<BR> end;<BR>end;</P>
<P>希望我的小程序能够给您有所帮助!</P> |
|