I discovered VBToolbox earlier this week and have gone through a dozen of your Tutorials. I find them excellent. The pace is perfect and you explain things clearly. Thank you so much for taking the time to put these together and share them with us!
Thanks for another great Tutorial! I look forward to all your tutorials because you are clear and concise. Thank you so much VB Toolbox. Hopefully you might do videos on macros/bots webbrower/webrequest :)
To prevent skipping, we can use a different drawing technique. Rather than drawing rectangles, we can capture the mouse points and draw lines between the captured points using a Queue collection. We'll just need to alter a few lines to make this work. 1.) Add a Queue collection as a variable in your Form class. This will store your mouse positions: Private qMouse As New Queue(Of Point) 2.) In our PaintBrush() Sub, change the parameters to "Size" and use the type "Single" to choose the width of your Pen stroke. We will then check to see if we have any points in our queue, and if we do, we will draw a line between them and remove them from the Queue collection: Private Sub PaintBrush(Size As Single) Using g As Graphics = Graphics.FromImage(pbDraw.Image) If qMouse.Count > 1 Then g.DrawLine(New Pen(DrawColor, Size), qMouse(0), qMouse(1)) qMouse.Dequeue() End If End Using pbDraw.Refresh() End Sub 3.) To capture and draw we'll use the MouseUp, MouseDown, and MouseMove events, just like we did in the tutorial: pbDraw_MouseDown: Draw = True qMouse.Enqueue(e.Location) PaintBrush(1.0F) pbDraw_MouseUp: Draw = False qMouse.Clear() pbDraw_MouseMove: If Draw = True Then qMouse.Enqueue(e.Location) PaintBrush(1.0F) End If Note: I'm supplying a static value of "1.0F" for the PaintBrush(Size). You can make it more dynamic by supplying these like we did with the ComboBox in the tutorial. I hope this helps! :-)
Very impressive... WHAT IF... we could build our own Photo viewer, using that method (having a Table to store the paths from photos and retrieve the paths for the Form) ? That would be... really FUN ! Thank you for your shared amazing abilities.
Hello, Carlos! :-) Hmmm That would actually be pretty simple to do - maybe with a SQL Ce database, or even just a simple .CSV file. I already have a simple Photo Viewer tutorial even. (Here: ua-cam.com/video/w6fvczfcbBU/v-deo.html). Storing the file paths would be a piece of cake.
OK, VB Toolbox. I already found out there is such a project that you have done. And it is just fantastic (it seems we had the same idea. You, first...) ! I have to say: - man, I would absolutely love to have your knowledge on this stuff ! And everyone in UA-cam... absolutely loves (...) you. We don't need to see the other videos (related to what you explain in yours) ! Many thanks, and I have an idea for a project (which I will try to make...) ! Anyway... because you are so special... I'm going to tell you: - an application to control our entire life (Banks, Home expenses - with statistics for food , Salaries and taxes, Personal schedules, Birthdays, Medical situations
Carlos Alberto Araujo Thank you for the vote of confidence and encouragement, Carlos! :-D While your app sounds pretty complex, I think that we're really only limited by our imagination and motivation. The important thing is to take it one piece at a time. First, get each component working. Then, improve the code to make it work more efficiently with less code. Excel can be very useful and can be greatly extended via macros, but a compiled application can offer so much more flexibility and power. I'm much more comfortable working with databases than excel, but in reality they're very similar. You're just working with a Dataset - columns and rows - and performing look-ups and calculations.
Really .. nice , Is there ones about user grants ? ( User as admin .. has all permissions .. others not all ) I mean admin can save, delete, update, search, others only can search . thanks so much, late but thank you .
I know I built a very basic permissions table just like that with one of my SQL tutorials, but I'm not sure if I ever demo'd that. It's included in one of my SQL project links (part 4), I believe. Database is the best way to manage permissions, for sure, but you could also use an encrypted text file or .ini file if you didn't want to use a database.
Hi Vbtoolbox! I have seen your tutorials and I love them. I am working in a program and in my program I have 3 PictureBox and 1 TextBox and I wont to blend 2 pictures and the text on TextBox in the third PictureBox and save that picture. Can You help me PLEASE.
When the graphics size exceeds the picturebox, I can use scrllobar to keep drawings are visible and save as parts of image,but For example,when the square exceeds the viewport,especially in using"for... next" automatically drawing,how to keep it? thanks for your videos!
Hi there, great video, is it possible to capture a specific square area within the form design? as I can’t seem to change the location of the capture and size with much success… Hope that makes sense Thank You for any help!!!
what if i want to save it as gif? i tried and it made the image all weird looking and bad quality but it was a gif from the start and looked better. how do i get full quality rendering on gifs?
For your second idea on the thing without rectangles, my program crashes when trying to use this dim thickness as integer = "1" dim thickness1 as string = thickness.ToString + ".0F" or this dim thickness1 as string = thickness + ".0F" mousemove: qMouse.Enqueue(e.Location) PaintBrush(thickness)
it was a wonderfull tutorial;....thanks so much can you help me how to draw lines (any graphics) during run time and make some selection using mouse to assign values...... thanks so much
I love your tutorials man :) great job and thank you so much I was wondering if you can make a tutorial and show us how to create an e-signature for a vb application ! I did create 1 following this tutorial but the signature is kinda different and I would like to save it to a db ... I found a tool called inksecuresignature but I didn't know how to use to save the signature into db or png ... can yo u help plz ? thanks
Mohammed Zerzouri Thank you, sir. I've never worked with e-signatures specifically; However, I am working on a tutorial for storing images to a database. Hopefully, you will be able to adapt it for your needs. You will need to have the PNG or at least a memory stream of the image data available in order to place it in the database. If the tool allows you to see the image in your application, then you should be able to capture it to PNG using the picturebox or graphics object that is displaying the image.
Mohammed Zerzouri If you'd like to see my source prior to a tutorial, it can be download here: www.dropbox.com/s/n6skmrga831lpdn/DBPicturesTut.zip?dl=0 To actually use it you'll need to adjust the connection string and queries to match your database.
YES sir. i want to save it in the document. because your saving image is on the debug folder and if you save more just one sources. please help me in the codings..
Hello, Anis. This is a really old tutorial and this was the closest project source that I could locate in my archive. I think that the drawing size may need to be fixed but everything else appears to be functional. Link: www.dropbox.com/s/v3e47zqccvtzajj/DrawingTut.zip?dl=0
God will bless you for this beautiful tutorial. I have been looking for a vb.net code to draw on the InkPicture control and save the image. With this tutorial, EUREKA! Thanks a lot.
I discovered VBToolbox earlier this week and have gone through a dozen of your Tutorials. I find them excellent. The pace is perfect and you explain things clearly. Thank you so much for taking the time to put these together and share them with us!
And thank *YOU* for taking the time to submit some encouraging feedback, Terry. I appreciate that. :-)
I followed you on every single step, it is a very good example.
Excellent , very usefull👍
Thanks for another great Tutorial! I look forward to all your tutorials because you are clear and concise. Thank you so much VB Toolbox. Hopefully you might do videos on macros/bots webbrower/webrequest :)
I guess I'm kinda randomly asking but do anybody know a good website to watch new series online ?
@Holden London i watch on flixzone. You can find it on google :)
@Julian Jackson yea, I've been watching on FlixZone for since march myself =)
@Julian Jackson thanks, I signed up and it seems like they got a lot of movies there :) I appreciate it!
@Holden London no problem xD
You rock man!
I really appreciate this example!
Character In the video It's great, I like it a lot $$
when i draw, it skips across the canvas into little dots. how do you make it continue to draw in a continuous stoke?
To prevent skipping, we can use a different drawing technique. Rather than drawing rectangles, we can capture the mouse points and draw lines between the captured points using a Queue collection.
We'll just need to alter a few lines to make this work.
1.) Add a Queue collection as a variable in your Form class. This will store your mouse positions:
Private qMouse As New Queue(Of Point)
2.) In our PaintBrush() Sub, change the parameters to "Size" and use the type "Single" to choose the width of your Pen stroke. We will then check to see if we have any points in our queue, and if we do, we will draw a line between them and remove them from the Queue collection:
Private Sub PaintBrush(Size As Single)
Using g As Graphics = Graphics.FromImage(pbDraw.Image)
If qMouse.Count > 1 Then
g.DrawLine(New Pen(DrawColor, Size), qMouse(0), qMouse(1))
qMouse.Dequeue()
End If
End Using
pbDraw.Refresh()
End Sub
3.) To capture and draw we'll use the MouseUp, MouseDown, and MouseMove events, just like we did in the tutorial:
pbDraw_MouseDown:
Draw = True
qMouse.Enqueue(e.Location)
PaintBrush(1.0F)
pbDraw_MouseUp:
Draw = False
qMouse.Clear()
pbDraw_MouseMove:
If Draw = True Then
qMouse.Enqueue(e.Location)
PaintBrush(1.0F)
End If
Note: I'm supplying a static value of "1.0F" for the PaintBrush(Size). You can make it more dynamic by supplying these like we did with the ComboBox in the tutorial.
I hope this helps! :-)
Very impressive...
WHAT IF... we could build our own Photo viewer, using that method (having a Table to store the paths from photos and retrieve the paths for the Form) ?
That would be... really FUN !
Thank you for your shared amazing abilities.
Hello, Carlos! :-) Hmmm That would actually be pretty simple to do - maybe with a SQL Ce database, or even just a simple .CSV file. I already have a simple Photo Viewer tutorial even. (Here: ua-cam.com/video/w6fvczfcbBU/v-deo.html). Storing the file paths would be a piece of cake.
OK, VB Toolbox.
I already found out there is such a project that you have done.
And it is just fantastic (it seems we had the same idea. You, first...) !
I have to say:
- man, I would absolutely love to have your knowledge on this stuff !
And everyone in UA-cam... absolutely loves (...) you.
We don't need to see the other videos (related to what you explain in yours) !
Many thanks, and I have an idea for a project (which I will try to make...) !
Anyway... because you are so special... I'm going to tell you:
- an application to control our entire life (Banks, Home expenses - with statistics for food , Salaries and taxes, Personal schedules, Birthdays, Medical situations
Carlos Alberto Araujo Thank you for the vote of confidence and encouragement, Carlos! :-D
While your app sounds pretty complex, I think that we're really only limited by our imagination and motivation. The important thing is to take it one piece at a time. First, get each component working. Then, improve the code to make it work more efficiently with less code.
Excel can be very useful and can be greatly extended via macros, but a compiled application can offer so much more flexibility and power. I'm much more comfortable working with databases than excel, but in reality they're very similar. You're just working with a Dataset - columns and rows - and performing look-ups and calculations.
Thank you very much. This video helped me a lot. A very didactic example. Good job
This is amazing, thanks for this video, very well explained and totally usefull
Really .. nice , Is there ones about user grants ? ( User as admin .. has all permissions .. others not all ) I mean admin can save, delete, update, search, others only can search . thanks so much, late but thank you .
I know I built a very basic permissions table just like that with one of my SQL tutorials, but I'm not sure if I ever demo'd that. It's included in one of my SQL project links (part 4), I believe.
Database is the best way to manage permissions, for sure, but you could also use an encrypted text file or .ini file if you didn't want to use a database.
thank you very very very much for this tutorial
Thank you very much
Hi, I have a form with animation morphing. I wanted to save it into a .gif file with that animation. Is it possible?
Could you make a tutorial on adding text do it also? or if you could, add the code to do so... not the whole program, just the snippit
What about if I have a list view displaying images and i want to save them in a created directory, how can I do so?
thanx a lot. working gr8
Отличный мастер класс!
THX so much 🥳🥳🥳
Hi Vbtoolbox! I have seen your tutorials and I love them. I am working in a program and in my program I have 3 PictureBox and 1 TextBox and I wont to blend 2 pictures and the text on TextBox in the third PictureBox and save that picture. Can You help me PLEASE.
When the graphics size exceeds the picturebox,
I can use scrllobar to keep drawings are visible and save as parts of image,but
For example,when the square exceeds the viewport,especially in using"for... next"
automatically drawing,how to keep it? thanks for your videos!
Hi there, great video, is it possible to capture a specific square area within the form design? as I can’t seem to change the location of the capture and size with much success…
Hope that makes sense
Thank You for any help!!!
what if i want to save it as gif? i tried and it made the image all weird looking and bad quality but it was a gif from the start and looked better. how do i get full quality rendering on gifs?
It just draws a bunch of dots if the mouse moves too fast. Please help.
For your second idea on the thing without rectangles, my program crashes when trying to use this
dim thickness as integer = "1"
dim thickness1 as string = thickness.ToString + ".0F"
or this dim thickness1 as string = thickness + ".0F"
mousemove:
qMouse.Enqueue(e.Location)
PaintBrush(thickness)
ive tried to call them singles... still crashes
i cannot able to see the image I set on the picturebox when i used this code what should i do?
what if I wanted to draw on picturebox with an image?
Also, i want to draw to an image, and it wont let me, a custom image i can select with a opendialog and it wont draw to it, could you help me?
wow cool!!!
Hi, thank you for your video .
I have some question about How do I control name of image with textbox ,date and time?
plz help picturebox saves in white image whitout the drawing
What if I want to save multiple drawings?
it was a wonderfull tutorial;....thanks so much
can you help me how to draw lines (any graphics) during run time and make some selection using mouse to assign values......
thanks so much
Thank you!
I love your tutorials man :) great job and thank you so much
I was wondering if you can make a tutorial and show us how to create an e-signature for a vb application !
I did create 1 following this tutorial but the signature is kinda different and I would like to save it to a db ...
I found a tool called inksecuresignature but I didn't know how to use to save the signature into db or png ...
can yo u help plz ?
thanks
Mohammed Zerzouri Thank you, sir. I've never worked with e-signatures specifically; However, I am working on a tutorial for storing images to a database. Hopefully, you will be able to adapt it for your needs. You will need to have the PNG or at least a memory stream of the image data available in order to place it in the database. If the tool allows you to see the image in your application, then you should be able to capture it to PNG using the picturebox or graphics object that is displaying the image.
VB Toolbox thanks
Mohammed Zerzouri If you'd like to see my source prior to a tutorial, it can be download here: www.dropbox.com/s/n6skmrga831lpdn/DBPicturesTut.zip?dl=0
To actually use it you'll need to adjust the connection string and queries to match your database.
I suggest for you ;)
What about if you create tut about how to open from openfiledialog picture draw to picture and save it on desktop example ?
Thank You.
is there a way that can add a undo button...
Thank's
very helpful on my thesis. wheres the other tutorial to how save the picture in document and i can use different file name??
Do you mean like a SaveFileDialog?
YES sir. i want to save it in the document. because your saving image is on the debug folder and if you save more just one sources. please help me in the codings..
because my client is a nursery school. i want their drawing save properly in the folder in a different file name.
please help sir... thankyouuu :)
My tutorial on StreamWriter shows how to use the SaveFileDialog. :-) ua-cam.com/video/lhHmOwtb76E/v-deo.html
There are no mistakes, just happy little accidents....
Bwahaha! Thank you, Bob Ross! ;-D
thanks
hello
thank you for this video
I'm asking if you can upload the source code plz
Hello, Anis. This is a really old tutorial and this was the closest project source that I could locate in my archive. I think that the drawing size may need to be fixed but everything else appears to be functional. Link: www.dropbox.com/s/v3e47zqccvtzajj/DrawingTut.zip?dl=0
i love you alll :* :* :* :*
God will bless you for this beautiful tutorial. I have been looking for a vb.net code to draw on the InkPicture control and save the image. With this tutorial, EUREKA! Thanks a lot.
automaticallyautomaticallyautomatically
Character In the video It's great, I like it a lot $$