showing icon with file name

Here you can talk about C++ And C# And Other languages programming.

showing icon with file name

Postby nooob » Sun Feb 04, 2007 6:26 am


hi all

i have made a simple word processing program.
1) i want to show the icon that appears on the main gui with the file name that is written with my word processing program

2)how can i open a file that is written in my program when someone double-clicks it?

plz help me if you have an idea of how to do those two
ty alot

nooob
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby Ghost » Sun Feb 04, 2007 11:57 am

Well, either way, water still can't make holes in rocks.
Ghost
 

Postby nooob » Sun Feb 04, 2007 12:29 pm

not the same discussion again :lol:
Last edited by nooob on Sun Feb 04, 2007 12:30 pm, edited 1 time in total.
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby ThE DJ GaNgStER » Sun Feb 04, 2007 12:51 pm

Ghost wrote:Well, either way, water still can't make holes in rocks.
ThE DJ GaNgStER
BANNED
BANNED
 
Posts: 380
Joined: Mon Dec 27, 2004 11:34 pm

Postby nooob » Sun Feb 04, 2007 1:39 pm

nooob wrote:not the same discussion again :lol:
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby ThE DJ GaNgStER » Sun Feb 04, 2007 5:47 pm

lol nooob
ThE DJ GaNgStER
BANNED
BANNED
 
Posts: 380
Joined: Mon Dec 27, 2004 11:34 pm

Postby BattleStar-Galactica » Sun Feb 04, 2007 5:50 pm

I dont get what you want to do, I have to take a English class this autumn :lol:

if you want extract icon from a file then there are many source with google and with your registry you can specify what type of file can be open with what programm

example .battlestart when you click on file.battestar is alway open with my app :lol:
Last edited by BattleStar-Galactica on Sun Feb 04, 2007 5:51 pm, edited 1 time in total.
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby nooob » Tue Feb 06, 2007 5:36 am

well the story goes like this:
i have made a simple word processer program that saves files with a specific file extension, so i wanted to be able to show an icon (icon of the main gui) next to the file (like e.g. word etc). i also wanted to open any of of these files when someone double clicks it :D

seems like i m not far from getting them (but i m still not able to open a file when its double clicked tho*)....here is a link if someone else wants to learn it:
[url]
http://www.csharpcorner.com/UploadFile/ ... eType.aspx
[/url]


its always good to take english classes :D
thx anyway

nooob - getting better - water pressure is increasing
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby BattleStar-Galactica » Tue Feb 06, 2007 9:00 am

Did you read about File type association? with c# is very easy to deal with registry :wink:
Last edited by BattleStar-Galactica on Tue Feb 06, 2007 9:00 am, edited 1 time in total.
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby nooob » Tue Feb 06, 2007 10:31 am

nop dude ...i have not
i have been trying to find something....but not quite

can u give me whatever site u may have about file type association with c#?

thx BattleStar

nooob
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby BattleStar-Galactica » Tue Feb 06, 2007 10:35 am

poor you :lol: Ok wait... 2 minutes, I will write it for you, come back in 2 minutes and see :wink:


ok it's done, just download it and run it one time and go to debug folder click on file test.battlestar to see the result
Attachments
testFileTypeAssociation.zip
(33.99 KiB) Downloaded 52 times
Last edited by BattleStar-Galactica on Tue Feb 06, 2007 10:48 am, edited 1 time in total.
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby nooob » Wed Feb 07, 2007 6:35 am

Hello world
I'm learning file type association:)


i am also learning file type association :P

thx alooooooooooooooot BattleStar
ty again
got it

noob
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby BattleStar-Galactica » Wed Feb 07, 2007 7:32 am

if you want file.battlestar has explorer icon change this line

szKeyValue = szPath + ",0";

to


szKeyValue = "C:\\Program Files\\Internet Explorer\\iexplore.exe,0";


all file.battlestar will have internet explorer icon, I dont know why it didn't associate with my app test icon

for your information if I know many sites?, I just use three webs site for my programming reference the one you posted and codeproject.com and codeguru.com
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Postby nooob » Wed Feb 07, 2007 8:32 am

thx alot battlestar

if you go to the site that i have posted, in that example the guy does file type association by creating a c# setup project and then he sets up file extention, program and so on. then in the Form_Load event he checking if a file was double clicked...i tired that but didnt work.

he also has a method (as you have for file type association) but he is not using it i think...!!!

which method is better, yours or the one in that example?
is it possible for you to show me file type association by creating a setup project...like in the example?

i have attached the example...it didnt complie though

noob
Attachments
CustomFileType.zip
(46.16 KiB) Downloaded 43 times
Water can make holes in rocks!
nooob
imFiles Junior
imFiles Junior
 
Posts: 52
Joined: Sun Jul 23, 2006 10:23 am

Postby BattleStar-Galactica » Wed Feb 07, 2007 9:08 am

normally I prefer to do the thing programmatically and dont like to use GUI setting, you can ask the author of that article if you cannot figure it out how to do that.

I dont read his article, just look quickly the pic :lol: I prefer to use my method. simple and quick, just a few line to deal with the registry
Last edited by BattleStar-Galactica on Wed Feb 07, 2007 9:38 am, edited 2 times in total.
Big math problem
2 - 1 = 0 = without you I'm nothing
User avatar
BattleStar-Galactica
imFiles Master
imFiles Master
 
Posts: 565
Joined: Tue Sep 20, 2005 12:19 am
Location: safest place to hide

Next

Return to C++, C# And Others Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests