Click here to Skip to main content
15,907,913 members
Home / Discussions / C#
   

C#

 
GeneralRe: structure Pin
LeeeNN30-Mar-05 14:43
LeeeNN30-Mar-05 14:43 
GeneralRe: structure Pin
Christian Graus30-Mar-05 15:04
protectorChristian Graus30-Mar-05 15:04 
GeneralRe: structure Pin
Sebastian Schneider30-Mar-05 21:10
Sebastian Schneider30-Mar-05 21:10 
GeneralRe: structure Pin
Mathew Hall31-Mar-05 3:26
Mathew Hall31-Mar-05 3:26 
GeneralLocating and Extracting VS.Net Icons for Pluggin use Pin
Tristan Rhodes30-Mar-05 12:56
Tristan Rhodes30-Mar-05 12:56 
GeneralRe: Locating and Extracting VS.Net Icons for Pluggin use Pin
Syed Abdul Khader30-Mar-05 21:39
Syed Abdul Khader30-Mar-05 21:39 
GeneralInherited windows forms control...which event... Pin
Member 9630-Mar-05 12:45
Member 9630-Mar-05 12:45 
GeneralRe: Inherited windows forms control...which event... Pin
Member 9631-Mar-05 8:40
Member 9631-Mar-05 8:40 
For the record, here is the solution:
The trick is to separate the running of the constructor in design time versus run time.

There is a designtime property but it will not work for this purpose as it is always null in the constructor, either of the following *do* work:

//Detect runtime in constructor of inherited control<br />
<br />
//#1 simple and obvious way to check:<br />
//see if running in visual studio - seems slower in first check (i.e. when first loading a form with this control on it) but faster in subsequent checks<br />
if(System.Diagnostics.Process.GetCurrentProcess().ProcessName != "devenv")<br />
  <br />
<br />
//#2 seems to be consistently faster in initial and subsequent checks<br />
if(LicenseManager.UsageMode == LicenseUsageMode.Designtime) 	

GeneralCursors and threads Pin
PaleyX30-Mar-05 12:00
PaleyX30-Mar-05 12:00 
GeneralRe: Cursors and threads Pin
Pyro Joe30-Mar-05 12:22
Pyro Joe30-Mar-05 12:22 
GeneralRe: Cursors and threads Pin
PaleyX30-Mar-05 12:26
PaleyX30-Mar-05 12:26 
Generalreplacement regular expression Pin
Pyro Joe30-Mar-05 11:57
Pyro Joe30-Mar-05 11:57 
GeneralRe: replacement regular expression Pin
Christian Graus30-Mar-05 12:08
protectorChristian Graus30-Mar-05 12:08 
GeneralRe: replacement regular expression Pin
Pyro Joe30-Mar-05 12:18
Pyro Joe30-Mar-05 12:18 
GeneralRe: replacement regular expression Pin
Christian Graus30-Mar-05 12:24
protectorChristian Graus30-Mar-05 12:24 
GeneralRe: replacement regular expression Pin
Dave Kreskowiak30-Mar-05 16:09
mveDave Kreskowiak30-Mar-05 16:09 
GeneralRe: replacement regular expression Pin
Pyro Joe30-Mar-05 16:34
Pyro Joe30-Mar-05 16:34 
GeneralRe: replacement regular expression Pin
Yulianto.30-Mar-05 18:25
Yulianto.30-Mar-05 18:25 
GeneralRe: replacement regular expression Pin
mav.northwind31-Mar-05 0:17
mav.northwind31-Mar-05 0:17 
GeneralRe: replacement regular expression Pin
Dave Kreskowiak31-Mar-05 2:02
mveDave Kreskowiak31-Mar-05 2:02 
GeneralRe: replacement regular expression Pin
Pyro Joe31-Mar-05 3:17
Pyro Joe31-Mar-05 3:17 
GeneralExtract 48x48 size icon using SHGetFileInfo Pin
Milan200730-Mar-05 11:30
Milan200730-Mar-05 11:30 
GeneralRe: Extract 48x48 size icon using SHGetFileInfo Pin
JockerSoft31-Mar-05 4:04
JockerSoft31-Mar-05 4:04 
GeneralRe: Extract 48x48 size icon using SHGetFileInfo Pin
Milan200731-Mar-05 13:54
Milan200731-Mar-05 13:54 
Generalneed some help Pin
Petdav30-Mar-05 10:54
Petdav30-Mar-05 10:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.