孜孜
路人甲
路人甲
  • 注册日期2004-05-04
  • 发帖数7
  • QQ
  • 铜币142枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1335回复:0

[求助]vb译为delphi

楼主#
更多 发布于:2008-11-02 21:16
<H2>请救:vb翻译为delphi</H2>
<DIV>Public Sub ListMaps()<BR>  <BR>  'Get IGraphicsContainer interface<BR>  Dim pGraphicsContainer As IGraphicsContainer<BR>  Set pGraphicsContainer = PageLayoutControl1.GraphicsContainer<BR>  pGraphicsContainer.Reset<BR>  <BR>  'Query Interface for IElement interface<BR>  Dim pElement As IElement<BR>  Set pElement = pGraphicsContainer.Next<BR>  <BR>  Dim index As Integer<BR>  index = 0<BR>  'Loop through the elements<BR>  Do While Not pElement Is Nothing<BR>  <BR>    'Query interface for IMapFrame interface<BR>    If TypeOf pElement Is IMapFrame Then<BR>      Dim pMapFrame As IMapFrame<BR>      Set pMapFrame = pElement<BR>      <BR>      'Query interface for IElementProperties interface<BR>      Dim pElementProperties As IElementProperties<BR>      Set pElementProperties = pElement<BR>      <BR>      'Get the name of the Map in the MapFrame<BR>      Dim sMapName As String<BR>      sMapName = pMapFrame.Map.Name<BR>      <BR>      'Set the name of the MapFrame to the Map's name<BR>      pElementProperties.Name = sMapName<BR>      'Add the map name to the ComboBox<BR>      cboMaps.AddItem pMapFrame.Map.Name, index<BR>      <BR>      'If the Map is the FocusMap select the MapName in the ComboBox<BR>      If sMapName = PageLayoutControl1.ActiveView.FocusMap.Name Then<BR>        cboMaps.ListIndex = index<BR>      End If<BR>      <BR>      index = index + 1<BR>    End If<BR>    Set pElement = pGraphicsContainer.Next<BR>  Loop<BR>End Sub<BR><BR>主要是<BR>If <FONT color=red>TypeOf pElement Is IMapFrame</FONT> Then 这句的红色部份在delphi中如何表示,先谢了!!</DIV>
喜欢0 评分0
游客

返回顶部