![RobotStudio event](https://new.abb.com/images/librariesprovider89/default-album/robotstudio-webinar-arc-welding.jpg)
Trouble with displaying the picturebox on real flexpendant
![egor](https://us.v-cdn.net/5020483/uploads/userpics/UA48YBN1O8DY/nL1LS24FY07OY.jpg)
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.5K RobotStudio
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings