Results 1 to 15 of 15

Thread: how to draw ..

  1. #1
    Junior Member
    Join Date
    May 05
    Posts
    16

    how to draw ..

    hi,,all of the members,as u all know i m going to prepare a 3D home designig software as my final project.. so first thing is that how to draw the lines rectangles and other necessary things with mouse by selecting that object(rectangle ,circle etc),so can any body tell me how to draw these things on picture box and how to add scroll bars to picture box so that when running that project the picture box be scrolled..
    i have got help about 3D from this forum, but my basics are too week so plz can any body tell me how to draw those images with mouse as paintbrush.

  2. #2
    Super Moderator
    Join Date
    Dec 03
    Location
    Manchester, UK
    Posts
    4,787

    Re: how to draw ..

    Do you wnat to draw it in 3d? Or are we talking drawing 2d images here? and then viewing in 3d?

  3. #3
    Frenzied Member cyborg's Avatar
    Join Date
    May 00
    Location
    Sweden
    Posts
    1,755

    Re: how to draw ..

    If you want to add scrollbars you have to store the fullsized image in the memory (or hidden picturebox) and use BitBlt to draw it back to the screen. You then calculate what region you want to draw back using the values from the scrollbars.

  4. #4
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 02
    Location
    @ Opera Software
    Posts
    10,191

    Re: how to draw ..

    What language are you using. Please add it to the subject line, like most of the other threads here.



    ØØ

  5. #5
    Junior Member
    Join Date
    May 05
    Posts
    16

    Re: how to draw ..

    well i m planning it to draw any drawing in 2D and then by certain command we can view it as 3D .and i want to use visual basic with directX 7 or 8,but still it would be confusing because my teacher has advised that it would be best in C language.but there is a lot of difficulty to design an interface as compared to visual languages.so i m a little bit confused to either use visual C or Visual basic...how ever i have no any professional approach in both of these languages..so tell me what should i do??regards..

  6. #6
    Super Moderator
    Join Date
    Dec 03
    Location
    Manchester, UK
    Posts
    4,787

    Re: how to draw ..

    Choose which ever langauge you are most familiar with, you may notice some slight performance differances. But if you are more comftable with Vb then go with that.

    I'm 99% certain in can be achieved in both langauges

  7. #7
    Junior Member
    Join Date
    May 05
    Posts
    16

    Re: how to draw ..

    i think i must use Visual basic..and i got help from this forum in visual basic rather than visual C++...

  8. #8
    Frenzied Member cyborg's Avatar
    Join Date
    May 00
    Location
    Sweden
    Posts
    1,755

    Re: how to draw ..

    There is a C/C++ section here as well, although most of us are VB-people.

  9. #9
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 02
    Location
    @ Opera Software
    Posts
    10,191

    Re: how to draw ..

    Quote Originally Posted by cyborg
    There is a C/C++ section here as well, although most of us are VB-people.

    Actualy at the moment I think the regular Games And Graphics members are 50/50 when it comes C++ vs VB, and VERY few C# and VB.NET game programmers.


    ØØ

  10. #10
    Junior Member
    Join Date
    May 05
    Posts
    16

    Re: how to draw ..

    ok i m going to start the project in VB so first of all tell me how should i make a picture box so that i can draw line as wall ,door and other parameters etc..

  11. #11
    Addicted Member
    Join Date
    Oct 04
    Posts
    255

    Re: how to draw ..

    I'm not sure if this is along the lines that you want, but i gave it a shot.
    It's also off the top of my head so the code is a bit messy.

    This only handles 2D but with multiple windows you can create 3D cordinates with it if you're creative.

    To start drawing planes instead of lines, change Line1 to a SHAPE (rectangle) instead of a line. you get the idea.

    I hope it helps.
    VB6.0

    <<< Zip error, it was removed >>>>
    Last edited by Waxy; Jun 24th, 2005 at 08:52 AM.

  12. #12
    Junior Member
    Join Date
    May 05
    Posts
    16

    Re: how to draw ..

    thanx alot sir i m just going to try it and then i will reply for this..

  13. #13
    Junior Member
    Join Date
    May 05
    Posts
    16

    Re: how to draw ..

    i have downloaded the program of lines,but it has neither exe file in vb nor it is showing any form in Visual basic IDE,just simply showing a module but in module strange types of characters are shown here.so what is the reason and how can i solve it..

  14. #14
    Addicted Member
    Join Date
    Oct 04
    Posts
    255

    Re: how to draw ..

    I must of made an error in the zip. when i get back to my VB computer tomarrow i'll re-zip and re-send it.
    ----------------------------------------------------

    Missing the days of GWBasic 1.1
    WaxyStudios.com

  15. #15
    Addicted Member
    Join Date
    Oct 04
    Posts
    255

    Re: how to draw ..

    added an .EXE and re-zipped it using normal compression instead of high compression. this should fix the problem.

    http://vbforums.com/attachment.php?a...id=37930&stc=1
    Attached Files Attached Files
    ----------------------------------------------------

    Missing the days of GWBasic 1.1
    WaxyStudios.com

Posting Permissions

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