Results 1 to 9 of 9

Thread: Draw on a picturebox in a chat program, and other users can see and draw on it too?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Draw on a picturebox in a chat program, and other users can see and draw on it too?

    Hi there folks! Due to the health crisis going on and the schools closed, I need to think outside the box to keep educating my students. I am working on an idea that is similar to a chatroom, but instead of typing text in this chatroom, I would like to draw pictures on a picturebox. I am trying to code a program that lets students login. I will create the login info for my class, and once logged in, students will only see a picturebox that I can draw on from my end such as questions, and the students can draw on the picturebox for their answers.

    I am not sure how to proceed though, I have created a chatroom before in vb6 several years ago, but am looking for input on how to make a "picture chatroom".

    Sorry if it sounds vague at this point lol.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2017
    Posts
    500

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    You make a small program similar to Paint (minus all the Paint options and features) that only allows you to draw on a surface (probably a Picturebox). Your program supplies the drawing surface, drawing pen, and a way to erase (perhaps some other features as well to do other things you feel is necessary) . I believe there are sample programs in the Code Bank that address this drawing program. If you can make such a program then I see no reason why you couldn't embed that into a chat-like app. The code for sending and receiving the pictures would be practically the same as that of a normal chat program. Many chat programs have the ability to send/receive images so your program wouldn't be much different from those.

  3. #3
    Hyperactive Member
    Join Date
    Mar 2017
    Posts
    500

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    OK, just to help you out a little here is a VB Paint project I found. It's more than what you will need but you can strip it down to only what you find necessary. After you get this down to a working model and you find it will do what you want as far as drawing then you might want to post back here or open a new thread to get help on how to implement it into a chat-like program
    Attached Files Attached Files
    Last edited by Ordinary Guy; Mar 31st, 2020 at 04:29 PM.

  4. #4
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    924

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    I am guessing that you want to share audio too? If so, then this would be a large project. I would suggest video sharing sites, like Zoom, or the very least screen sharing sites, but if you want to stick with VB6, it can be done, but would take at least a week or two with a skilled developer, more if not. I have done something similar, screen viewing for Admins. I used BitBlt to capture the screen, and zLib to compress it and send it over Winsock.

  5. #5
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,698

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    Yes, it is not a simple project. But you don't need to send images, you would have to send the drawing commands and coordinates.
    You also would need to set up a server to handle the communication with each user.

    I would search for something already made, there must be something.

    Also consider that drawing with the mouse is not very easy, it is not as easy to draw and write as you do with a physical blackboard.

  6. #6
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    I would think something like this might be a better/quicker choice.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  7. #7
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,624

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    agree with qvb6:

    Zoom is a fantastic tool for what you want to do (and it's free---well, at least for 40 minute sessions---unlimited time sessions only cost 15 USD a month. I use it for games, church services/meetings, family 'face-time', etc. Sure as to heck a lot easier than trying to do something on your own. Check it out. Works on any platform (MAC, iphone, Samsungs, PC, etc).

    EDIT: there is a WHITEBOARD section to use.
    I already have a game that I created with VB6 (just like Win Lose Or Draw) that has an 'audience form' which I share using Zoom....participants in the meeting can annotate that form. But, the whiteboard part of Zoom should work for you.

  8. #8
    Hyperactive Member
    Join Date
    Mar 2017
    Posts
    500

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    I would have suggested Zoom but I thought it was a breakfast cereal.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: Draw on a picturebox in a chat program, and other users can see and draw on it to

    Lol, thank you guys for your help so far. I have slept on it, and tinkered with the idea, and to make it easier to do, I will try to get the students to either type a message in the chatbox to go in the classroom chat, or students can draw on a picturebox, and send a snapshot of the picturebox into the chat, however would anyone know how to copy the image from a picturebox, and send it into the chatroom.

    Here I'll attach an old example one member posted several years ago, it it very simple, but it would make for a good start. : )

    I attached the original project, on my end I have added the picturebox,and can draw on it on my end, but how could a user in the chatroom "send" it? This program uses winsock.

    Thanks!
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width