Click here to Skip to main content
15,895,606 members
Home / Discussions / C#
   

C#

 
GeneralRe: Quad Tree Pin
Pete O'Hanlon4-Jun-09 0:50
mvePete O'Hanlon4-Jun-09 0:50 
GeneralRe: Quad Tree Pin
gabeold4-Jun-09 0:59
gabeold4-Jun-09 0:59 
QuestionHow can I add multiple images in a field (suppose row=2, col = 1) of a ListView control Pin
Md. Ali Naser Khan4-Jun-09 0:40
Md. Ali Naser Khan4-Jun-09 0:40 
AnswerRe: How can I add multiple images in a field (suppose row=2, col = 1) of a ListView control Pin
Mycroft Holmes4-Jun-09 1:04
professionalMycroft Holmes4-Jun-09 1:04 
QuestionAny replacement for FlowLayoutPanel? Pin
darrenlovejoy4-Jun-09 0:31
darrenlovejoy4-Jun-09 0:31 
Questionproblem with setup Pin
vijaylumar4-Jun-09 0:18
vijaylumar4-Jun-09 0:18 
AnswerRe: problem with setup Pin
Searril4-Jun-09 2:59
Searril4-Jun-09 2:59 
Questiontimers in listview [modified] Pin
snehanp3-Jun-09 23:37
snehanp3-Jun-09 23:37 
hey i am working in .net application in c#.........i need to delete differnt items from list view with the help of timer on the selectedindexchange event.....the problem is that when i select one item at a time within the elapsing time of the timer there is no problem, but when i select multiple items at a time within the elapsing time of the timer the timer is set only on the last selected item and it gets removed from the previous one............is there any way to set timer on every selected item of the listview.......i need the code in c#......kindly help....
this is what i am doin........

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace timer
{
public partial class Form2 : Form
{
System.Windows.Forms.Timer m_Timer;

public Form2()
{
InitializeComponent();
listView1.SmallImageList = AlertImageList;
m_Timer = new Timer();
m_Timer.Interval = 5000;
m_Timer.Tick += new EventHandler(m_Timer_Tick);

}

void m_Timer_Tick(object sender, EventArgs e)
{
listView1.Items.RemoveAt(y);

}

public int y;

private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
if (listView1.Items.Count > 0)
{
y = listView1.SelectedItems[0].Index;
//m_Timer.Stop();
m_Timer.Start();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

public int i = 0;

private void btnClick_Click(object sender, EventArgs e)
{
ListViewItem item = new ListViewItem(i.ToString());
listView1.Items.Insert(0, item);
i++;
}

}
}

modified on Thursday, June 4, 2009 6:32 AM

AnswerRe: timers in listview Pin
Christian Graus3-Jun-09 23:59
protectorChristian Graus3-Jun-09 23:59 
AnswerRe: timers in listview Pin
Rajesh R Subramanian4-Jun-09 0:00
professionalRajesh R Subramanian4-Jun-09 0:00 
AnswerRe: timers in listview Pin
Pete O'Hanlon4-Jun-09 0:11
mvePete O'Hanlon4-Jun-09 0:11 
GeneralRe: timers in listview Pin
snehanp4-Jun-09 0:43
snehanp4-Jun-09 0:43 
AnswerRe: timers in listview Pin
Pete O'Hanlon4-Jun-09 4:38
mvePete O'Hanlon4-Jun-09 4:38 
GeneralRe: timers in listview [modified] Pin
snehanp4-Jun-09 19:40
snehanp4-Jun-09 19:40 
GeneralRe: timers in listview Pin
Pete O'Hanlon5-Jun-09 1:15
mvePete O'Hanlon5-Jun-09 1:15 
Questionwindow MDI form Pin
Narsimha093-Jun-09 23:35
Narsimha093-Jun-09 23:35 
AnswerRe: window MDI form Pin
Rajdeep.NET3-Jun-09 23:48
Rajdeep.NET3-Jun-09 23:48 
GeneralRe: window MDI form Pin
Narsimha094-Jun-09 0:06
Narsimha094-Jun-09 0:06 
AnswerRe: window MDI form Pin
Mycroft Holmes4-Jun-09 0:58
professionalMycroft Holmes4-Jun-09 0:58 
QuestionHow to get a .Net Control of a web page in c# Pin
Yukivi3-Jun-09 23:20
Yukivi3-Jun-09 23:20 
AnswerRe: How to get a .Net Control of a web page in c# Pin
Henry Minute4-Jun-09 2:44
Henry Minute4-Jun-09 2:44 
QuestionZero's before number. Pin
Satish - Developer3-Jun-09 22:59
Satish - Developer3-Jun-09 22:59 
AnswerRe: Zero's before number. Pin
0x3c03-Jun-09 23:15
0x3c03-Jun-09 23:15 
AnswerRe: Zero's before number. Pin
Christian Graus3-Jun-09 23:17
protectorChristian Graus3-Jun-09 23:17 
AnswerRe: Zero's before number. Pin
Pete O'Hanlon3-Jun-09 23:22
mvePete O'Hanlon3-Jun-09 23:22 

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.