'We assume that the GdViewer1 control has been properly integrated and your document has been properly displayed as well.
'To successfully follow this example, please use the code snippet attached to AddRegion or AddRegionInches methods
'to define highlighted regions or define some highlighted regions using SearchText methods by yourself.
Dim regID As Integer = 0, regCount As Integer = GdViewer1.RegionCount()
If regCount > 0 Then
Dim firstMode As ForegroundMixMode = GdViewer1.GetRegionMixMode(GdViewer1.GetRegionID(1))
Dim currMode As ForegroundMixMode = ForegroundMixMode.ForegroundMixModeUNDEFINED
Dim newMode As ForegroundMixMode = ForegroundMixMode.ForegroundMixModeBLACK
For j As Integer = 1 To regCount
regID = GdViewer1.GetRegionID(j)
currMode = GdViewer1.GetRegionMixMode(regID)
If currMode = firstMode Then GdViewer1.SetRegionMixMode(regID, newMode)
Next
'Redrawing regions with the newly defined mix mode parameter.
GdViewer1.Redraw()
Else
MessageBox.Show("No highlighted region found related to this document. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetRegionMixMode")
End If
//We assume that the GdViewer1 control has been properly integrated and your document has been properly displayed as well.
//To successfully follow this example, please use the code snippet attached to AddRegion or AddRegionInches methods
//to define highlighted regions or define some highlighted regions using SearchText methods by yourself.
int regID = 0, regCount = GdViewer1.RegionCount();
if (regCount > 0)
{
ForegroundMixMode firstMode = GdViewer1.GetRegionMixMode(GdViewer1.GetRegionID(1));
ForegroundMixMode currMode = ForegroundMixMode.ForegroundMixModeUNDEFINED;
ForegroundMixMode newMode = ForegroundMixMode.ForegroundMixModeBLACK;
for (int j = 1; j <= regCount; j++)
{
regID = GdViewer1.GetRegionID(j);
currMode = GdViewer1.GetRegionMixMode(regID);
if (currMode == firstMode)
GdViewer1.SetRegionMixMode(regID, newMode);
}
//Redrawing regions with the newly defined mix mode parameter.
GdViewer1.Redraw();
}
else
MessageBox.Show("No highlighted region found related to this document. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.GetRegionMixMode");