Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use D2DControl as PictureBox? Help me please, please... #32

Closed
matheustkful opened this issue Jun 9, 2020 · 1 comment
Closed

Comments

@matheustkful
Copy link

Hey friend, very good?
I am trying D2DControl use as Picturebox and dont work.
I create the CustomControl and i edit. See the image:
https://imgur.com/6VxS1sE
I select the D2dControl in ToolBox and put in form design. But show the following errror:
https://imgur.com/4VPG7Dx
https://imgur.com/XbAunDp

@jingwood
Copy link
Owner

Hi! your pictures cannot be displayed correctly.

D2DForm and D2DControl cannot be use in design-time, you can create an empty file and use the following code to make your own control.

class MyControl : D2DControl {
  ...
}

And you have to draw image and other else inside the OnRender method:

protected virtual void OnRender(D2DGraphics g) { 
  ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants