473,379 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Controls in IDE -vs- Running in an App

Hello,

I have a custom control that fails to display because in the IDE it's
looking for some database connections that are not there. The control works
fine in the application because the databases are there. Is there some way
I can stop the control from doing a database lookup if it in the IDE? Or
some way I can figure out the application is running -vs- just being edited
in the IDE?

Thanks,
David
Sep 12 '06 #1
3 905
David,
Depending on where the database connection is happening, you should be able
to use Component.DesignMode to indicate if the control is currently in
design mode or not.

NOTE: Checking this property in the constructor doesn't work as the control
is in the process of being created & has not yet been sited in a container
in the designer...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"David Miller" <dm*********@earthlink.netwrote in message
news:mG*********************@fe04.news.easynews.co m...
| Hello,
|
| I have a custom control that fails to display because in the IDE it's
| looking for some database connections that are not there. The control
works
| fine in the application because the databases are there. Is there some
way
| I can stop the control from doing a database lookup if it in the IDE? Or
| some way I can figure out the application is running -vs- just being
edited
| in the IDE?
|
| Thanks,
| David
|
|
Sep 12 '06 #2
Hello Jay B. Harlow [MVP - Outlook],

Also.. you might consider putting the work of the control into a method..
or have it activated by calling a method. That method wont be called in
the IDE.

-Boo
David,
Depending on where the database connection is happening, you should be
able
to use Component.DesignMode to indicate if the control is currently in
design mode or not.
NOTE: Checking this property in the constructor doesn't work as the
control is in the process of being created & has not yet been sited in
a container in the designer...

"David Miller" <dm*********@earthlink.netwrote in message
news:mG*********************@fe04.news.easynews.co m...
| Hello,
|
| I have a custom control that fails to display because in the IDE
it's
| looking for some database connections that are not there. The
control
works
| fine in the application because the databases are there. Is there
some
way
| I can stop the control from doing a database lookup if it in the
IDE? Or
| some way I can figure out the application is running -vs- just being
edited
| in the IDE?
|
| Thanks,
| David
|
|

Sep 13 '06 #3
That was what I was looking for, thank you.
"Jay B. Harlow [MVP - Outlook]" <Ja************@tsbradley.netwrote in
message news:Ot**************@TK2MSFTNGP05.phx.gbl...
David,
Depending on where the database connection is happening, you should be
able
to use Component.DesignMode to indicate if the control is currently in
design mode or not.

NOTE: Checking this property in the constructor doesn't work as the
control
is in the process of being created & has not yet been sited in a container
in the designer...

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"David Miller" <dm*********@earthlink.netwrote in message
news:mG*********************@fe04.news.easynews.co m...
| Hello,
|
| I have a custom control that fails to display because in the IDE it's
| looking for some database connections that are not there. The control
works
| fine in the application because the databases are there. Is there some
way
| I can stop the control from doing a database lookup if it in the IDE?
Or
| some way I can figure out the application is running -vs- just being
edited
| in the IDE?
|
| Thanks,
| David
|
|


Sep 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
0
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new...
3
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
10
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
66
by: Cor | last post by:
Hi, I start a new thread about a discussion from yesterday (or for some of us this morning). It was a not so nice discussion about dynamically removing controls from a panel or what ever. It...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.