Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
GeneralRe: Setting the region of a computer from a C# program... Pin
glauben2-Apr-10 10:19
glauben2-Apr-10 10:19 
GeneralRe: Setting the region of a computer from a C# program... Pin
PIEBALDconsult2-Apr-10 10:47
mvePIEBALDconsult2-Apr-10 10:47 
GeneralRe: Setting the region of a computer from a C# program... Pin
Mycroft Holmes2-Apr-10 22:36
professionalMycroft Holmes2-Apr-10 22:36 
GeneralRe: Setting the region of a computer from a C# program... Pin
glauben4-Apr-10 15:12
glauben4-Apr-10 15:12 
GeneralRe: Setting the region of a computer from a C# program... Pin
Mycroft Holmes4-Apr-10 15:34
professionalMycroft Holmes4-Apr-10 15:34 
QuestionDS virtual capture device Pin
kennyhibs2-Apr-10 8:34
kennyhibs2-Apr-10 8:34 
AnswerRe: DS virtual capture device Pin
Migounette3-Apr-10 10:40
Migounette3-Apr-10 10:40 
QuestionListView control in Csharp smart device [modified] Pin
Tunisien862-Apr-10 4:59
Tunisien862-Apr-10 4:59 
Hi,
I am a starter in developping applications with csharp smart device projects.I want to create a Form named PrincipalMenu where I have many icons that let me pass to other Forms.With the toolbox tool,I create my listView and i associated an imageList.I want now to show my icons(which are the nodes of my imagelist)when running the application and associate to anyone a code to let me pass to a form.
I write this code but it doesn't show me anything when running application:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Essaie
{
public partial class Form1 : Form
{

private const int IMG_Traveaux = 0;
private const int IMG_Stock = 1;
private const int IMG_Energie = 2;
private const int IMG_Sync = 3;
private const int IMG_Info = 4;
private const int IMG_Quitter = 5;
private ListViewItem LVI_Traveaux;
private ListViewItem LVI_Stock;
private ListViewItem LVI_Energie;
private ListViewItem LVI_Sync;
private ListViewItem LVI_Info;
private ListViewItem LVI_Quitter;
public Form1()
{
InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)
{
ListView MaLV = new ListView();
MaLV.Parent = this;
MaLV.Dock = DockStyle.Fill;
MaLV.View = View.Details;
LVI_Traveaux = new ListViewItem("Travaux");
LVI_Traveaux.ImageIndex = IMG_Traveaux;
LVI_Stock = new ListViewItem("Stocks");
LVI_Stock.ImageIndex = IMG_Stock;
LVI_Energie = new ListViewItem("Energie");
LVI_Energie.ImageIndex = IMG_Energie;
LVI_Sync = new ListViewItem("Synchronisation");
LVI_Sync.ImageIndex = IMG_Sync;
LVI_Info = new ListViewItem("Informations");
LVI_Info.ImageIndex = IMG_Info;
LVI_Quitter = new ListViewItem("Quitter");
LVI_Quitter.ImageIndex = IMG_Quitter;
MaLV.Items.Add(LVI_Traveaux);
MaLV.Items.Add(LVI_Stock);
MaLV.Items.Add(LVI_Energie);
MaLV.Items.Add(LVI_Sync);
MaLV.Items.Add(LVI_Info);
MaLV.Items.Add(LVI_Quitter);
}
}

}

Can someone tells me the error and gives me the code of any node of the listview
thanks for u help
modified on Friday, April 2, 2010 11:58 AM

AnswerRe: ListView control in Csharp smart device Pin
Luc Pattyn2-Apr-10 5:09
sitebuilderLuc Pattyn2-Apr-10 5:09 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 5:29
Tunisien862-Apr-10 5:29 
AnswerRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 7:01
professionalRavi Bhavnani2-Apr-10 7:01 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 9:12
Tunisien862-Apr-10 9:12 
GeneralRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 9:16
professionalRavi Bhavnani2-Apr-10 9:16 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 9:21
Tunisien862-Apr-10 9:21 
AnswerRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 9:25
professionalRavi Bhavnani2-Apr-10 9:25 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 9:49
Tunisien862-Apr-10 9:49 
AnswerRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 10:04
professionalRavi Bhavnani2-Apr-10 10:04 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 13:26
Tunisien862-Apr-10 13:26 
GeneralRe: ListView control in Csharp smart device Pin
Ravi Bhavnani2-Apr-10 13:31
professionalRavi Bhavnani2-Apr-10 13:31 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 22:54
Tunisien862-Apr-10 22:54 
AnswerRe: ListView control in Csharp smart device Pin
leckey2-Apr-10 5:56
leckey2-Apr-10 5:56 
GeneralRe: ListView control in Csharp smart device Pin
Tunisien862-Apr-10 6:01
Tunisien862-Apr-10 6:01 
Questionworkflow question : need wfmc standard tables definitions. Pin
hdv2122-Apr-10 4:14
hdv2122-Apr-10 4:14 
AnswerRe: workflow question : need wfmc standard tables definitions. Pin
Richard MacCutchan2-Apr-10 4:18
mveRichard MacCutchan2-Apr-10 4:18 
GeneralRe: workflow question : need wfmc standard tables definitions. Pin
Abhinav S2-Apr-10 5:01
Abhinav S2-Apr-10 5:01 

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.