private void cmdQuery_Click(object sender, System.EventArgs e)
        {
            //Determine whether permission to search layers
            if (m_queryFeatures == false)
            {
                System.Windows.Forms.MessageBox.Show("You do not have permission to search for features!");
                return;
            }

            //Get IARQueryDef interface
            ArcReaderSearchDefClass searchDef = new ArcReaderSearchDefClass();

            //Set the spatial searching to intersects
            searchDef.SpatialRelationship = esriARSpatialRelationship.esriARSpatialRelationshipIntersects;

            //Get the coordinates of the current extent
            double dXmax = 0; double dXmin = 0; double dYmin = 0; double dYmax = 0;

            axArcReaderControl1.ARPageLayout.FocusARMap.GetExtent(ref dXmin, ref dYmin, ref dXmax, ref dYmax);
            //Set the envelope coordinates as the search shape
            searchDef.SetEnvelopeShape(dXmin, dYmin, dXmax, dYmax, 0);

            //Get IARFeatureSet interface
            m_featureSet = axArcReaderControl1.ARPageLayout.FocusARMap.QueryARFeatures(searchDef);
            //Reset the featureset
            m_featureSet.Reset();
            //Get the IARFeature interface
            m_feature = m_featureSet.Next();
            //Display attribute values
            m_record = 0;
            UpdateValueDisplay();
        }
		private void cmdQuery_Click(object sender, System.EventArgs e)
		{
			//Determine whether permission to search layers
			if (m_queryFeatures == false)
			{
				System.Windows.Forms.MessageBox.Show("You do not have permission to search for features!");
				return;
			}

			//Get IARQueryDef interface
			ArcReaderSearchDefClass searchDef = new ArcReaderSearchDefClass();
			//Set the spatial searching to intersects
			searchDef.SpatialRelationship = esriARSpatialRelationship.esriARSpatialRelationshipIntersects;

			//Get the coordinates of the current extent
			double dXmax=0; double dXmin=0; double dYmin=0; double dYmax=0;
			axArcReaderControl1.ARPageLayout.FocusARMap.GetExtent(ref dXmin, ref dYmin, ref dXmax, ref dYmax);
			//Set the envelope coordinates as the search shape
			searchDef.SetEnvelopeShape(dXmin, dYmin, dXmax, dYmax,0);

			//Get IARFeatureSet interface
			m_featureSet = axArcReaderControl1.ARPageLayout.FocusARMap.QueryARFeatures(searchDef);
			//Reset the featureset
			m_featureSet.Reset();
			//Get the IARFeature interface
			m_feature = m_featureSet.Next();
			//Display attribute values
			m_record = 0;
			UpdateValueDisplay();
		}