<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Translate C# into vb.net - map-processbar in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/translate-c-into-vb-net-map-processbar/m-p/6842575#M32970</link>
    <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get follwing C#-Code for show map-processbar:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Autodesk.Map.IM.Forms.Desktop.StatusForm&amp;lt;Object&amp;gt; statusForm = new Autodesk.Map.IM.Forms.Desktop.StatusForm&amp;lt;Object&amp;gt;(
        delegate (Autodesk.Map.IM.Data.Util.IStatusDisplay status, Object[] parameters)
    {
        try
        {
            //start process

            //values for processbar
            status.Minimum = 0;
            status.Maximum = 100;
 
            //set status-text
            status.Status = "Verarbeitung beginnt...";
 
            //stop graphic update
            using (this.Document.Map.InitiateDrawBurst()) ' &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
            {
 
                //process to work
                for (int i = 0; i &amp;lt; 100; i++)
                {
                    //validate if cancel
                    if (status.CancelRequested)
                    {
                        //info for user
                        System.Windows.Forms.MessageBox.Show("process stopped!");
                        //cancel
                        return;
                    }
 
                    //sleep-for time to work
                    System.Threading.Thread.Sleep(100);
 
                    //update status
                    status.PerformStep();
                }
            } // update grafi
 
            //user-info
            System.Windows.Forms.MessageBox.Show("process finished.");
        }
        catch (Exception ex)
        {
            //catch error
            System.Windows.Forms.MessageBox.Show("error: " + ex + " " + ex.StackTrace);
        }
    });
    //type of status
    statusForm.Type = Autodesk.Map.IM.Forms.Desktop.ProgressBarType.ProgressBarWithText;
    //bei unbekannter Größe
    //statusForm.Type = Autodesk.Map.IM.Forms.Desktop.ProgressBarType.ContinuousProgressBar;
 
    //Abbrechen-Knopf anzeigen und aktivieren
    statusForm.CancelButtonVisible = true;
    statusForm.CancelButtonEnabled = true;
 
    //Verarbeitung starten
    statusForm.ShowDialog();
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;my problem is to translate the first lines!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;could someone help me ???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Jan&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2017 08:04:05 GMT</pubDate>
    <dc:creator>jan_tappenbeck</dc:creator>
    <dc:date>2017-01-31T08:04:05Z</dc:date>
    <item>
      <title>Translate C# into vb.net - map-processbar</title>
      <link>https://forums.autodesk.com/t5/net-forum/translate-c-into-vb-net-map-processbar/m-p/6842575#M32970</link>
      <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get follwing C#-Code for show map-processbar:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Autodesk.Map.IM.Forms.Desktop.StatusForm&amp;lt;Object&amp;gt; statusForm = new Autodesk.Map.IM.Forms.Desktop.StatusForm&amp;lt;Object&amp;gt;(
        delegate (Autodesk.Map.IM.Data.Util.IStatusDisplay status, Object[] parameters)
    {
        try
        {
            //start process

            //values for processbar
            status.Minimum = 0;
            status.Maximum = 100;
 
            //set status-text
            status.Status = "Verarbeitung beginnt...";
 
            //stop graphic update
            using (this.Document.Map.InitiateDrawBurst()) ' &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;
            {
 
                //process to work
                for (int i = 0; i &amp;lt; 100; i++)
                {
                    //validate if cancel
                    if (status.CancelRequested)
                    {
                        //info for user
                        System.Windows.Forms.MessageBox.Show("process stopped!");
                        //cancel
                        return;
                    }
 
                    //sleep-for time to work
                    System.Threading.Thread.Sleep(100);
 
                    //update status
                    status.PerformStep();
                }
            } // update grafi
 
            //user-info
            System.Windows.Forms.MessageBox.Show("process finished.");
        }
        catch (Exception ex)
        {
            //catch error
            System.Windows.Forms.MessageBox.Show("error: " + ex + " " + ex.StackTrace);
        }
    });
    //type of status
    statusForm.Type = Autodesk.Map.IM.Forms.Desktop.ProgressBarType.ProgressBarWithText;
    //bei unbekannter Größe
    //statusForm.Type = Autodesk.Map.IM.Forms.Desktop.ProgressBarType.ContinuousProgressBar;
 
    //Abbrechen-Knopf anzeigen und aktivieren
    statusForm.CancelButtonVisible = true;
    statusForm.CancelButtonEnabled = true;
 
    //Verarbeitung starten
    statusForm.ShowDialog();
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;my problem is to translate the first lines!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;could someone help me ???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Jan&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 08:04:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/translate-c-into-vb-net-map-processbar/m-p/6842575#M32970</guid>
      <dc:creator>jan_tappenbeck</dc:creator>
      <dc:date>2017-01-31T08:04:05Z</dc:date>
    </item>
    <item>
      <title>Re : Translate C# into vb.net - map-processbar</title>
      <link>https://forums.autodesk.com/t5/net-forum/translate-c-into-vb-net-map-processbar/m-p/6842687#M32971</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not very cumfortable with VB and the VB syntax for lambda expressions, but it should be something like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim statusForm As New Autodesk.Map.IM.Forms.Desktop.StatusForm(Of Object)( _
    Sub(status As Autodesk.Map.IM.Data.Util.IStatusDisplay, parameters As Object()) 
        Try
            'start process

            'values for processbar
            status.Minimum = 0
            status.Maximum = 100

            'set status-text
            status.Status = "Verarbeitung beginnt..."

            'stop graphic update
            Using Me.Document.Map.InitiateDrawBurst()

                'process to work
                For i As Integer = 0 To 99
                    'validate if cancel
                    If status.CancelRequested Then
                        'info for user
                        System.Windows.Forms.MessageBox.Show("process stopped!")
                        'cancel
                        Return
                    End If

                    'sleep-for time to work
                    System.Threading.Thread.Sleep(100)

                    'update status
                    status.PerformStep()
                Next
            End Using
            ' update grafi
            'user-info
            System.Windows.Forms.MessageBox.Show("process finished.")
        Catch ex As Exception
            'catch error
            System.Windows.Forms.MessageBox.Show("error: " + ex + " " + ex.StackTrace)
        End Try
    End sub)&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Jan 2017 09:10:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/translate-c-into-vb-net-map-processbar/m-p/6842687#M32971</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-01-31T09:10:16Z</dc:date>
    </item>
  </channel>
</rss>

