CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Picturebox Problem

    I'll see what I can do for you in the evening
    ----------
    edit: Sorry was to busy yesterday I'll hopefully see this evening what I can do
    Have you tried to debug that BizDraw example to see how it works ?
    Last edited by JonnyPoet; July 29th, 2009 at 02:03 AM.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  2. #17
    Join Date
    Jun 2009
    Location
    Bangalore,INDIA
    Posts
    16

    Re: Picturebox Problem

    thank you

  3. #18
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Picturebox Problem

    Quote Originally Posted by fordev View Post
    thank you
    Here are some other examples which may help you using the bitmap class

    http://ondotnet.com/pub/a/dotnet/200...ng.html?page=3

    At first draw a black circle to an empty white bitmap.
    Then read out the x/y data of each black point in that bitmap so you get an array of that positions. If you read them reading from left to right and from top to bottom then you will get at least two or more black points in each line. left from the first and right from the last in each line you will have to fill color grey.
    Inside the circle is the bitmap.
    As a first step dont care about motion of the picture.
    Simple you have after the first group og black points which is the left borders line you have to copy in the bitmap. Until you reach the first black point of the right circles border.
    For copying parts of the bitmap at first fill an Image with that pictrure and then you can copy the data using ownerdrawing Draw method to the real Form surface.

    Give this a try and show what you have. Then I'll have a look on it.
    I have added a drawing that shows the idea I described showing one pixel line
    Attached Images Attached Images
    Last edited by JonnyPoet; July 29th, 2009 at 05:29 PM.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  4. #19
    Join Date
    Jun 2009
    Location
    Bangalore,INDIA
    Posts
    16

    Re: Picturebox Problem

    ok . I will do as you said.

  5. #20
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Picturebox Problem

    Quote Originally Posted by fordev View Post
    ok . I will do as you said.
    Yep and when you have done a bit show it ( zip the project and post it ) and I'll have a look on and give you some hints if needed
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  6. #21
    Join Date
    Jun 2009
    Location
    Bangalore,INDIA
    Posts
    16

    Thumbs up Re: Picturebox Problem

    ok

  7. #22
    Join Date
    Jun 2009
    Location
    Bangalore,INDIA
    Posts
    16

    Re: Picturebox Problem

    I tried to code piece of code using Bitmap class.I will send it to you right now to your e-mail. please have a look on it.

  8. #23
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Picturebox Problem

    Quote Originally Posted by fordev View Post
    I tried to code piece of code using Bitmap class.I will send it to you right now to your e-mail. please have a look on it.
    You can attach it here as well, so that we all can benefit from it as well

  9. #24
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Picturebox Problem

    Quote Originally Posted by fordev View Post
    I tried to code piece of code using Bitmap class.I will send it to you right now to your e-mail. please have a look on it.
    In the first program you have sent me the MouseMove Delegate code moves the whole picturebox, that is impossible.

    Additional: You will really need to draw it ownerdrawn. Using Picturebox.Image and calculating the changes outside of it by always adding the changed picture during movement will not work

    I have done some changes to your first code a) regarding MouseMove
    b) reading bitmap in an two dimensional array and from there copying the correct picture to the needed picture. But because I simple used your method to send the created result as a full image to the picturebox you will see that moving the picture will give people hard time. So all needs to be done ownerdrawn. I had tried to send it yesterday night, but your email had some problems with it and refused to accept it. ( Maybe there was an exe file in it as I simple zipped the project. ) So I'll see to send it in a few hours. Its only to get you the idea. You then need to redo that conceipt as an ownerdrawn issue
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

Page 2 of 2 FirstFirst 12

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

Featured