Search:

Type: Posts; User: Code Dummy

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    17
    Views
    4,318

    Re: How to get hDC Image & Shape

    Some time back, I don't remember when, I needed to perform some action on an Image control that required a handle using an API so I wrapped the Image Control in a User Control and used the hWnd of...
  2. Re: How to close winsock connection when turned off wifi ?

    I don't have this problem. I have server with two clients chat program. Clients are two of my friends on their own pc. If client disconnects server gets notification immediately. If server goes down...
  3. Re: Video text recognition (Video optical character recognition -- Video OCR)

    What is video text recognition? OCR's are for optical character recognition; that means they have to "see" the text characters. So how do you "see" text in a video. Are you not referring to...
  4. Re: Purchase of Microsoft Visual Basic 6.0 Professional

    You know what, you have it so keep it, use it, and quit worrying about it.
  5. Replies
    9
    Views
    2,346

    Re: Rotate Picturebox and it's contents

    I wrote a chess game some time back and I wanted to rotate the board so that the white and black pieces exchanged sides. I didn't rotate the board since there was no need to that so I only...
  6. Replies
    3
    Views
    3,112

    Re: Can't install VB6 anymore

    Thank you Victor, that solved my problem
  7. Replies
    3
    Views
    3,112

    [RESOLVED] Can't install VB6 anymore

    I have had VB6 installed on my PC many times in the past. I have never had a problem with this before today. I'm running XP and I am trying to install Visual Studio 6.0 again.

    I run the Visual...
  8. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    Yesterday I went to the program to make the changes you pointed out above but to my surprise the pieces moved fast and in sync with the mouse movement. I tested all sizes 2x2 to 7x7 and all pieces...
  9. Replies
    11
    Views
    1,870

    Re: Determining Row and Column

    Row = Number \ NumCols
    Col = Number Mod NumCols

    I tried this and it appears to work
  10. Replies
    11
    Views
    1,870

    Determining Row and Column

    I have an array of (0 to 49, 0 To 99) and if I know a certain number how do I determine which row and column it is in
  11. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    I also went back to this post and downloaded your original zip file.

    I ran the program 6 times using the same picture

    1) 2x2 produces big pieces and they move very slow. They do not move with...
  12. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    I got everything in order now and I changed the scanning method as passel suggested in his post 7 by just scanning around the piece instead of always starting at 0,0. The scanning time is now super...
  13. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    OK, never mind. Even though I don't see the copied image in picPiece it still gets saved on the disk OK
  14. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    AutoRedraw is True on picPuzzle (you already did that). See below code



    '
    '
    Set picPuzzle.Picture = Mask

    With picPuzzle
    .AutoRedraw = True
  15. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    I finally extracted the individual pieces from picPuzzle to another picturebox and correctly position them and save each one as a bitmap file. However, the problem is that picPuzzle must be visible...
  16. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    The reason I have a colored mask picture is that I downloaded the template from the net. It was all black lines (the shapes) on white. At that time I had very little knowledge of what to do about...
  17. Replies
    16
    Views
    3,465

    Re: Is there a faster way

    OK, I include a picture of what I'm doing. The code I posted in my 1st post is what I'm using to do this. For the shapes on the left it goes OK but as the scan gets deeper into Picture4 it starts to...
  18. Replies
    16
    Views
    3,465

    Is there a faster way

    Here's the code I'm using:



    Private Sub DrawPieces(Picturebox As Picturebox, MaskCokor As Integer, Index As Integer)
    Dim NewX As Integer, NewY As Integer

    Picturebox.Picture = Nothing

    ...
  19. Re: How to copy from one picture to another

    OK, I got it, thanks
  20. How to copy from one picture to another

    I have two Pictureboxes, Picture1 and Picture2. I want to copy part of Picture2 to Picture1. The image in Picture2 is somewhere in the middle of the picture and I need to copy that portion to...
  21. Replies
    12
    Views
    1,376

    Re: [RESOLVED] "If" question

    Only works if results are positive..


    If Abs(xl - HorzDist) <= 3 And Abs(yl) <= 3 Then ...


    ...so I had to make slight change to allow for negative results


    If Abs(xl) - HorzDist <= 3 And...
  22. Replies
    12
    Views
    1,376

    Re: "If" question

    Thanks all. I used Olaf's approach
  23. Replies
    12
    Views
    1,376

    Re: "If" question

    (If xl = HorzDist Or xl = HorzDist + 1 Or xl = HorzDist + 2 Or xl = HorzDist + 3) And _
    (yl = 0 Or yl = 1 Or yl = 2 Or yl = 3 Or yl = -1 Or yl = -2 Or yl = -3) Then


    Compile error - Expected:...
  24. Replies
    12
    Views
    1,376

    [RESOLVED] "If" question

    Why does this not work

    If xl = HorzDist Or xl = HorzDist + 1 Or xl = HorzDist + 2 Or xl = HorzDist + 3 And _
    yl = 0 Or yl = 1 Or yl = 2 Or yl = 3 Or yl = -1 Or yl = -2 Or yl = -3 Then
    '
    '
    I...
  25. Re: Last 5% of the project takes 50% of the time to complete...

    Seems to be just the opposite with me. I spend forever at the start of a project but zip right through it during the end
  26. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    My boss once told me that assume makes an ass out of u and me
  27. Re: Smearing problem moving Pictureboxes and a lot of my own User Controls are presen

    @passel

    I have been going through your code logic and I must say I am very impressed. I am now in the process of making changes to the code so that the pieces will have a irregular shape to them...
  28. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    Where do you get the idea that I hard coded these values? Did you not see the code I posted in my first post. Post 10 was just to let you know what the values are
  29. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    I think it was all my imagination.
  30. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    OK, it works now after adding ByVal lMouse(0)

    1 slows it down, 10 puts it back to normal

    Thanks for your help
  31. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    Instead of using that code above which didn't work I just did the API by itself like this:

    Dim Speed As Long

    Speed = 1

    Call SystemParametersInfo(SPI_SETMOUSESPEED, 0&, Speed,...
  32. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    OK, the values should be

    Private Const SPI_SETMOUSESPEED = &H71
    Private Const SPI_GETMOUSESPEED = &H70

    but it still doesn't work

    I got the code off the net and tried it out unchanged. I...
  33. Replies
    18
    Views
    3,776

    Re: Controlling the Mouse Pointer Speed

    I don't think it works, at least it doesn't appear that way



    Option Explicit

    Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long,...
  34. Re: Smearing problem moving Pictureboxes and a lot of my own User Controls are presen

    All is well. It occurs when you have a big picture (like the one I've been using, Petalo.jpg) and make it a 2 x 2 puzzle.
  35. Re: Smearing problem moving Pictureboxes and a lot of my own User Controls are presen

    OK, here's what I see. I'm running Task Manager -> Performance

    Pieces are just sitting-----> CPU Usage is 0 to 10%
    Mouse Down on Piece-----> CPU Usage goes up to 100% then drops down to 0 to 10%...
  36. Re: Smearing problem moving Pictureboxes and a lot of my own User Controls are presen

    Hope I'm not putting my foot in my mouth[again] but I just noticed that the pieces do not move with the mouse; they move moments later after you stop moving but before you release the mouse. I...
  37. Replies
    11
    Views
    1,595

    Re: Loading Multiple Forms

    I had problems using f As frmSlaveShip so I made a slight change:



    '
    '
    Dim x As Integer
    For x = 0 To 50
    Set frmSlaveShip(x) = New frmSlaveShip
  38. Replies
    18
    Views
    3,776

    Controlling the Mouse Pointer Speed

    Using code can I slow down the mouse pointer to prevent user from moving it too fast but only for a certain event like manually moving an object around the Form to keep it from smearing. I noticed if...
  39. Replies
    11
    Views
    1,595

    Re: Loading Multiple Forms

    OK, great. Now I have a question

    Instead of controlling the MouseDown, MouseMove, and MouseUp events in each Form can I control these events in the frmMotherShip

    Also now that I have the forms...
  40. Replies
    11
    Views
    1,595

    Loading Multiple Forms

    I have the main Form called frmMotherShip and I want to load, let's say, 40 other Forms as an array. The names of the other Forms will be frmSlaveShip(0), frmSlaveShip(1),.........frmSlaveShip(39)....
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width