dcsimg

Search:

Type: Posts; User: Code Dummy

Page 1 of 13 1 2 3 4

Search: Search took 0.16 seconds.

  1. Replies
    11
    Views
    299

    Re: Capturing an image of two controls

    Sounds great! Can't hardly wait!

    Sorry to hear about your wife. Hope she is doing fine and nothing serious

    I have just completed the "gluing" routine of the pieces - it works 100%. I connected...
  2. Replies
    31
    Views
    471

    Re: How to crop a picture

    Doesn't do anything



    Private Sub Command1_Click()
    Picture2.AutoSize = False
    Picture2.Picture = Picture1.Picture
    Picture2.AutoSize = True
    End Sub
  3. Replies
    31
    Views
    471

    Re: How to crop a picture

    I did that and removed the picturebox frame and it does work but try this: add a button and another picturebox on the Form. Make the new picturebox borderless and AutoResize = True and in the button...
  4. Replies
    31
    Views
    471

    Re: How to crop a picture

    Why does Picture1 need to be Appearance = 3D and BorderStyle = Fixed Single. If I make it Flat and None it doesn't crop all the way - It's OK on left and top but there is a border on the right and...
  5. Replies
    11
    Views
    299

    Re: Capturing an image of two controls

    After giving some thought to the code I have to glue the two images I probably can figure out why some don't come out right and I think it's the top position hasn't been recalculated like I did for...
  6. Replies
    11
    Views
    299

    Re: Capturing an image of two controls

    My code, hopefully, will prevent the player from getting two pieces glued together if they are not the correct pieces. I have some some rough and vague ideas about this but haven't got to that point...
  7. Replies
    31
    Views
    471

    Re: How to crop a picture

    Would being on XP be a problem

    Your first example ran just fine
  8. Replies
    31
    Views
    471

    Re: How to crop a picture

    I used your program straight out of the zip file from your post #12
  9. Replies
    31
    Views
    471

    Re: How to crop a picture

    Not sure I can BitBlt the .Image property
  10. Replies
    31
    Views
    471

    Re: How to crop a picture

    Private Sub mnuCrop_Click()
    Const PICTUREBOX_BORDERPX As Long = 4 '2 on each edge.
    Dim Picture As StdPicture
    Dim AutoCrop As AutoCrop

    With Picture1
    Set Picture =...
  11. Replies
    1
    Views
    147

    User Control Question

    This is two part question

    1) How does a user control know what it's index value is

    2) How do I print on the UC text showing it's index number
  12. Replies
    11
    Views
    299

    Re: Capturing an image of two controls

    I'm not too sure TransparentBlt will work as there will always be more than one unwanted colors to deal with. I have included three pictures to show what I am up against.

    The top image shows the...
  13. Replies
    31
    Views
    471

    Re: How to crop a picture

    I can't use anything like that as this has to be done in my program while it's running
  14. Replies
    31
    Views
    471

    Re: How to crop a picture

    Had to add

    .Picture = .Image
  15. Replies
    31
    Views
    471

    Re: How to crop a picture

    Works great! I fiddled with the two constants PICTUREBOX_BORDERPX and PADDING to make the edge borders smaller. In your post #3 you said my requirement to crop leaving some background edge showing...
  16. Replies
    31
    Views
    471

    How to crop a picture

    In a picturebox I have an irregular shape image with a lot of white space all around it, on the left, top, bottom, and right sides. I would like to reduce the over all size of the picturebox so that...
  17. Replies
    11
    Views
    299

    Re: Capturing an image of two controls

    Doesn't work because it picks up pieces of other controls nearby. It works with the button because it has a rectangular shape but the controls I'm using do not; they have irregular shapes and...
  18. Replies
    11
    Views
    299

    Capturing an image of two controls

    The below code will capture an image of a button control and save it on the disk:



    Private Sub cmdCaptureButton_Click()
    Dim ControlDC As Long
    Dim r As Long

    Picture1.Cls
    ...
  19. Replies
    6
    Views
    161

    Re: Initializing an array

    I can't use the Resource approach because I will be using different values from one time to another so that is why later I said I'll probably (actually, no doubt) load the values from a file then...
  20. Re: A program that searches within all files in a directory for a specific string

    This might help with want you want
  21. Replies
    6
    Views
    161

    Re: Initializing an array

    I was just wondering if I had to do one element at a time or perhaps a numeric string of number

    MyArray = (310, 191, 272, etc, etc)

    It doesn't really matter. I guess one number at a time is OK...
  22. Replies
    6
    Views
    161

    Initializing an array

    I have a large integer array. Do I have to initialize each element one at a time like this:

    MyArray(0) = 310
    MyArray(1) = 191
    etc

    or is there a better way to do this
  23. Re: Need advice, suggestions, anything that will help

    Yes, I was think along that line. You need a little bit more than what you posted, however



    +----+----+----+
    | NW | N | NE |
    +----+----+----+
    | W | XX | E |
    +----+----+----+
    | SW...
  24. Need advice, suggestions, anything that will help

    In my jigsaw puzzle program I have now made the code to cut out all the puzzle pieces, load them into User Controls, move them around the board and put them together to make the finished picture.
    ...
  25. Re: Making Colored Buttons Look Like they are "On"

    Years ago I made a chess game and the pieces would "highlight" when the player clicked on them. What I did was to make each piece a user control with two pictures. Unclicked the picture was the...
  26. Re: Making Colored Buttons Look Like they are "On"

    Not too good. Two things I don't like

    1) It leaves the selected rectangle which screws up the color because these are small check boxes 22 x 13

    2) The highlighted colored is dithered (if that...
  27. Making Colored Buttons Look Like they are "On"

    I have an array of command buttons (no caption) and I want to make the color of the button look like it's been selected, like you see when you have a series of colored switches and some are off and...
  28. Re: Picture1.Picture = Picture1.Image problem

    OK, makes sense. Why not then just do all this in the Paint event instead of in a procedure or the button event



    '
    '
    Private Sub cmdCommand1_Click()
    Form_Paint
    End Sub
  29. Re: Picture1.Picture = Picture1.Image problem

    What I don't understand is if your are drawing on the screen, in the area "above" the picturebox then why is it that if you move the Form with the picturebox around the drawing stays with the area in...
  30. Re: Picture1.Picture = Picture1.Image problem

    That's a very good idea about what you said to BitBlt the saved hdc onto a picturebox



    '
    '
    Picture1.AutoRedraw = False
    '
    '
    Picture1.Paint ..................
  31. Picture1.Picture = Picture1.Image problem

    I always thought that when you draw on a picturebox you are actually drawing on the Image property and not the Picture property and so you need to set the picture property the same as the image...
  32. Replies
    3
    Views
    204

    Re: How to change to next row

    First, Counter is not in a For....Next loop as I said (that was an error on my part) but it is a Static variable inside the button click which I click on for each shape so I am doing one shape per...
  33. Replies
    3
    Views
    204

    How to change to next row

    I have a picture that contains 35 colored shapes.

    I want to print shapes from 1 thru 7 on row 1 of the target picture then drop down to the next row and print shapes 8 thru 14 on row 2 of the...
  34. Re: Copying one pixel from Picture2 to Picture3

    OK, never mind. I had to make Picture3.AutoRedraw = True. I only had the other two set to True. All is well. So, post 5 code is OK. Thanks for your help.
  35. Re: Copying one pixel from Picture2 to Picture3

    This doesn't work.

    Picture2, Picture3, and picPiece are all same size, all ScaleMode = Pixel

    Picture2 has the colored mask shapes

    Picture3 is the original picture

    picPiece should be...
  36. Re: Copying one pixel from Picture2 to Picture3

    I use Point to find the color but I don't think I can use PSet to copy the pixel from the original image as the only arguments for PSet are X and Y and that means you have to PSet to the same...
  37. Copying one pixel from Picture2 to Picture3

    Is BitBlt or any of the other API along this line the only way to copy a pixel from one picture to another

    I have two picture boxes, both the same size, one with the original picture and the other...
  38. Replies
    3
    Views
    230

    Re: Transparent Colors

    Never mind. I found the program and code I was referring to and it turns out to be a very simple thing. I just place all the pieces on a bitmap and color the background a solid color that does not...
  39. Replies
    3
    Views
    230

    Re: Transparent Colors

    OK, thanks for the links. Maybe I want to do just the opposite. Let's say I have a pictures of chess pieces on a solid background and I want to make a mask of the pieces so this means need to keep...
  40. Replies
    3
    Views
    230

    Transparent Colors

    I know that you can select a color and make it the transparent color in a user control. Without using user controls can it be done in a regular VB6 program.

    Let's say I have a table of several...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width