Click here to Skip to main content
15,893,337 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with Drag-Drop operation with Picture Box.Pls Help Pin
Chintan.Desai7-Jun-07 21:19
Chintan.Desai7-Jun-07 21:19 
QuestionEditing a Textbox and CheckBox in Excel file using Interop Pin
TheMajorRager7-Jun-07 17:51
TheMajorRager7-Jun-07 17:51 
AnswerRe: Editing a Textbox and CheckBox in Excel file using Interop Pin
Ray2Boston13-Jul-10 11:37
Ray2Boston13-Jul-10 11:37 
Questionhow can I get the next item? Pin
lockepeak7-Jun-07 16:45
lockepeak7-Jun-07 16:45 
AnswerRe: how can I get the next item? Pin
Christian Graus7-Jun-07 17:44
protectorChristian Graus7-Jun-07 17:44 
QuestionTableLayoutPanel repaint issue. Pin
Zerox MXI7-Jun-07 16:42
Zerox MXI7-Jun-07 16:42 
AnswerRe: TableLayoutPanel repaint issue. Pin
Salogus7-Jun-07 16:52
Salogus7-Jun-07 16:52 
GeneralRe: TableLayoutPanel repaint issue. Pin
Zerox MXI7-Jun-07 16:59
Zerox MXI7-Jun-07 16:59 
Here it is...

<code>
using ...;

namespace BigOExt
{
public partial class MainForm : Form
{
private System.Threading.Timer timer;
private TableLayoutPanel tlp;
private List<WorkstationTrackerControl> workstationTrackers;
private Point lastPos;

public MainForm()
{
InitializeComponent();

timer = new System.Threading.Timer(new TimerCallback(TimerHandler));

tlp = new TableLayoutPanel();
tlp.ColumnCount = 1;
tlp.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));

tableLayoutPanel1.Controls.Add(tlp, 0, 1);
tlp.Dock = DockStyle.Fill;
tlp.AutoScroll = true;
tlp.Scroll += new ScrollEventHandler(tlp_Scroll);
tlp.Paint += new PaintEventHandler(tlp_Paint);

workstationTrackers = new List<WorkstationTrackerControl>();

for (int i = 0; i < 50; i++)
{
WorkstationTrackerControl ctl = new WorkstationTrackerControl();
tlp.RowCount++;
tlp.RowStyles.Add(new RowStyle(SizeType.AutoSize));
tlp.Controls.Add(ctl, 0, tlp.RowCount - 1);
workstationTrackers.Add(ctl);
}
}

void tlp_Paint(object sender, PaintEventArgs e)
{
if (tlp.AutoScrollPosition != lastPos)
{
Debug.WriteLine("");
tlp.AutoScrollPosition = new Point(Math.Abs(lastPos.X), Math.Abs(lastPos.Y));
}
}

void tlp_Scroll(object sender, ScrollEventArgs e)
{
lastPos = tlp.AutoScrollPosition;
}

private void MainForm_Load(object sender, EventArgs e)
{
timer.Change(TimeSpan.Zero, TimeSpan.FromSeconds(1.0));
}

private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
foreach (WorkstationTrackerControl ctl in workstationTrackers)
{
ctl.Stop();
}

timer.Change(Timeout.Infinite, Timeout.Infinite);
}

private void TimerHandler(object o)
{
BeginInvoke(new ThreadStart(UpdateAppTime));
}

private void UpdateAppTime()
{
toolStripStatusLabel1.Text = DateTime.Now.ToString();
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
}
}
</code>

QuestionIs software installed on pc? Pin
Adeel Chaudhry7-Jun-07 13:21
Adeel Chaudhry7-Jun-07 13:21 
AnswerRe: Is software installed on pc? Pin
Mark Greenwood7-Jun-07 14:56
Mark Greenwood7-Jun-07 14:56 
AnswerRe: Is software installed on pc? Pin
Niiiissssshhhhhuuuuu7-Jun-07 18:37
Niiiissssshhhhhuuuuu7-Jun-07 18:37 
QuestionLimiting DB access to only through application Pin
tempmail17-Jun-07 11:33
tempmail17-Jun-07 11:33 
AnswerRe: Limiting DB access to only through application Pin
Christian Graus7-Jun-07 11:47
protectorChristian Graus7-Jun-07 11:47 
AnswerRe: Limiting DB access to only through application Pin
Russell Jones7-Jun-07 22:38
Russell Jones7-Jun-07 22:38 
QuestionHierarchical Distributed Genetic Algorithm for Image Segmentation Pin
Petra7-Jun-07 10:46
Petra7-Jun-07 10:46 
AnswerRe: Hierarchical Distributed Genetic Algorithm for Image Segmentation Pin
Dave Kreskowiak7-Jun-07 13:28
mveDave Kreskowiak7-Jun-07 13:28 
AnswerRe: Hierarchical Distributed Genetic Algorithm for Image Segmentation Pin
Christian Graus7-Jun-07 15:35
protectorChristian Graus7-Jun-07 15:35 
QuestionFileSystemWatcher Pin
LCI7-Jun-07 10:28
LCI7-Jun-07 10:28 
AnswerRe: FileSystemWatcher Pin
Ylno7-Jun-07 11:42
Ylno7-Jun-07 11:42 
GeneralRe: FileSystemWatcher Pin
LCI8-Jun-07 9:36
LCI8-Jun-07 9:36 
AnswerRe: FileSystemWatcher Pin
mav.northwind8-Jun-07 22:33
mav.northwind8-Jun-07 22:33 
QuestionSearch for non-ASCII characters in a text file Pin
Koshv7-Jun-07 10:22
Koshv7-Jun-07 10:22 
AnswerRe: Search for non-ASCII characters in a text file Pin
Guffa7-Jun-07 13:12
Guffa7-Jun-07 13:12 
Questionbrainbench test with no answer? Pin
brsecu7-Jun-07 10:14
brsecu7-Jun-07 10:14 
AnswerRe: brainbench test with no answer? Pin
Luc Pattyn7-Jun-07 12:45
sitebuilderLuc Pattyn7-Jun-07 12:45 

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.