Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
AnswerRe: Drag and drop listview Pin
led mike3-Apr-07 6:01
led mike3-Apr-07 6:01 
GeneralRe: Drag and drop listview Pin
Diego F.3-Apr-07 21:52
Diego F.3-Apr-07 21:52 
QuestionHow to save Excel object for further use? Pin
BlackBar3-Apr-07 4:40
BlackBar3-Apr-07 4:40 
AnswerRe: How to save Excel object for further use? Pin
Douglas Troy3-Apr-07 5:35
Douglas Troy3-Apr-07 5:35 
GeneralRe: How to save Excel object for further use? Pin
BlackBar3-Apr-07 8:55
BlackBar3-Apr-07 8:55 
QuestionSQL Files Pin
hadad3-Apr-07 4:20
hadad3-Apr-07 4:20 
AnswerRe: SQL Files Pin
Douglas Troy3-Apr-07 7:15
Douglas Troy3-Apr-07 7:15 
Questionuse panel inside a user control to drop controls in and make this panel locked. Pin
Johnny Hooyberghs3-Apr-07 3:53
Johnny Hooyberghs3-Apr-07 3:53 
I am esigning a usercontrol with a panel child. Using a ControlDesigner I used EnableDesignMode to make it possible to drop controls in the panel at design time. Now i wanted to lock te panel because you can move and resize the panel inside the usercontrol. I made another ControlDesigner class to use on the panel class and override the SelectionRules to set it to locked. If I use this locked thing, the functionality of dropping controls in the panel dissapears. Howe can I implement these two things without problems?

My code:
<br />
[DesignerAttribute( typeof( AdvancedNoteDesigner ) )]<br />
public partial class AdvancedNote : UserControl<br />
{<br />
   ...<br />
}<br />
<br />
//[DesignerAttribute( typeof( AdvancedNoteContentPanelDesigner ) )]<br />
public class AdvancedNoteContentPanel : Panel<br />
{<br />
   /// <summary><br />
   /// Default class constructor.<br />
   /// </summary><br />
   public AdvancedNoteContentPanel()<br />
   {<br />
      this.SetStyle( ControlStyles.AllPaintingInWmPaint , true );<br />
      this.SetStyle( ControlStyles.OptimizedDoubleBuffer , true );<br />
      this.SetStyle( ControlStyles.ResizeRedraw , true );<br />
      this.SetStyle( ControlStyles.SupportsTransparentBackColor , true );<br />
      this.SetStyle( ControlStyles.UserPaint , true );<br />
<br />
      this.BackColor = Color.Transparent;<br />
   }<br />
}<br />
<br />
internal class AdvancedNoteDesigner : ControlDesigner<br />
{<br />
   public override void Initialize( IComponent component )<br />
   {<br />
      base.Initialize( component );<br />
<br />
      AdvancedNote advancednote = (AdvancedNote)component;<br />
<br />
      EnableDesignMode( advancednote.ContentPanelFront , "ContentPanelFront" );<br />
      EnableDesignMode( advancednote.ContentPanelBack , "ContentPanelBack" );<br />
   }<br />
}<br />
<br />
internal class AdvancedNoteContentPanelDesigner : ControlDesigner<br />
{<br />
   public override SelectionRules SelectionRules<br />
   {<br />
      get<br />
      {<br />
         SelectionRules selRules = base.SelectionRules;<br />
<br />
         selRules = SelectionRules.Locked;<br />
<br />
         return selRules;<br />
      }<br />
   }<br />
}<br />
<br />

QuestionHow to open MyDocument Explorer, My Network places Explorer in C# Pin
Sanjib Raj3-Apr-07 2:29
Sanjib Raj3-Apr-07 2:29 
AnswerRe: How to open MyDocument Explorer, My Network places Explorer in C# Pin
kubben3-Apr-07 3:06
kubben3-Apr-07 3:06 
AnswerRe: How to open MyDocument Explorer, My Network places Explorer in C# Pin
Douglas Troy3-Apr-07 4:39
Douglas Troy3-Apr-07 4:39 
Questionhow to run exe file in ram (on the fly) ? Pin
hdv2123-Apr-07 1:58
hdv2123-Apr-07 1:58 
AnswerRe: how to run exe file in ram (on the fly) ? Pin
Pete O'Hanlon3-Apr-07 2:33
mvePete O'Hanlon3-Apr-07 2:33 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
originSH3-Apr-07 2:35
originSH3-Apr-07 2:35 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
Pete O'Hanlon3-Apr-07 3:07
mvePete O'Hanlon3-Apr-07 3:07 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
originSH3-Apr-07 3:50
originSH3-Apr-07 3:50 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
Pete O'Hanlon3-Apr-07 4:39
mvePete O'Hanlon3-Apr-07 4:39 
GeneralRe: how to run exe file in ram (on the fly) ? Pin
originSH3-Apr-07 5:27
originSH3-Apr-07 5:27 
QuestionUpdate properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 1:56
jonwalmsley3-Apr-07 1:56 
AnswerRe: Update properties of an arraylist of components quickly Pin
Bijesh3-Apr-07 3:15
Bijesh3-Apr-07 3:15 
GeneralRe: Update properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 3:59
jonwalmsley3-Apr-07 3:59 
GeneralRe: Update properties of an arraylist of components quickly Pin
jonwalmsley3-Apr-07 4:20
jonwalmsley3-Apr-07 4:20 
QuestionHow to start method after another one finishes (Thread) Pin
choopie3-Apr-07 1:38
choopie3-Apr-07 1:38 
AnswerRe: How to start method after another one finishes (Thread) Pin
karam chandrabose3-Apr-07 1:46
karam chandrabose3-Apr-07 1:46 
GeneralRe: How to start method after another one finishes (Thread) Pin
choopie3-Apr-07 2:28
choopie3-Apr-07 2:28 

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.