CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    16

    user-defined controls

    Hi!
    I have create my own control in C#. When I try to use it on my WIndows Form I get an HRESULT exception and the control is never created. Anyone knows how can I debbug this in order to detect the error???

    Thanks in advance!

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    you must be initiallizing some thing on creation. note when u create an instance by draging the new instance is created and thus it executes the controls' initialize, contructor, load events. so what u should do is have a Init() or your load type method which will actually do the loading. you might be doing some database stuff or some kind of loading which can be done only at run time. so eventually when u create an instance its somewhat runtime only in the essence that it execute some code of the User control.

    -PAresh
    - Software Architect

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

Featured