Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
GeneralRe: Forms Pin
humayunlalzad14-Nov-08 8:09
humayunlalzad14-Nov-08 8:09 
GeneralRe: Forms Pin
Le centriste14-Nov-08 8:11
Le centriste14-Nov-08 8:11 
AnswerRe: Forms Pin
Hum Dum14-Nov-08 23:03
Hum Dum14-Nov-08 23:03 
GeneralRe: Forms Pin
humayunlalzad15-Nov-08 5:15
humayunlalzad15-Nov-08 5:15 
GeneralRe: Forms Pin
nelsonpaixao15-Nov-08 5:13
nelsonpaixao15-Nov-08 5:13 
GeneralRe: Forms Pin
humayunlalzad15-Nov-08 7:39
humayunlalzad15-Nov-08 7:39 
GeneralRe: Forms Pin
nelsonpaixao16-Nov-08 13:38
nelsonpaixao16-Nov-08 13:38 
Questioncontrol moving [modified] Pin
netJP12L14-Nov-08 6:02
netJP12L14-Nov-08 6:02 
Hi guys, I want to resize the custom control if i select the bottom left handle on the control and drag it so it can be resize. The problem is that through the bottom left handle when the custom control size reaches 20 and if further drag up the custom control doesn't change its size but it starts to move horizontally.

Can you please point me where i am doing wrong. Thanks.

private void Nodes_MouseMove(object sender, MouseEventArgs e)
{
   if(NodeLocation.BottomCenter=="BottomCenter")
   {
      bottomCenter(n, e.X, e.Y);
   }
   else
   {
      bottomLeft(n, e.X, e.Y);
   } 
}
//Bottom center is perfectly working fun
private void bottomCenter(Nodes n, int x, int y)
{
    Control c = (Control)n.Tag;
    n.Location = new Point(n.Location.X, n.Location.Y + y);
    c.Height = c.Height + y;             
} 
       
private void bottomLeft(Nodes n, int x, int y)
{
            
   Control c = (Control)n.Tag;  
   n.Location = new Point(n.Location.X + x, n.Location.Y + y);
                     
  if(c.ClientRectangle.Width > 20 && c.ClientRectangle.Height > 20)
  { 
      c.Left = c.Left + n.Left;
      c.Height = c.Height + y;                                 
      c.Width = c.Width - n.Left;                
            
  }
  else
  { 
     if( n.Left + c.Left > 20  ) ----> when button size reaches 20 and wants to ruther decrease it size then button moves horinontally      {
        c.Left = c.Left + n.Left;
        c.Height = c.Height + y;                   
        c.Width = c.Width -n.Left;
     }
  }

}


modified on Friday, November 14, 2008 12:12 PM

AnswerRe: control moving Pin
Pedram Behroozi14-Nov-08 10:21
Pedram Behroozi14-Nov-08 10:21 
GeneralRe: control moving Pin
netJP12L14-Nov-08 10:50
netJP12L14-Nov-08 10:50 
GeneralRe: control moving Pin
Pedram Behroozi14-Nov-08 11:06
Pedram Behroozi14-Nov-08 11:06 
QuestionTracing - Perfomance impact. Pin
Member 232448314-Nov-08 5:59
Member 232448314-Nov-08 5:59 
AnswerRe: Tracing - Perfomance impact. Pin
carbon_golem14-Nov-08 7:14
carbon_golem14-Nov-08 7:14 
AnswerRe: Tracing - Perfomance impact. Pin
Wendelius14-Nov-08 7:41
mentorWendelius14-Nov-08 7:41 
AnswerRe: Tracing - Perfomance impact. Pin
Scott Bruno14-Nov-08 8:02
Scott Bruno14-Nov-08 8:02 
GeneralRe: Tracing - Perfomance impact. Pin
Guffa14-Nov-08 18:17
Guffa14-Nov-08 18:17 
GeneralRe: Tracing - Perfomance impact. Pin
Scott Bruno15-Nov-08 8:08
Scott Bruno15-Nov-08 8:08 
AnswerRe: Tracing - Perfomance impact. Pin
Pete O'Hanlon14-Nov-08 10:39
mvePete O'Hanlon14-Nov-08 10:39 
GeneralRe: Tracing - Perfomance impact. Pin
Member 232448314-Nov-08 13:14
Member 232448314-Nov-08 13:14 
QuestionUrgent Help Dataset DB Update Pin
NewbieGL14-Nov-08 5:17
NewbieGL14-Nov-08 5:17 
AnswerRe: Urgent Help Dataset DB Update Pin
Vimalsoft(Pty) Ltd14-Nov-08 7:16
professionalVimalsoft(Pty) Ltd14-Nov-08 7:16 
QuestionAnaimated Graphics Pin
Rafone14-Nov-08 5:13
Rafone14-Nov-08 5:13 
AnswerRe: Anaimated Graphics Pin
Wendelius14-Nov-08 8:10
mentorWendelius14-Nov-08 8:10 
QuestionEventLog Crap Pin
#realJSOP14-Nov-08 4:54
mve#realJSOP14-Nov-08 4:54 
AnswerRe: EventLog Crap Pin
J4amieC14-Nov-08 4:59
J4amieC14-Nov-08 4:59 

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.