Results 1 to 5 of 5

Thread: My user control has diagonal lines thru it

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    4

    My user control has diagonal lines thru it

    I created a user control called ucDateTime that consists of a DTPicker and 3 command buttons; Clear, Quit and Set. I have a textbox on a form called txtDate that is populated with a date and time. When the user clicks on the textbox, it becomes invisible and the ucDateTime control becomes visible in its place and populated by its value(Now if it is blank). The user can click Clear to remove the date and leave txtDate blank, Quit to leave txtDate as it was or they can select a date/time and click Set to move the value to txtDate. I haven't worked out all the bugs yet but I'm close. When I stop the app and return to the form design, the user control has diagonal lines thru it. Can someone tell me what that is and how I might correct it?

    Thanks,

    Greg

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    The UI is dead 'cos the control has an error or has changed and not been rebuilt since the last change.
    Double click of the UserControl in the project explorer to open it and, if no error message, close it again...that should clear it?
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Posts
    4
    MerrionComputin,

    What you suggested cleared the lines but when I ran the app, exitted the app and returned to form design, the lines were back.

  4. #4
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Odd...
    Make sure the UserControl window is closed before running any app that has forms that reference the control.
    Other than that, I'm out of ideas...
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  5. #5
    Lively Member
    Join Date
    Jun 2001
    Posts
    69
    The diagonal lines that you get are due to an error that occured in your activeX control.

    Usually when you get an error in your code, your app will raise a type mismatch error, but in a compiled activeX control you won't get that message, you will only get those dreaded diagonal lines.

    I would suggest that you step through your code of the active X control and I'm sure you'll find that somewhere you used a variable that creates a type mismatch error. Eg: msgbox cdate(dtMyDate) ' where my dtMydate is a string variable that contains a value that can not be converted to a date.

    I hope this helps.
    Cheers

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