none
my program could not popup the windows, but keep on debugging and running. what is that error RRS feed

  • Question

  • Hi, my problem is that, currently i have a program code which i debug it the windows not pop up. and the page of microsoft visual studio  it shows ''running''...but nothing pop up...i have trouble shoot, however failed to detect error. so the code is shown below...anyone knows what error is that.??? thanks!!!
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Phidgets;
    using Phidgets.Events;
    using System.Collections;
    using System.Drawing.Imaging;
    using System.Drawing.Drawing2D;
    using System.IO;
    using System.Reflection;
    
    
    namespace ManualController
    {
        public partial class Form1 : Form
        {
            Cube cube;
            Joystick lg;
            AdvancedServo advServo = new AdvancedServo();
            int i, x, y, rz, min = 88, max = 91;
            public Form1()
            {
                InitializeComponent();
                this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);
            }
            
            private void Form1_Load(object sender, EventArgs e)
            {
                cube = new Cube(100);
                advServo.Attach += new AttachEventHandler(advServo_Attach);
                advServo.Detach += new DetachEventHandler(advServo_Detach);
                
                advServo.open();
    
                advServo.waitForAttachment();
     
                //for joystick
                try
                {
                    lg = new Joystick(45, 135, .00, this);
                }
                catch (Exception)
                {
                    throw;
                }
    
                lg.PresetValues();
                timer1.Start();
                render();
            }
                    
            void Form1_FormClosing(object sender, FormClosingEventArgs e)
            {
                lg.Dispose();
                for (i = 0; i < 8; i++)
                {
                    
                    advServo.servos[i].Engaged = true;
                }
                //run any events in the message queue - otherwise close will hang if there are any outstanding events
                Application.DoEvents();
                render();
              
            }
            private void render()
            {
    
                //Set the rotation values
                cube.RotateX = lg.State.Y - 90;
                cube.RotateY = lg.State.Rz - 90;
                cube.RotateZ = lg.State.X - 90;
    
                //Cube is positioned based on center
                Point origin = new Point(pictureBox1.Width / 2, pictureBox1.Height / 2);
    
                pictureBox1.Image = cube.drawCube(origin);
            }
            internal class Math3D
            {
                public class Point3D
                {
                    //The Point3D class is rather simple, just keeps track of X Y and Z values,
                    //and being a class it can be adjusted to be comparable
                    public double X;
                    public double Y;
                    public double Z;
    
                    public Point3D(int x, int y, int z)
                    {
                        X = x;
                        Y = y;
                        Z = z;
                    }
    
                    public Point3D(float x, float y, float z)
                    {
                        X = (double)x;
                        Y = (double)y;
                        Z = (double)z;
                    }
    
                    public Point3D(double x, double y, double z)
                    {
                        X = x;
                        Y = y;
                        Z = z;
                    }
    
                    public Point3D()
                    {
                    }
    
                    public override string ToString()
                    {
                        return "(" + X.ToString() + ", " + Y.ToString() + ", " + Z.ToString() + ")";
                    }
                }
    
                public class Camera
                {
                    //For 3D drawing we need a point of perspective, thus the Camera
                    public Point3D Position = new Point3D();
                }
    
                public static Point3D RotateX(Point3D point3D, double degrees)
                {
                    //Here we use Euler's matrix formula for rotating a 3D point x degrees around the x-axis
    
                    //[ a  b  c ] [ x ]   [ x*a + y*b + z*c ]
                    //[ d  e  f ] [ y ] = [ x*d + y*e + z*f ]
                    //[ g  h  i ] [ z ]   [ x*g + y*h + z*i ]
    
                    //[ 1    0        0   ]
                    //[ 0   cos(x)  sin(x)]
                    //[ 0   -sin(x) cos(x)]
    
                    double cDegrees = (Math.PI * degrees) / 180.0f; //Convert degrees to radian for .Net Cos/Sin functions
                    double cosDegrees = Math.Cos(cDegrees);
                    double sinDegrees = Math.Sin(cDegrees);
    
                    double y = (point3D.Y * cosDegrees) + (point3D.Z * sinDegrees);
                    double z = (point3D.Y * -sinDegrees) + (point3D.Z * cosDegrees);
    
                    return new Point3D(point3D.X, y, z);
                }
    
                public static Point3D RotateY(Point3D point3D, double degrees)
                {
                    //Y-axis
    
                    //[ cos(x)   0    sin(x)]
                    //[   0      1      0   ]
                    //[-sin(x)   0    cos(x)]
    
                    double cDegrees = (Math.PI * degrees) / 180.0; //Radians
                    double cosDegrees = Math.Cos(cDegrees);
                    double sinDegrees = Math.Sin(cDegrees);
    
                    double x = (point3D.X * cosDegrees) + (point3D.Z * sinDegrees);
                    double z = (point3D.X * -sinDegrees) + (point3D.Z * cosDegrees);
    
                    return new Point3D(x, point3D.Y, z);
                }
                public static Point3D RotateZ(Point3D point3D, double degrees)
                {
                    //Z-axis
    
                    //[ cos(x)  sin(x) 0]
                    //[ -sin(x) cos(x) 0]
                    //[    0     0     1]
    
                    double cDegrees = (Math.PI * degrees) / 180.0; //Radians
                    double cosDegrees = Math.Cos(cDegrees);
                    double sinDegrees = Math.Sin(cDegrees);
    
                    double x = (point3D.X * cosDegrees) + (point3D.Y * sinDegrees);
                    double y = (point3D.X * -sinDegrees) + (point3D.Y * cosDegrees);
    
                    return new Point3D(x, y, point3D.Z);
                }
    
                public static Point3D Translate(Point3D points3D, Point3D oldOrigin, Point3D newOrigin)
                {
                    //Moves a 3D point based on a moved reference point
                    Point3D difference = new Point3D(newOrigin.X - oldOrigin.X, newOrigin.Y - oldOrigin.Y, newOrigin.Z - oldOrigin.Z);
                    points3D.X += difference.X;
                    points3D.Y += difference.Y;
                    points3D.Z += difference.Z;
                    return points3D;
                }
    
                //These are to make the above functions workable with arrays of 3D points
                public static Point3D[] RotateX(Point3D[] points3D, double degrees)
                {
                    for (int i = 0; i < points3D.Length; i++)
                    {
                        points3D[i] = RotateX(points3D[i], degrees);
                    }
                    return points3D;
                }
                public static Point3D[] RotateY(Point3D[] points3D, double degrees)
                {
                    for (int i = 0; i < points3D.Length; i++)
                    {
                        points3D[i] = RotateY(points3D[i], degrees);
                    }
                    return points3D;
                }
    
                public static Point3D[] RotateZ(Point3D[] points3D, double degrees)
                {
                    for (int i = 0; i < points3D.Length; i++)
                    {
                        points3D[i] = RotateZ(points3D[i], degrees);
                    }
                    return points3D;
                }
    
                public static Point3D[] Translate(Point3D[] points3D, Point3D oldOrigin, Point3D newOrigin)
                {
                    for (int i = 0; i < points3D.Length; i++)
                    {
                        points3D[i] = Translate(points3D[i], oldOrigin, newOrigin);
                    }
                    return points3D;
                }
    
            }
         internal class Cube
        {
            //Example cube class to demonstrate the use of 3D points and 3D rotation
    
            public int width = 0;
            public int height = 0;
            public int depth = 0;
    
            double xRotation = 0.0;
            double yRotation = 0.0;
            double zRotation = 0.0;
    
            Math3D.Camera camera1 = new Math3D.Camera();
            Math3D.Point3D cubeOrigin;
    
            public double RotateX
            {
                get { return xRotation; }
                set { xRotation = value; }
            }
    
            public double RotateY
            {
                get { return yRotation; }
                set { yRotation = value; }
            }
    
            public double RotateZ
            {
                get { return zRotation; }
                set { zRotation = value; }
            }
    
            public Cube(int side)
            {
                width = side;
                height = side;
                depth = side;
                cubeOrigin = new Math3D.Point3D(width / 2, height / 2, depth / 2);
            }
    
            public Cube(int side, Math3D.Point3D origin)
            {
                width = side;
                height = side;
                depth = side;
                cubeOrigin = origin;
            }
    
            public Cube(int Width, int Height, int Depth)
            {
                width = Width;
                height = Height;
                depth = Depth;
                cubeOrigin = new Math3D.Point3D(width / 2, height / 2, depth / 2);
            }
    
            public Cube(int Width, int Height, int Depth, Math3D.Point3D origin)
            {
                width = Width;
                height = Height;
                depth = Depth;
                cubeOrigin = origin;
            }
    
            //Finds the othermost points. Used so when the cube is drawn on a bitmap,
            //the bitmap will be the correct size
            public static Rectangle getBounds(PointF[] points)
            {
                double left = points[0].X;
                double right = points[0].X;
                double top = points[0].Y;
                double bottom = points[0].Y;
                for (int i = 1; i < points.Length; i++)
                {
                    if (points[i].X < left)
                        left = points[i].X;
                    if (points[i].X > right)
                        right = points[i].X;
                    if (points[i].Y < top)
                        top = points[i].Y;
                    if (points[i].Y > bottom)
                        bottom = points[i].Y;
                }
    
                return new Rectangle(0, 0, (int)Math.Round(right - left), (int)Math.Round(bottom - top));
            }
    
            public Bitmap drawCube(Point drawOrigin)
            {
                //FRONT FACE
                //Top Left - 7
                //Top Right - 4
                //Bottom Left - 6
                //Bottom Right - 5
    
                //Vars
                PointF[] point3D = new PointF[24]; //Will be actual 2D drawing points
                Point tmpOrigin = new Point(0, 0);
    
                Math3D.Point3D point0 = new Math3D.Point3D(0, 0, 0); //Used for reference
    
                //Zoom factor is set with the monitor width to keep the cube from being distorted
                double zoom = (double)Screen.PrimaryScreen.Bounds.Width / 1.5;
    
                //Set up the cube
                Math3D.Point3D[] cubePoints = fillCubeVertices(width, height, depth);
    
                //Calculate the camera Z position to stay constant despite rotation            
                Math3D.Point3D anchorPoint = (Math3D.Point3D)cubePoints[4]; //anchor point
                double cameraZ = -(((anchorPoint.X - cubeOrigin.X) * zoom) / cubeOrigin.X) + anchorPoint.Z;
                camera1.Position = new Math3D.Point3D(cubeOrigin.X, cubeOrigin.Y, cameraZ);            
    
                //Apply Rotations, moving the cube to a corner then back to middle
                cubePoints = Math3D.Translate(cubePoints, cubeOrigin, point0);
                cubePoints = Math3D.RotateX(cubePoints, xRotation); //The order of these
                cubePoints = Math3D.RotateY(cubePoints, yRotation); //rotations is the source
                cubePoints = Math3D.RotateZ(cubePoints, zRotation); //of Gimbal Lock
                cubePoints = Math3D.Translate(cubePoints, point0, cubeOrigin);
    
                //Convert 3D Points to 2D
                Math3D.Point3D vec;
                for (int i = 0; i < point3D.Length; i++)
                {
                    vec = cubePoints[i];
                    if (vec.Z - camera1.Position.Z >= 0)
                    {
                        point3D[i].X = (int)((double)-(vec.X - camera1.Position.X) / (-0.1f) * zoom) + drawOrigin.X;
                        point3D[i].Y = (int)((double)(vec.Y - camera1.Position.Y) / (-0.1f) * zoom) + drawOrigin.Y;
                    }
                    else
                    {
                        tmpOrigin.X = (int)((double)(cubeOrigin.X - camera1.Position.X) / (double)(cubeOrigin.Z - camera1.Position.Z) * zoom) + drawOrigin.X;
                        tmpOrigin.Y = (int)((double)-(cubeOrigin.Y - camera1.Position.Y) / (double)(cubeOrigin.Z - camera1.Position.Z) * zoom) + drawOrigin.Y;
    
                        point3D[i].X = (float)((vec.X - camera1.Position.X) / (vec.Z - camera1.Position.Z) * zoom + drawOrigin.X);
                        point3D[i].Y = (float)(-(vec.Y - camera1.Position.Y) / (vec.Z - camera1.Position.Z) * zoom + drawOrigin.Y);
    
                        point3D[i].X = (int)point3D[i].X;
                        point3D[i].Y = (int)point3D[i].Y;
                    }
                }
    
                //Now to plot out the points
                Rectangle bounds = getBounds(point3D);
                bounds.Width += drawOrigin.X;
                bounds.Height += drawOrigin.Y;
    
                Bitmap tmpBmp = new Bitmap(bounds.Width, bounds.Height);
                Graphics g = Graphics.FromImage(tmpBmp);
    
                //Back Face
                g.DrawLine(Pens.Black, point3D[0], point3D[1]);
                g.DrawLine(Pens.Black, point3D[1], point3D[2]);
                g.DrawLine(Pens.Black, point3D[2], point3D[3]);
                g.DrawLine(Pens.Black, point3D[3], point3D[0]);
    
                //Front Face
                g.DrawLine(Pens.Black, point3D[4], point3D[5]);
                g.DrawLine(Pens.Black, point3D[5], point3D[6]);
                g.DrawLine(Pens.Black, point3D[6], point3D[7]);
                g.DrawLine(Pens.Black, point3D[7], point3D[4]);
    
                //Right Face
                g.DrawLine(Pens.Black, point3D[8], point3D[9]);
                g.DrawLine(Pens.Black, point3D[9], point3D[10]);
                g.DrawLine(Pens.Black, point3D[10], point3D[11]);
                g.DrawLine(Pens.Black, point3D[11], point3D[8]);
    
                //Left Face
                g.DrawLine(Pens.Black, point3D[12], point3D[13]);
                g.DrawLine(Pens.Black, point3D[13], point3D[14]);
                g.DrawLine(Pens.Black, point3D[14], point3D[15]);
                g.DrawLine(Pens.Black, point3D[15], point3D[12]);
    
                //Bottom Face
                g.DrawLine(Pens.Black, point3D[16], point3D[17]);
                g.DrawLine(Pens.Black, point3D[17], point3D[18]);
                g.DrawLine(Pens.Black, point3D[18], point3D[19]);
                g.DrawLine(Pens.Black, point3D[19], point3D[16]);
    
                //Top Face
                g.DrawLine(Pens.Black, point3D[20], point3D[21]);
                g.DrawLine(Pens.Black, point3D[21], point3D[22]);
                g.DrawLine(Pens.Black, point3D[22], point3D[23]);
                g.DrawLine(Pens.Black, point3D[23], point3D[20]);
    
                g.Dispose(); //Clean-up
    
                return tmpBmp;
            }
    
            public static Math3D.Point3D[] fillCubeVertices(int width, int height, int depth)
            {
                Math3D.Point3D[] verts = new Math3D.Point3D[24];
    
                //front face
                verts[0] = new Math3D.Point3D(50, 50, -50);
                verts[1] = new Math3D.Point3D(0, height, 0);
                verts[2] = new Math3D.Point3D(width, height, 0);
                verts[3] = new Math3D.Point3D(50, 50, -50);
    
                //back face
                verts[4] = new Math3D.Point3D(0, 0, depth);
                verts[5] = new Math3D.Point3D(0, height, depth);
                verts[6] = new Math3D.Point3D(width, height, depth);
                verts[7] = new Math3D.Point3D(width, 0, depth);
    
                //left face
                verts[8] = new Math3D.Point3D(0, 0, 0);
                verts[9] = new Math3D.Point3D(0, 0, depth);
                verts[10] = new Math3D.Point3D(0, height, depth);
                verts[11] = new Math3D.Point3D(0, height, 0);
    
                //right face
                verts[12] = new Math3D.Point3D(width, 0, 0);
                verts[13] = new Math3D.Point3D(width, 0, depth);
                verts[14] = new Math3D.Point3D(width, height, depth);
                verts[15] = new Math3D.Point3D(width, height, 0);
               /* //right face
                verts[12] = new Math3D.Point3D(150, 50, 50);
                verts[13] = new Math3D.Point3D(width, 0, depth);
                verts[14] = new Math3D.Point3D(width, height, depth);
                verts[15] = new Math3D.Point3D(width, height, 0);*/
    
                //top face
                verts[16] = new Math3D.Point3D(0, height, 0);
                verts[17] = new Math3D.Point3D(0, height, depth);
                verts[18] = new Math3D.Point3D(width, height, depth);
                verts[19] = new Math3D.Point3D(width, height, 0);
    
                //bottom face
                verts[20] = new Math3D.Point3D(0, 0, 0);
                verts[21] = new Math3D.Point3D(0, 0, depth);
                verts[22] = new Math3D.Point3D(width, 0, depth);
                verts[23] = new Math3D.Point3D(width, 0, 0);
    
                return verts;
            }
        }
    
    
            private void UpdateFormControls()
            {
                x = lg.State.X;
                y = lg.State.Y;
                rz = lg.State.Rz;
                
    
                horizonInstrumentControl1.SetAttitudeIndicatorParameters(y, x);
                turnCoordinatorInstrumentControl1.SetTurnCoordinatorParameters(x);
                
    
                lblYaw.Text = "";
                lblRoll.Text = "";
                lblPitch.Text = "";
    
    
                if ((x <= max && x >= min) && (y <= max && y >=  min) && (rz <= max && rz >= min))
                {
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ; 
                    
                    //axShockwaveFlash1.Stop();
                    advServo.servos[0].Position = 95.00;
                    advServo.servos[1].Position = 110.00;
                    advServo.servos[2].Position = 90.00;
                    advServo.servos[4].Position = 115;
                    advServo.servos[5].Position = 115.00;
                    advServo.servos[6].Position = 110.00;
                    advServo.servos[7].Position = 0.00;
                    
                    lblInfo.Visible = true;
                }
    
    
    
                if (x > max) //Roll Right
                {
                    float servo_2 = -(x - 10) + 170;
                    float servo_4 = 12000 / x - 40;
                    advServo.servos[2].Position = servo_2;
                    advServo.servos[4].Position = servo_4;
                    lblRoll.Text = "Roll Right (x axis)\n" + "The ailerons work in pairs.\n" +
                                    "The right aileron goes up, the left aileron goes down.\n" +
                                    "The aircraft will roll right.\n" +
                                    "Servo 2 position: " + servo_2 + " degrees." +
                                    "\nServo 4 position: " + servo_4 + " degrees.";
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ;
                    
                }
    
                if (x < min) //Roll left
                {
                    float servo_2 = -x + 170;
                    float servo_4 = 11000/x - 30  ;
                    advServo.servos[2].Position = servo_2;
                    advServo.servos[4].Position = servo_4;
                    lblRoll.Text = "Roll Left (x axis)\n" +
                                   "The left aileron goes up, the right aileron goes down.\n" +
                                   "The aircraft will roll left.\n" +
                                   "Servo 2 position: " + servo_2 + " degrees." +
                                   "\nServo 4 position: " + servo_4 + " degrees.";
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ;
                   
                }
               
                if (y < min) //Pitch Down
                {
                    
                    
                    //float servo_1 = -(y + 5) + 170;
                    float servo_1 = y + 20;
                    float servo_6 = y;
                    advServo.servos[1].Position = servo_1;
                    advServo.servos[6].Position = servo_6;
                    lblPitch.Text = "Pitch Down (y axis)\n" + 
                                    "The elevators moves down.\n" +
                                    "Hence, nose of the aircraft pitches down.\n" +
                                    "Servo 1 position: " + servo_1 + " degrees." +
                                    "\nServo 6 position: " + servo_6 + " degrees.";
                    lblInfo.Text =  "Joystick Axes Information:\n" +
                                    "x: " + x + " degrees." +
                                    "\ny: " + y + " degrees." +
                                    "\nz: " + rz + " degrees."  ;
                   
                }
    
                if (y > max) //Pitch Up
                {
                    
                    //float servo_1 =-( y - 15) +170;
                    float servo_1 = y + 20;
                    float servo_6 = y + 45;
                    advServo.servos[1].Position = servo_1;
                    advServo.servos[6].Position = servo_6;
                    lblPitch.Text = "Pitch Up (y axis)\n" + 
                                    "The elevator goes up.\n" +
                                    "Hence, the nose of the aircraft pitches up.\n" +
                                    "Servo 1 position: " + servo_1 + " degrees." +
                                    "\nServo 6 position: " + servo_6 + " degrees.";
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ;
                   
                    // "\nz =" + rz;
                    
                }
                
                if (rz < min) //Yaw Left
                {
                    float servo_0 = rz + 15;
                    float servo_5 = rz + 5;
                    advServo.servos[0].Position = servo_0;
                    advServo.servos[5].Position = servo_5;
                    lblYaw.Text = "Yaw Left (z axis)\n" +
                                   "The rudder is deflected left\n" +
                                   "Left side movement of the nose of the aircraft\n" +
                                   "Servo 0 position: " + servo_0 + " degrees." +
                                   "\nServo 5 position: " + servo_5 + " degrees.";
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ;
                    
                   
                }
                if (rz > max) //Yaw Right
                {
                    float servo_0 = rz;
                    float servo_5 = rz + 40;
                   advServo.servos[0].Position = servo_0 ;
                    advServo.servos[5].Position = servo_5;
                    lblYaw.Text = "Yaw Right (z axis)\n" +
                                   "The rudder is deflected right\n" +
                                   "Right side movement of the nose of the aircraft\n" +
                                   "Servo 0 position: " + servo_0 + " degrees." +
                                    "\nServo 5 position: " + servo_5 + " degrees." ;
                    lblInfo.Text = "Joystick Axes Information:\n" +
                                   "x: " + x + " degrees." +
                                   "\ny: " + y + " degrees." +
                                   "\nz: " + rz + " degrees." ;
                   
                }
    
    
            }
    
            void advServo_Attach(object sender, AttachEventArgs e)
            {
                AdvancedServo attached = (AdvancedServo)sender;
                for (int i = 0; i < attached.servos.Count; i++)
                {
                    attached.servos[i].Engaged = true;
                    advServo.servos[3].Engaged = false;
                    attached.servos[i].VelocityLimit = 100.00;  //max 1500, min 0
                    attached.servos[i].Acceleration = 2000.00;   //max 4590, min 0
                }
            }
    
            void advServo_Detach(object sender, DetachEventArgs e)
            {
                AdvancedServo attached = (AdvancedServo)sender;
                for (int i = 0; i < 8; i++)
                {
                    attached.servos[i].Engaged = false;
                }
            }
            private void trackBarTurnRate_Scroll(object sender, EventArgs e)
            {
                turnCoordinatorInstrumentControl1.SetTurnCoordinatorParameters(x);
            }
          
            private void Attitude(object sender, EventArgs e)
            {
                horizonInstrumentControl1.SetAttitudeIndicatorParameters(y,x);
            }
    
    
    
            private void timer1_Tick(object sender, EventArgs e)
            {
                lg.GetData();
                UpdateFormControls();
                render();
            }
    
           
    
            private void axShockwaveFlash1_Enter(object sender, EventArgs e)
            {
    
            }
    
            private void lblInfo_Click(object sender, EventArgs e)
            {
    
            }
    
            private void pictureBox1_Click(object sender, EventArgs e)
            {
    
            }
    
            private void lblInfo_Click_1(object sender, EventArgs e)
            {
    
            }
    
            private void lblPitch_Paint(object sender, PaintEventArgs e)
            {
    
            }
    
            private void lblRoll_Click(object sender, EventArgs e)
            {
    
            }
    
            private void pic9_Click(object sender, EventArgs e)
            {
    
            }
    
            private void checkBox1_CheckedChanged(object sender, EventArgs e)
            {
                advServo.servos[3].Engaged = checkBox1.Checked;
                advServo.servos[3].Position = 150;
            }
    
            
    
            
        }
    }
    

    Wednesday, January 25, 2012 1:25 AM

Answers

  • This is would be caused by the process boot time is too long.

    It would be caused by some protection kind software's checking or virus affect, or your program problem.

    You can just use "F11" to run/debug your project under Visual Studio, it will point the line when the code line executed, so that you can know if your code is running when there's no UI displayed.

    There's some third party product libraries needed in your code, so it is hard for me to help you test the code in my side.

    But the problem's root cause is like it said in this post above, so you can find the root cause and solve it according those information.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 25, 2012 6:43 AM
    Moderator

All replies

  • Wednesday, January 25, 2012 1:38 AM
  • This is would be caused by the process boot time is too long.

    It would be caused by some protection kind software's checking or virus affect, or your program problem.

    You can just use "F11" to run/debug your project under Visual Studio, it will point the line when the code line executed, so that you can know if your code is running when there's no UI displayed.

    There's some third party product libraries needed in your code, so it is hard for me to help you test the code in my side.

    But the problem's root cause is like it said in this post above, so you can find the root cause and solve it according those information.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 25, 2012 6:43 AM
    Moderator