dcsimg

Search:

Type: Posts; User: tommytwotrain

Page 1 of 9 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    2
    Views
    33

    VS 2019 Re: Help to draw on bitmap

    Koen,

    Are you making a Paint program or a Drawing program? One you freehand color over the pixels like a painting. One you use the vector drawing objects like lines and ellipses to draw a scaled...
  2. Replies
    4
    Views
    27

    Re: Save a drawing

    Yeah. LOL.
  3. Replies
    4
    Views
    27

    Re: Save a drawing

    It will be easier to use DrawToBitmap to capture the picturebox image as shown.

    Then use .Save to save the image as shown.




    Private Sub Button1_Click(sender As Object, e As EventArgs)...
  4. VS 2010 Re: Double Buffering a DataGridview causing Selected cell become Black

    If you have e.Handled = True in the paint event that cancels all the drawing done by the control so you will have to provide code to draw the cell details in the paint event. You dont have code to...
  5. Replies
    21
    Views
    511

    Re: Printing help

    Yes you need to adjust the printout drawing code to fit that paper size. To draw the receipt that size you may need to use a smaller font and abbreviate more. Set margins to zero. May need to use a...
  6. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Read carefully. :)

    "I made two subs to initialize the rectangle grid as shown or you can use the old game data or the rectangle pick the sub in form load."


    Go to the form load event and...
  7. VS 2017 Re: Drag Textbox to a Picturebox and Save result

    I see. Thanks for explaining.

    We help lots of questions and so the questions tend to go in a few patterns. Some just want someone to write the code for them. Which is fine in some cases if...
  8. VS 2017 Re: Drag Textbox to a Picturebox and Save result

    PS Here are some examples of both ways. Moving controls vs GDI+.

    Moving controls with the mouse:
    ...
  9. VS 2017 Re: Drag Textbox to a Picturebox and Save result

    No there is no magic control for that.

    You can add code that will let you move the textbox in the mouse move event. Basically move the textbox to the mouse location.

    However this is what @jmc...
  10. VS 2017 Re: Drag Textbox to a Picturebox and Save result

    Yes that line of code locates the textbox.

    I am not sure what the problem is. The example works fine for me all over the screen. Does the example work for you?

    Is the picturebox on the form or...
  11. VS 2017 Re: Drag Textbox to a Picturebox and Save result

    Here is a drag drop example that makes a textbox on the picturebox at the drop location if you want to try that. Then a new bitmap copy of the picturebox is created for saving.

    169231


    ...
  12. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    I have straightened it out as I was describing instead of leaving you with a disaster that wont run. That is about as far as I am going other than specific questions.

    You can test it now it seems...
  13. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Oh I see one problem. It is using different scales/units between the node coordinates and the edge distance. In the nodes you say one square is 1 unit but in the edges you say 1 square is 50 units.
    ...
  14. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Yes correct. If you want to find possible paths going both directions then you have to code both directions. So yes 1 to 3 and 3 to 1.

    For now you could leave them out. But then you will only...
  15. Replies
    21
    Views
    511

    Re: Printing help

    Yes you can add everything into one form. Use the form you have or... sometimes... it is good to just start a new project and start over and make it all again. Copy and paste as you can, and...
  16. Replies
    21
    Views
    511

    Re: Printing help

    PS did you see this printing example in this recent forum thread?
  17. Replies
    21
    Views
    511

    Re: Printing help

    Yes it is hard and frustrating at first. You need to learn one thing at a time. Practice, debug, change, and learn it.

    Then you can learn something new and add it to what you previously learned.
    ...
  18. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Yusuf,

    Ok that is progress.

    Now you need to learn to debug.

    However as I have been telling you there is an error in your edge data at node 5. You have:

    .AddEdge(5, 5, 50)
  19. Replies
    8
    Views
    274

    VS 2019 Re: Win Tab Design

    Yes you can add a header to your form like that many ways.

    Use a panel control and set docking to top. Then add another panel below it and put your tab control on it.

    Or draw the header...
  20. Replies
    21
    Views
    511

    Re: Printing help

    Yes, very good, that looks correct without detailed study. Run it and see if it works or not. There are several ways it can be done. The array can be used to print or you can use the text boxes.

    I...
  21. Replies
    8
    Views
    274

    VS 2019 Re: Win Tab Design

    Here is an example that uses a class that inherits such as jmc mentions.

    There are some additional features you can use or not.

    The example makes the controls. Just cut and paste the code to...
  22. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Yes well that is not a programming question it is a math question about the algorithm.

    What the Astar algorithm does is find the minimum magnitude sum along the possible paths between two nodes....
  23. Replies
    32
    Views
    681

    VS 2010 Re: A Star algorithm

    Yusuf,

    What are the units in your grid? Meters? Kilometers? What is 1 grid square equal to?

    What is it you want to model with this grid? Distance between stop lights? Major cities? What does...
  24. Replies
    5
    Views
    235

    VS 2010 Re: Map grid with Axis

    Yes very good @.paul. The previous example had a border for the grid axis numbers.

    @Yusuf, I said the two examples were not the same. :)

    There are other differences. I changed it for the...
  25. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    Yusuf,

    I dont really know. I am not sure what you are asking.

    My guess is in theory vertical nodes is no problem. In fact the way this Astar works, the grid type geometry is just for convience....
  26. Replies
    5
    Views
    235

    VS 2010 Re: Map grid with Axis

    Lets start with a simple example. It is best to start simple until you understand the principles then add more things one at a time.

    In this example (not exactly the same as the previous Astar...
  27. VS 2017 Re: Getting Unique Points from List of Points

    You are welcome. Thanks for letting us know!
  28. Replies
    21
    Views
    511

    Re: Printing help

    Oh yeah I see. Thats a good start! I like the red and green buttons. :)

    Your TimeString array has the information similar to what I set up in the timeslip class of the example I posted. Your code...
  29. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    You have to reverse the y values everywhere. Then the graph will draw inverted or upside down.

    If you post a new question thread about it we will explain it to you. It is not related to plotting...
  30. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    You have to subtract the height of the graph from the y values in all cases. That will invert the graph vertically as you want.

    Sorry, I am not going to do it for you.

    I added the drawing part...
  31. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    Do you just want the numbers at the bottom? Then change this line in the grid drawing of the paint event.



    'draw the grid
    For row As Integer = 0 To...
  32. Replies
    21
    Views
    511

    Re: Printing help

    What data do you have now? What code do you already have to keep track of the data? I assume you have times for each race?

    How do you show your data on the computer screen now? Can you print that?...
  33. Replies
    4
    Views
    187

    VS 2017 Re: Rotating an image

    Show an example of what you want to achieve.

    I think kinematics is what its called?

    169025



    Public Class Form6
    Private WithEvents timer1 As New Timer With {.Enabled = True,...
  34. Replies
    4
    Views
    187

    VS 2017 Re: Rotating an image

    To fit the rotated image bounds to a constant size picturebox (or any rectangle) we need to make the rotated image smaller.

    So resizing may or may not be what you want. With the image shown the...
  35. Re: Printing using e.Graphics.DrawString disappears unless page defined by Rectangle

    Sage,

    LOL. There are lots of things it could be.

    Why do you call page settings dialog- margins? Page Size? Are you setting these things?

    Why do you spec your own margin you can use the...
  36. Re: Printing using e.Graphics.DrawString disappears unless page defined by Rectangle

    I cant generate the problem? I removed the rectangle and it seems fine?

    Can you show a complete example that reproduces the problem?

    Perhaps there is more code involved etc?

    168985
  37. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    That is the complete code to draw the map in post #19.

    See the MapPic_Paint sub routine? That sub routine is fired by the system when the picturebox needs to be drawn or "painted." Also when the...
  38. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    If you think of the graph as a map then the edge is the path or road. So between point A and point B there is a road or edge. In the map drawing example below the map1 has six units from A to B. In...
  39. VS 2019 Re: Embed an exe into project and use the publish update option

    I am not sure what you describe as exe in the exe. But, you can have a file or some form of data that is required for the app to run that is local to the system. For example you can save a...
  40. Replies
    33
    Views
    1,034

    VS 2010 Re: A Star algorithm

    Yeah, well, no... the drawing example above only adds code to draw the map in the paint event sub routine from the data. The rest of the drawing example is mostly the same as what you originally...
Results 1 to 40 of 332
Page 1 of 9 1 2 3 4



Featured


Click Here to Expand Forum to Full Width