Trouble with displaying the picturebox on real flexpendant
 
            
                
                    egor                
                
                     ✭                
            
                        
            
                    Hi,
I have a problem with displaying the picturebox on real flexpendant. On the virtual controller the picture is displayed without any problems (see MainScreen.png) . And that's what happens in reality (real.jpg). I have nothing idea how to fix it. I use picturebox from flexpendant toolbox.
Here's my code:
                
                I have a problem with displaying the picturebox on real flexpendant. On the virtual controller the picture is displayed without any problems (see MainScreen.png) . And that's what happens in reality (real.jpg). I have nothing idea how to fix it. I use picturebox from flexpendant toolbox.
Here's my code:
 private void disk()
        {
            pictureBox1.Image = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            using (Graphics g = Graphics.FromImage(pictureBox1.Image))
            {
                g.DrawEllipse(new Pen(Color.Black, 4), 0, 0, 277, 277);
                g.FillEllipse(new SolidBrush(Color.AliceBlue), 0, 0, 277, 277);
                g.DrawEllipse(new Pen(Color.Black, 4), (277 - 47) / 2, (277 - 47) / 2, 47, 47);
                g.FillEllipse(new SolidBrush(Color.White), (277 - 47) / 2, (277 - 47) / 2, 47, 47);
            }
            pictureBox1.Refresh();
        }
private void rectangle()
        {
            for (int i = 1; i < k; i++)
            {
                for (int j = 1; j < m; j++)
                {
                    //some logic here
                    if (l1 < D / 2 && l2 < D / 2 && l3 < D / 2 && l4 < D / 2 && l1 > d / 2 && l2 > d / 2 && l3 > d / 2 && l4 > d / 2)
                    {
                        using (Graphics g = Graphics.FromImage(pictureBox1.Image))
                        {
                            RectangleF myRectangleF = new RectangleF(x1 , y1 , b, h);
                            Rectangle truncatedRectangle = Rectangle.Truncate(myRectangleF);
                            g.DrawRectangle(new Pen(Color.DodgerBlue), truncatedRectangle);
                            SolidBrush Brush = new SolidBrush(Color.DodgerBlue);
                            g.FillRectangle(Brush, truncatedRectangle);
                        }
                    }
                    pictureBox1.Refresh();
                }
            }
        }
0  
            Best Answer
- 
            Solve my problem using picturebox from the standart windows toolbox.0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 363 IRC5
- 80 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 853 RAPID Programming
- 31 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings