Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 5th, 2005, 9:10 AM   #11
ivan
Professional Programmer
 
ivan's Avatar
 
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 482
Rep Power: 3 ivan is on a distinguished road
Two years before, I was making in VB a similar thing. I used a special control, named something like Web Control. It displays all icons automatically and also has some useful functions bulit with it( Like back, forward, up... ).
I think that you can find it in VB.net also.
ivan is offline   Reply With Quote
Old Oct 5th, 2005, 3:17 PM   #12
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
The main reason for making this file explorer is so I can debug all problems in it. Like Microsofts File Explorer a common bug keeps coming up in directorys with a large amount of files, says something like "Cannot read from blah.." and explorer crashes. I searched the internet for a similar program like that, that I could use as a replacement and I could not find one. So, to make it possible to view those directorys, I will just make my own version of mircrosofts file explorer, that essentialy does the same thing.

Exploeres dont really use there own set of icons, for the file types atleast. The associated file type icons are global, the program sets it when its installed. The only ones that are default are hte default system icons. So really its not me how needs to make my own, except maybe for the back, refresh, forward, etc buttons on the toolbar.

I dont think there is any icon thing built into .NET atleast not one that gets the icon for the associated file type. Ive searched google through and through and finally came up with one result for .NET that does what im trying, it was the only useful result I found after looking through hundreds of web pages. It does basicaly what you were saying to do Rory. I cant get it to work though.

http://www.codeguru.com/vb/gen/vb_mi...cle.php/c5597/

That is what I found, it doesnt work because I keep getting on this line:

myIcon = System.Drawing.Icon.FromHandle(shinfo.hIcon)

That it gives me an error saying its not valid, in the variable view hIcon is equal to 0 so theres a problem somewhere, I worked with this for 2 hours so far changing it around, and I cannot figure out what is wrong. I dont really even understand how the code is working or running either... its hard to follow with the shinfo because its not plainly defined as other variables are.

EDIT

Actually now trying it exactly as its done on the site, it works, it was the way I modified it in my for each loop that was causing the problem. For some reason it doesnt want to work like im thinking it should. I will try a few things diffrent and do tests on the working and not working one and try to find out whats wrong.
brokenhope is offline   Reply With Quote
Old Oct 5th, 2005, 3:26 PM   #13
ivan
Professional Programmer
 
ivan's Avatar
 
Join Date: Sep 2005
Location: serbia & montenegro
Posts: 482
Rep Power: 3 ivan is on a distinguished road
Quote:
Originally Posted by brokenhope
I searched the internet for a similar program like that, that I could use as a replacement and I could not find one. .
You could get Total Commander for that...
ivan is offline   Reply With Quote
Old Oct 5th, 2005, 3:43 PM   #14
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Yea I did download a few things that were "replacements for windows file explorer" they arent similar enough to it though. I like windows explorer the way it is, just it crashes to often, I want to create the most similar thing possible or use the most simalar thing to it, that just has the bugs that cause it to crash fixed, and maybe a few added features, and some I left out.
brokenhope is offline   Reply With Quote
Old Oct 5th, 2005, 8:21 PM   #15
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Gah, I just found out every file browser I have crashes at the same directory. I think I figured out why, when I tried it with my program in run time, I went to the directory and the program exited saying the error was:

"An unhandled exception of type 'System.NullReferenceException' occurred in mscorlib.dll

Additional information: [Resource lookup failed - infinite recursion detected. Resource name: Arg_NullReferenceException]"

And it crashed on this line:

listview.Items.Add(ioFileInfo.ToString)

So maybe the file name it got stuck on is to long or something, I dont know, I just know its not a bug in any of the apps, its the file thats causing the problem, gotta hate download files off limewire when theres idiots who name them with names that are so god damn long XD.

I dont think I know enough at this time to even make the file explorer, I mean I know nothing about how to make the design look decent which is a must for me, I know only how to use the basic tools, nothing like im seeing used a lot like panes, I dont know anything about how to use graphics, and the types that exist... so I think I will just work my way up to this, and do other things.
brokenhope is offline   Reply With Quote
Old Oct 6th, 2005, 2:35 PM   #16
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Thats why the windows filesystem code should be abstracted from the GUI (explorer.exe) in my opinion. As it stands, ntfs is an ancient bloaty b*stard laden down with unecessary crap and metadata hacks, like drm and reparse points, when all that should be either implemented at the kernel or the file manager level and when something goes wrong it screws over all programs that use the windows API. What ever happened to that database filesystem we were promised for Longhorn?

Just out of interest, try seeing what Knoppix makes of the problem directory.
Rory is offline   Reply With Quote
Old Oct 6th, 2005, 3:35 PM   #17
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Knoppix? Isnt that linux on a cd or something?
brokenhope is offline   Reply With Quote
Old Oct 6th, 2005, 5:29 PM   #18
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Quote:
Originally Posted by brokenhope
Knoppix? Isnt that linux on a cd or something?
You betcha! Actually its very useful for general system admin and recovery, and specifically is six months ahead of the kernel modules in terms of libntfs (you can now write up to 9 files at a time!) so it may read things windows won't, or at least give a more descriptive error message.
Rory is offline   Reply With Quote
Old Oct 6th, 2005, 8:47 PM   #19
brokenhope
Hobbyist Programmer
 
Join Date: Apr 2005
Posts: 126
Rep Power: 4 brokenhope is on a distinguished road
Hmm cool, I already have linux installed on this computer, but would that let me access the windows drive? Fedora core doesnt...
brokenhope is offline   Reply With Quote
Old Oct 7th, 2005, 5:46 PM   #20
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Quote:
Originally Posted by brokenhope
Hmm cool, I already have linux installed on this computer, but would that let me access the windows drive? Fedora core doesnt...
libntfs means ntfs file system access
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:16 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC