Results 1 to 3 of 3

Thread: Weirdest Error - Cannot widen from target type to primitive type.

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Location
    Troy, 0hi0
    Posts
    10

    Weirdest Error - Cannot widen from target type to primitive type.

    Okay, I have a solution with many forms. I also have two namespaces where I have about 20 different objects. Everything is going great til I add this one form. Now, on my task list I have two errors that say "Cannot widen from target type to primitive type.". When I double click them to goto the error it takes me to line one of the form (whether there are any Imports or not). I can't figure this out. The only other different from that form is that the Sub New() looks like this Sub New(ByVal n as NoteBook). The NoteBook object is taken from my Namespace which is Imported at the top of the form. I also am calling the ShowDialog() event.

    dim frm as New frmPassword(myNotebook)
    frm.ShowDialog()

    Even if I take out my modified Sub New() and all references to Objects in my Namespace I still get the same 2 errors "Cannot widen from target type to primitive type." both of which, as I said take me to line one of that form.

    I tried compiling this code and it runs great on my computer, however when application is ran on another computer (which is exactly the same as mine, other than minus visual studio, same OS (XP Pro), same RAM, processor, etc) the form will "flash" on and then disappear. You can see that it loaded the dialog box but then it's mysteriously gone.

    I have searched the MSDN, and every forum I'm aware of for the "Cannot widen from target type to primitive type." error and I can't find anything. I would appreciate any help or insight to this problem. Thanks alot!
    Last edited by bergy; Jan 19th, 2004 at 11:09 PM.

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