Results 1 to 5 of 5

Thread: Another line drawing question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    103

    Question Another line drawing question

    In this post, https://www.vbforums.com/showthread....86#post5593486, I had asked for help drawing lines in a form that would be over buttons, i.e., be visible. The answer provided by Jmcilhinney works just fine.

    Sadly, I am again having this issue with the same program. This time, I tried to draw some lines over several buttons using the same constructs as before. The code is triggered by clicking one button (which is outside the area of the line drawing) - the click routine creates the path (array of points) and the line is then drawn in the Paint event handler. The problem is this: the line only appears over the first button.

    Not sure if it matters, but the Paint event routine is the form’s Paint event and there is an AddHandler call connecting the buttons (over which the line is to be drawn) to the event routine. If it matters, I could provide the code for this routine.

    Any suggestions would be welcomed.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: Another line drawing question

    Quote Originally Posted by groston View Post
    …If it matters, I could provide the code for this routine.
    It matters. We’d need to see the code

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    103

    Re: Another line drawing question

    I believe that all of the necessary files are attached. Note that the Project.vb file is to allow me to use command line variables - nothing has been added yet.
    Attached Files Attached Files
    Last edited by groston; Feb 3rd, 2023 at 04:55 PM.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Another line drawing question

    Please only attach ZIP files as a last resort. Your first option should be to post ONLY the relevant code directly, as text formatted as code.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Another line drawing question

    Quote Originally Posted by groston View Post
    Note that the Project.vb file is to allow me to use command line variables - nothing has been added yet.
    I'm not sure why you would need an extra file for that. You can call Environment.GetCommandLineArgs anywhere in your code, or you can handle the Startup event of the application and get the commandline parameters in the handler. You can set commandline parameters in the project properties for testing in the debugger.

Tags for this Thread

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