Re: Drawing in VB .NET CF
If you're using standard Windows Forms, you would use a PictureBox and handle its MouseDown, MouseMove and MouseUp events. You'd record the start point, end point and all the recorded points in between and draw the result on the PictureBox. To save, you'd transfer the drawing to the Image in the PictureBox and then call its Save method.
Follow the CodeBank link in my signature and check out my Simple Drawing thread. It's not exactly what you want but very close. You just need to decide how to draw what's recorded:
1. Draw it as a series of dots by calling DrawRectangle multiple times with a 1x1 rectangle.
2. Draw it as a series of lines between each pair of locations.
I'd probably go with the second option.
Re: Drawing in VB .NET CF
Quote:
Originally Posted by
jmcilhinney
If you're using standard Windows Forms, you would use a PictureBox and handle its MouseDown, MouseMove and MouseUp events. You'd record the start point, end point and all the recorded points in between and draw the result on the PictureBox. To save, you'd transfer the drawing to the Image in the PictureBox and then call its Save method.
Follow the CodeBank link in my signature and check out my Simple Drawing thread. It's not exactly what you want but very close. You just need to decide how to draw what's recorded:
1. Draw it as a series of dots by calling DrawRectangle multiple times with a 1x1 rectangle.
2. Draw it as a series of lines between each pair of locations.
I'd probably go with the second option.
Thanks for your prompt response, but this is actually for .NET Compact Framework? Does this still stand? I'll check out the codebank thing anyway.
Re: Drawing in VB .NET CF
Quote:
Originally Posted by
lewwy
Thanks for your prompt response, but this is actually for .NET Compact Framework? Does this still stand? I'll check out the codebank thing anyway.
This site has a .NET Mobile forum, so if you want mobile-specific advice then you should be posting there. I did notice that you specified the CF. I would assume that everything I have said would be applicable but I'll leave it up to you to check whether all the required types and members are supported.
Re: Drawing in VB .NET CF
Quote:
Originally Posted by
jmcilhinney
This site has a .NET Mobile forum, so if you want mobile-specific advice then you should be posting there. I did notice that you specified the CF. I would assume that everything I have said would be applicable but I'll leave it up to you to check whether all the required types and members are supported.
Ok cool, thanks for your help I'll give that a go. If it doesn't work I'll specify this thread to be deleted and then start a new thread over in the .NET CF area. Thankyou :)
Re: Drawing in VB .NET CF
Quote:
Originally Posted by
lewwy
If it doesn't work I'll specify this thread to be deleted and then start a new thread over in the .NET CF area.
Just ask the mods to move the existing thread. The easiest way is to click the Report Post link at the bottom of your post and then ask there. That message will go to all mods.
Re: Drawing in VB .NET CF
Re: Drawing in VB .NET CF
Hi,
jmcilhinney's still stands in .Net CF - use a picture box to draw on , and then save it as a jpg. Use mousedown, mouseup and mousemove events. Alternately there are 3rd party signature boxes out there. Alternately an article and some code I wrote ages ago are here