Click here to Skip to main content
15,905,971 members

Comments by srinivasan_indian (Top 28 by date)

srinivasan_indian 15-Dec-11 10:59am View    
I removed specific tag in html file using Html agility pack.

Bu i want to use some advanced technologies like LINQ or some thing else to remove specific tag in html file in c#
srinivasan_indian 15-Dec-11 9:37am View    
Where we place a file path to be remove?
srinivasan_indian 15-Dec-11 8:55am View    
Need a full code
srinivasan_indian 13-Dec-11 4:45am View    
Found the solution.
srinivasan_indian 6-Dec-11 6:08am View    
I will place my code used for tablelayoutpanel to

1. Get the row and column values during mouse_click event

2. With the help of that values, user can move the rows and columns.

Requirement:

I want to move only the particular column,but it is moving the particular column as well as the next column.

Hope you understand my issue..Code:

private void tableLayoutPanel1_MouseDown(object sender, MouseEventArgs e)

{ if (e.Button == System.Windows.Forms.MouseButtons.Left)

{ resizing = true; }

} int GRow = 0; int GColumn = 0;

private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e)

{ try { if (resizing)

{ if (rbColumn.Checked) {



tableLayoutPanel1.Cursor = Cursors.VSplit;

columnStyles[GColumn].SizeType = SizeType.Absolute;

columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width;

} else

{

tableLayoutPanel1.Cursor = Cursors.HSplit;

rowStyles[GRow].SizeType = SizeType.Absolute;

rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height;

} }

} catch (Exception ex)

{ //MessageBox.Show(ex.ToString()); }

}

private void tableLayoutPanel1_MouseUp(object sender, MouseEventArgs e)

{ if (e.Button == System.Windows.Forms.MouseButtons.Left)

{ resizing = false;

tableLayoutPanel1.Cursor = Cursors.Default; }

}

private void tableLayoutPanel1_MouseClick(object sender, MouseEventArgs e)

{
try
{
int Row=0;

int VSpace = 0;

foreach (int h in tableLayoutPanel1.GetRowHeights())

{
int Column=0;

int HSpace = 0;
foreach (int w in tableLayoutPanel1.GetColumnWidths())
{
Rectangle Rect = new Rectangle(HSpace, VSpace, w, h);
if ((Rect.Contains(e.Location)))
{
GColumn = Column; GRow = Row;
RColumn = Convert.ToString(GColumn) + ',' + Convert.ToString(GRow); MessageBox.Show("Row Value = " + Row.ToString() + " " + "Column Value = " + Column.ToString(), "TableLayoutPanel", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
HSpace += w;
Column += 1;
}
VSpace += h;
Row += 1;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}