
NotateXpress v9 .NET FAQ |
![]() |
| Q1: How do I connect the ImagXpress and NotateXpress controls? |
| Q2: How do I disconnect the ImagXpress and NotateXpress controls? |
| Q3: How do I create an annotation object programmatically? |
| Q4: How do I keep track of the current layer? |
| Q5: How do I make annotations permanent? |
| Q6: How do I use the Toolbar? |
| Q7: How do I use and modify the Context menu? |
| Q8: How do I distribute my application (in .NET, Delphi, VB etc.)? |
| Q9: What DLL's do I need to distribute with my application? |
| Q10: Where can I find additional “How To” type sample code that demonstrates the usage of the control? |
Q1: How do I connect the ImagXpress and NotateXpress controls? |
| Set the NotateXpress.ClientWindow property to the window handle of the ImagXpress View Window to which you wish to add annotation capability. For example, NotateXpress.ClientWindow = ImageXView1.Handle |
Q2: How do I disconnect the ImagXpress and NotateXpress controls? |
| Call the NotateXpress ClientDisconnect() method. This is equivalent to setting NotateXpress.ClientWindow to System.IntPtr.Zero. |
Q3: How do I create an annotation object programmatically? |
| 1. Create a programmable element (i.e.RectangleTool, TextTool, etc.). For example, PegasusImaging.WinForms.NotateXpress9.BlockHighlightTool highlight = new BlockHighlightTool(); 2. Set the attributes of this element to specify its characteristics (see the Tool’s properties and methods in the NotateXpress .NET helpfile). For example, highlight.BoundingRectangle = new Rectangle(100, 100, 300, 300); highlight.FillColor = Color.Blue; highlight.ToolTipText = "Block Highlight"; 3. Call the NotateXpress.Layers.Selected method and assign the return value to a Layer object. For example: Layer layer = notateXpress1.Layers.Selected(); 4. Call the Layer.Elements.Add method to add the element to the element collection. For example, layer.Elements.Add(highlight); |
Q4: How do I keep track of the current layer? |
| Although you can always call the NotateXpress.Layers.Selected method to receive a reference to the current Layer, here is an easy way to keep track of the current layer: 1. Declare your own current Layer object. For example, Layer currLayer = new Layer(); 2. In NotateXpress's CurrentLayerChange event, set this object to the CurrentLayerChangeEventArgs’s Layer property value passed in the event. For example, currLayer = e.Layer; |
Q5: How do I make annotations permanent? |
| Call the NotateXpress.Layers.Brand method and specify the desired bit depth as the parameter. For example, notateXpress.Layers.Brand(24); |
Q6: How do I use the Toolbar? |
| 1. Make sure NotateXpress1.InteractMode property is equal to Edit (Edit is the default). 2. Make sure to create a layer by creating a Layer object and pass it in the NotateXpress.Layers.Add method. 3. Set the Layer.Toolbar.Visisble property equal to true. It is common to have NotateXpress' toolbar visible while ImagXpress' toolbar is also visible. If ImagXpress' toolbar is currently set to a tool other than the pointer (Tool_none) the NotateXpress toolbar tools will not activate. Inform the user to set the ImagXpress tool to the pointer to be able to use the NotateXpress toolbar. A strongly worded tooltip for the pointer arrow is a good measure. |
Q7: How do I use and modify the Context menu? |
| 1. To enable the built-in Context menu, call the NotateXpress.MenuSetEnabled method with the MenuType parameter set to Context, AnnotationTool set to NoTool, and Enabled equal to true. For example, notateXpress.MenuSetEnabled(PegasusImaging.WinForms.NotateXpress9.MenuType.Context, PegasusImaging.WinForms.NotateXpress9.AnnotationTool.NoTool, true); 2. Make sure the PointerTool is selected. If you want to modify the strings that are displayed on the context menu, call NotateXpress.MenuChangeItem. To remove an item call NotateXpress.MenuDeleteItem. To determine what items are available on the Context menu, use NotateXpress.MenuGetFirstItemID and NotateXpress.MenuGetNextItemID to iterate through the available context menu items, calling NotateXpress.MenuGetItem with the various IDs. To add additional user-defined items to the Context menu, use NotateXpress.MenuAddItem. |
Q8: How do I distribute my application (in .NET, Delphi, VB etc.)? |
| PLEASE NOTE: NotateXpress is unlocked using the ImagXpress 9 .NET instructions. Please refer to: http://www.pegasusimaging.com/imagxpress9faq.htm#Q2 |
Q9: What DLL's do I need to distribute with my application? |
| PegasusImaging.WinForms.NotateXpress9.dll |
Q10: Where can I find additional “How To” type sample code that demonstrates the usage of the control? |
| Please refer to the “How To” section in the Contents section of the appropriate help file (.NET or ActiveX) for sample code showing the use of the control. |