专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > VB Dotnet

帮忙把下面一段VC代码转化为VB.net?多谢了

发布时间:2011-06-23 16:03:03 文章来源:www.iduyao.cn 采编人员:星星草
帮忙把下面一段VC代码转化为VB.net?谢谢了!
1.在SceneControl的ISceneGraphEvents.AfterDraw事件中处理以下过程 
..............
/************获取三维场景目标点****************/
  ICameraPtr ipCamera;
  ipSceneControl->get_Camera(&ipCamera);
  IPointPtr ipTarget;
  ipCamera->get_target(&ipTarget);
/****根据坐标点位置,在相应的MapControl中绘制点符号******/
  IMarkerElementPtr ipMarkerElement(CLSID_MarkerElement);
  IElementPtr ipElement(ipMarkerElement);
  ipElement->put_Geometry(ipTarget);

  IRgbColorPtr rgbColor_ip(CLSID_RgbColor);
  rgbColor_ip->put_Red(255);
  rgbColor_ip->put_Green(0);
  rgbColor_ip->put_Blue(0);
  IMarkerSymbolPtr ipMarkerSymbol(CLSID_SimpleMarkerSymbol);
  ipMarkerSymbol->put_Color(rgbColor_ip);
  ipMarkerSymbol->put_Size(6);
  ipMarkerElement->put_Symbol(ipMarkerSymbol);

  IActiveViewPtr ipMapActiveView;
  ipMapControl->get_ActiveView(&ipMapActiveView);
  IGraphicsContainerPtr ipGraphicsContainer(ipMapActiveView);
  ipGraphicsContainer->DeleteAllElements();

  ipGraphicsContainer->AddElement((IElementPtr) ipMarkerElement,0);

  ipMapActiveView->Refresh();
2.在MapControl的MouseDown事件中处理以下过程

  ICameraPtr camera_ip;
  ipSceneControl->get_Camera(&camera_ip);
  IPointPtr target_ip;
  camera_ip->get_Target(&target_ip);
  target_ip->put_X(mapX);
  target_ip->put_Y(mapY);
  camera_ip->put_Target(target_ip);

  ISceneGraphPtr ipSceneGraph;
  ipSceneControl->get_SceneGraph(&ipSceneGraph);
  ipSceneGraph->RefreshViewers();
本人对VC实在看不懂,哪位高手帮忙忙,把上面的代码转化为VB.net?谢谢了!

------解决方案--------------------
调用的类库不一样.即使能转.换成vb.net有参考价值么
------解决方案--------------------
你这代码就两种语句,一种定义变量,一种调用方法,看不懂?
定义变量的改成
ICameraPtr camera_ip;
--->
dim camera_ip as ICameraPtr 

调用方法的改成
ipSceneGraph->RefreshViewers();
--->
ipSceneGraph.RefreshViewers()
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: