18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BUILDING APPLICATIONS WITH WINDOWS CONTROLS<br />

{<br />

regKey.DeleteSubKey("{B284D891-22EE-4F12-A0A9-B1DDED9197F4}");<br />

}<br />

}<br />

#endregion<br />

23. Build the project.<br />

24. In the Visual Studio .NET Windows Application project that you created at<br />

the beginning of this scenario, add the following code after the code to add<br />

the map navigation commands.<br />

private void Form1_Load(object sender, System.EventArgs e)<br />

{<br />

// Add Map navigation commands…<br />

// Add custom date tool.<br />

progID = "CSharpDotNETCommands.AddDateTool";<br />

axToolbarControl1.AddItem(progID, -1, -1, true, 0,<br />

esriCommandStyles.esriCommandStyleIconAndText);<br />

// Add commands to the ToolbarMenu.<br />

}<br />

25. Build and run the application and use the AddDateTool to add a text element<br />

to the PageLayoutControl containing today’s date.<br />

Chapter 6 • <strong>Developer</strong> scenarios • 351

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!