Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / March 2005

Tip: Looking for answers? Try searching our database.

control won't load correctly in designer.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Donald Hurley - 09 Mar 2005 17:45 GMT
I created a user control, some of the controls that it contains make a remote
call to get data.  If the remote service is not up and running, the control
won't display in any form I put it in.

In the constructor I have:

ScreenHelper.LoadProjectSelect(selProject);
ScreenHelper.LoadDamSelect(selDam);
ScreenHelper.LoadLicenseTypeSelect(selLicenseType);
ScreenHelper.LoadLicenseStatusSelect(selLicenseStatus);
ScreenHelper.LoadLicenseeTypeSelect(selLicenseeType);

If I comment these out, the control will load in any form it is placed.

Any ideas how I can always get the control to display in the designer?

Thanks,
Don
joeycalisay - 10 Mar 2005 00:17 GMT
perhaps you want those lines to be executed at runtime only.  in that case,
try the onload eventhandler which tests for the control's designmode
property to distinguish runtime and designtime.

Onload:
if (this.DesignMode)
{
//your method calls
}

Signature

Joey Calisay
http://spaces.msn.com/members/joeycalisay/

> I created a user control, some of the controls that it contains make a remote
> call to get data.  If the remote service is not up and running, the control
[quoted text clipped - 14 lines]
> Thanks,
> Don
Donald Hurley - 15 Mar 2005 17:29 GMT
Thanks, that worked.

> perhaps you want those lines to be executed at runtime only.  in that case,
> try the onload eventhandler which tests for the control's designmode
[quoted text clipped - 26 lines]
> > Thanks,
> > Don

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.