|
Hi everyone!
is that possible to edit labels of every column header of listView (if it is showing details view). Normally if we add a subitem to rows we cannot edit it.
What can we use similar to listView (Detail View) to edit every column in list.
Thanks.
|
|
|
|
|
Search the property Text of ColumnHeader object.
Example:
ListView1.Columns[0].Text = "My Favorite Column";
|
|
|
|
|
Hello all...
I looked around the forum for a solution, or a good heads up on my problem. Either blind,
or there really isn't an answer posted. So here's my situation.
I need to search through folders for files with a certain file extention [*.mp3]
And display the path to those files in a treeview.
So if a folder has MP3 files, it should display the folder name in the treeview, if not don't add to treeview.
If a folder does not contain MP3s, but its sub-folder(s) do, add folder name + subs to the treeview.
And so on and so forth...
[hmmm hope I'm making myself clear... ]
In the end, I should end-up with a treeview with folders containing mp3 files and folders whos
sub-folders contain mp3 files. In a "Window-Explorer-ish" style.
Then, in the end, when clicking on the node it lists the files in a listview...
Got the searching for MP3 files done, and displaying the contained files in the listview also done.
The trouble right now, is it's adding all folders and subs..even the ones not containing MP3s.
Any ideas anyone ?
Thanks...
LoneFerret
ps: If it helps, I can always paste the code I got so far... but it ain't pretty...
____________________________________________
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
If your search algorithm returns the fully qualified path to the MP3 file, you can use Path.GetDirectoryName(string) to return the directory information for the file. From that you can build your tree structure. You might need to split the string on the "\" character depending on how you want the tree to look.
If the search doesn't already return the fully qualified path, you may need to use Path.GetFullPath(string) , which will return the fully qualified path based on the current directory.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Thanks for the reply...
Been trying for the last few hours to only have the folder(s)(with their respective subs if any)
still with no success.
I understand your reasonning, for some reason I just get put it into practice...
Thanks again..
Loneferret
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
What are the problems you are running into? Can you post (or email) the code you have so far, particularly the code you are using to get the list of files?
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi...
I want to create a Log file in my application. I want to use this log file to put the text received & transmitted on my PC serial port throgh my C# application. I am receiving large text on my PC serial port. Is there is any special class to create a log file in C#. I dont want my text file every time to open & close to write text in that file since i have to put data in that text file on every receive data event of my serial comport.
How i can do this...?
Thanks ,
Vinay
|
|
|
|
|
|
Hi everyone
When we open an XML file in internet explorer we get text view of XML document. I want to display this un-editable text view into my form window. please guide me how can i do that?
richTextBox should be used for this purpose?
Thanks.
|
|
|
|
|
Well, I guess you could alway put a Web Browser control in your form
that opens the XML file you need displaying.
I think that would work...
Or you could always load it up in a treeview.
That's about all the ideas I have at the moment, only on my fifth coffee,
brain is still slow...
LoneFerret
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
Thank you dear LoneFerret
I think your brain is quite fast as compare to mine
actually i am new to C# using VS.Net 2003. I want to embed Web Browser Control but don't know how. Please tell me how i can do that.
Thanksssss.
|
|
|
|
|
Drop it on the form from the toolbox.
|
|
|
|
|
I have added Web Control from components but it is in disabled form.
|
|
|
|
|
As edboe elegantly put it [no offence], that's how you do it.
The same way you would add a button, listview, or anything else from the tool box.
Once you've added the control, you better read-up on the documentation on how to use it.
It's a pretty straight foward control.
Have fun...
LoneFerret
______________________________________
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
Web Control in toolbox is not in enabled form
|
|
|
|
|
Hi everybody,
I am stucked with a small problem. Please help me.
I want to know that original path of the directory mapped to my system.
Let me explain you more clearly
Imaging "worker" folder on System1 is mapped to System2 as "N" drive and from System2 user can see the folder as N:\\worker. I want to know the original path of worker folder on system1 like if worker folder is in C drive then "C:\\worker"
Let me know if you want some more info.
Thanks,
Azghar
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
From System2, there is no way to determine what that path is.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You can determine it from System1, eg. "net share", so you might also be able to somehow do it from System2 with WMI, but I'll leave the details of that to you.
|
|
|
|
|
! You're right! So long as the user that's running the code has the appropriate permissions on the server machine, the code can use WMI to enumerate the Shares on the server.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Can you show may sample program of WMI....
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Hi all,
i have the following problem...
i want to send a html document directly to the printer and it should print without user input. I can send it to the printer with this...
Process myProcess = new Process();<br />
myProcess.StartInfo.FileName = "C:\\TestPage.HTML";<br />
myProcess.StartInfo.Verb = "Print";<br />
myProcess.StartInfo.CreateNoWindow = true;<br />
myProcess.Start();
BUT this opens a window with the printers found and waits for user to select the correct printer. I have saved the preferred printer name that the user selected in our database and i want to use that printer. Would any one please give me nudge in the right direction.
Thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Try changing the verb to "printto" instead. Then set the Arguments property like this:
Process myProcess = new Process();
myProcess.StartInfo.FileName = "C:\\TestPage.HTML";
myProcess.StartInfo.Verb = "printto";
myProcess.StartInfo.Arguments = "printer name";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
I haven't tested this, so it'll probably take some tweaking to get it right.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks, i'll give it a try.
Thank you for your time.
Enjoy the rest of your day.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
i've tried it but without much success. i've played around with it but no luck yet. Is the name for the printer i have saved correct? "HP-Color Inkjet CP1700" this is the printer i saved but is this the name format i need? or do i need some sort of printer id? also, i tried to print a word document in this manner but this failed as well. "Run-Time error: '1120' There is a printer error" That is why i asked if there is a problem with the name as i have it saved... i have the printer name saved.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi, I m creating an application in C#, its a windows application. In this application i have one webform which i want to create as a pop up for windows.
Like this window will be pop up after few minutes lets say 2 minutes.
I want to make this popup, suppose if i m busy with other works it will show the popup after given time at my desktop.
Can any body help me with this..
If you people doesnt understand my question plss free to ask me...caus its really very urgent..
PLSS GUYS/GALS HELP ME..
|
|
|
|