8 Replies - 6782 Views - Last Post: 08 January 2011 - 09:51 AM Rate Topic: -----

#1 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

How to make your own extension ?

Posted 08 January 2011 - 05:34 AM

Hi im stuck im making a app that can hold tasks but i want to make my own extension


Can you suggest me a good Tutorial or something



Thanks


Arno(Cornetto456)
Is This A Good Question/Topic? 0
  • +

Replies To: How to make your own extension ?

#2 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: How to make your own extension ?

Posted 08 January 2011 - 06:41 AM

Well, firstly, you'll need to decide how you're going to format your data. I personally prefer using XML to store my data for applications, or if the data needs to be protected, encrypted XML. When my app starts, I read the XML from the config file/the file which is being opened. If you want to make your own extension, choose your extension (say .tmgr or whatever), and save the data which you want to save in whatever format you want to save it (I reccoment XML), and then save the file as "Whatever.tmgr".

We now however have two obstacles:
1: We need to make windows open the ".tmgr" file with your program. This can be done using this example on CodeProject.
2: When your application is started by windows explorer, when a user opens your format, we need your program to pick up what command lines it has been launched with. There is a very good tutorial on that here.

After you have got the parameters which the program is being opened with (and thus the file which the user is trying to open), you need to read the XML. There's a good tutorial on that here.

This post has been edited by Jack Eagles1: 08 January 2011 - 06:43 AM

Was This Post Helpful? 1
  • +
  • -

#3 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

Re: How to make your own extension ?

Posted 08 January 2011 - 08:37 AM

thx for your post but i dont want to let it open automaticly its more a backup of my Databasse that save like a .mind file


So i thougt just to save it as .mind but now im stuck can i do some function like
Dim file As String = "C:\DB\Backup\File.mind"
Database1.Copy to file


Is that good or must it be somthing difrent ???
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,136
  • Joined: 02-July 08

Re: How to make your own extension ?

Posted 08 January 2011 - 08:57 AM

No matter what format the file really is if you save the file with a diff extension Windows will just be confused as what program should open it, but if your program opens it internally then there is no problems with a custom extension. Mind you if someone figures out what kind of file(xml, txt, etc...) they can force Windows to open it with that program - hense the reason we encrypt data. My tutorial for encrypting xml.
Was This Post Helpful? 0
  • +
  • -

#5 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

Re: How to make your own extension ?

Posted 08 January 2011 - 09:09 AM

Srry but thanks for your help but i dont want to save it as a .xml file i like your idea but i think its really the best that i have the .mind file because i will only use it if i lost my Database and its acopy of it and it can only be opend with my .mind openenr any idea's for that or tutorial Thanks

Arno(Cornetto456)
Was This Post Helpful? 0
  • +
  • -

#6 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,136
  • Joined: 02-July 08

Re: How to make your own extension ?

Posted 08 January 2011 - 09:16 AM

That's fine, did you read the rest of the post? Have you tried to simply copy the file with a diff extension, then re-open it?
Was This Post Helpful? 0
  • +
  • -

#7 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

Re: How to make your own extension ?

Posted 08 January 2011 - 09:19 AM

So i must use your tut for encription but only a diffrent extension ???


and can you say a good tut for creating custom extensions ???
Was This Post Helpful? 0
  • +
  • -

#8 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,136
  • Joined: 02-July 08

Re: How to make your own extension ?

Posted 08 January 2011 - 09:49 AM

No you don't have to use my tut. It was example. The point I was trying to make is copy your file with a diff extension then open it and see if it opens ok.
Was This Post Helpful? 0
  • +
  • -

#9 cornetto456  Icon User is offline

  • D.I.C Regular

Reputation: 21
  • View blog
  • Posts: 438
  • Joined: 03-January 11

Re: How to make your own extension ?

Posted 08 January 2011 - 09:51 AM

oke i will try


Thanks

Arno(cornetto456)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1