Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataSet By Code Vs DataSet By Wizard Pin
Paul Conrad27-Oct-07 8:31
professionalPaul Conrad27-Oct-07 8:31 
GeneralRe: DataSet By Code Vs DataSet By Wizard Pin
Assaf8227-Oct-07 8:48
Assaf8227-Oct-07 8:48 
GeneralRe: DataSet By Code Vs DataSet By Wizard Pin
Assaf8227-Oct-07 9:13
Assaf8227-Oct-07 9:13 
QuestionItemActivate of directory browser Pin
gerbenschmidt27-Oct-07 4:34
gerbenschmidt27-Oct-07 4:34 
AnswerRe: ItemActivate of directory browser Pin
mav.northwind27-Oct-07 22:50
mav.northwind27-Oct-07 22:50 
GeneralRe: ItemActivate of directory browser Pin
gerbenschmidt28-Oct-07 1:14
gerbenschmidt28-Oct-07 1:14 
GeneralRe: ItemActivate of directory browser Pin
mav.northwind28-Oct-07 8:29
mav.northwind28-Oct-07 8:29 
GeneralRe: ItemActivate of directory browser Pin
gerbenschmidt29-Oct-07 8:25
gerbenschmidt29-Oct-07 8:25 
I my case I only have to run files with their associated applications. So the code must provide the option to run all kind of files with extensions like: *.txt, *.jpg *.dwg, *.xls etc....I think about 10 types of files....a part of my code is like you mentioned to run files:

private void ListView1_ItemActivate(object sender, System.EventArgs e)<br />
        {<br />
            try<br />
            {<br />
                string sPath = TreeView1.SelectedNode.FullPath;<br />
                string sFileName = ListView1.FocusedItem.Text;<br />
<br />
                Process.Start(sPath + "\\" + sFileName);<br />
            }<br />
            catch (Exception Exc) { MessageBox.Show(Exc.ToString()); }    <br />
        }<br />
        private void ProjectWindow_Load(object sender, EventArgs e)<br />
        {<br />
            this.ListView1.ItemActivate += new System.EventHandler this.ListView1_ItemActivate);<br />
        }


But this code gives an error that the sytem cannot find the file when i double click it.
The code is split up in 2 parts...the path & the file. I think it can't find the fullpath of the SelectedNode....but there must be a SelectedNode otherwise i cannot see the file in the ListView??

What am i doing wrong?
GeneralRe: ItemActivate of directory browser Pin
mav.northwind29-Oct-07 19:57
mav.northwind29-Oct-07 19:57 
GeneralRe: ItemActivate of directory browser [modified] Pin
gerbenschmidt29-Oct-07 23:48
gerbenschmidt29-Oct-07 23:48 
QuestionHow to get and set object in collection.... Pin
Sasmi_Office27-Oct-07 3:39
Sasmi_Office27-Oct-07 3:39 
AnswerRe: How to get and set object in collection.... Pin
Luc Pattyn27-Oct-07 4:10
sitebuilderLuc Pattyn27-Oct-07 4:10 
QuestionHow we get real time typing status in C#.NET Pin
D i x y27-Oct-07 2:53
D i x y27-Oct-07 2:53 
AnswerRe: How we get real time typing status in C#.NET Pin
Anthony Mushrow27-Oct-07 3:21
professionalAnthony Mushrow27-Oct-07 3:21 
Questionhow to get HTML data in listview control Pin
D i x y27-Oct-07 2:49
D i x y27-Oct-07 2:49 
AnswerRe: how to get HTML data in listview control Pin
Anthony Mushrow27-Oct-07 3:20
professionalAnthony Mushrow27-Oct-07 3:20 
AnswerRe: filtering result in grid view by changing the item in the dropdown list Pin
Paul Conrad27-Oct-07 11:15
professionalPaul Conrad27-Oct-07 11:15 
QuestionBeginInvoke sloooooow Pin
mav.northwind27-Oct-07 1:39
mav.northwind27-Oct-07 1:39 
AnswerRe: BeginInvoke sloooooow Pin
Luc Pattyn27-Oct-07 13:37
sitebuilderLuc Pattyn27-Oct-07 13:37 
GeneralRe: BeginInvoke sloooooow Pin
mav.northwind27-Oct-07 20:26
mav.northwind27-Oct-07 20:26 
GeneralRe: BeginInvoke sloooooow Pin
Luc Pattyn28-Oct-07 4:33
sitebuilderLuc Pattyn28-Oct-07 4:33 
GeneralRe: BeginInvoke sloooooow Pin
TJoe28-Oct-07 5:01
TJoe28-Oct-07 5:01 
GeneralRe: BeginInvoke sloooooow Pin
Luc Pattyn28-Oct-07 5:22
sitebuilderLuc Pattyn28-Oct-07 5:22 
AnswerRe: BeginInvoke sloooooow Pin
TJoe27-Oct-07 13:41
TJoe27-Oct-07 13:41 
GeneralRe: BeginInvoke sloooooow Pin
mav.northwind27-Oct-07 20:31
mav.northwind27-Oct-07 20:31 

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.