|
You should contact the company directly and se if they have an API. If they don't, you may have to use amy built in export/import functions to make the data .net accessible.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I wont how to use OCR techniques to read images and extract text from it but with my own characters and symbols ,that mean it will identify my symbols to that image and extract it ?
(like fine reader program it recognize english and some languages but i wont to make prog to recognize symbols and characters of my own and i will create ??
|
|
|
|
|
|
I want to write a program in C#.
This program prevents specified files from being deleted.
Anyone can offer some ideas?If you'd like to provide part of code,it's better.
Thank you very much!!
|
|
|
|
|
If your program holds on to the file by having it open then the file cannot be deleted.
|
|
|
|
|
It also may prevent any/all access to that file.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Even less chance of the file being damaged then.
|
|
|
|
|
This doesn't sound like a very nice program. The files on a computer are the user's files and they should be able to delete them if they wish so long as they have the necessary credentials. Most of us have had to deal with 'undeletable' virus and/or spyware & adware files at one time or another and they are a PITA. I can't imagine why you'd want to add this 'feature'.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I'm sorry,I'm sure that you(DaveyM69) misunderstand my idea!
I have some very important files.Certainly,I don't hope that other people delete them by mistake.
However,thank you all the same for reply!
|
|
|
|
|
Google "C# file permissions" for lots of ideas and code samples.
Also, for .NET 2.0+, see the FileSecurity Class[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
A lot of hostile answers, as it is not the 'polite' thing to do. Users want to control their computer, and they tend to get upset if the computer dictates what they should do.
The nice way of protecting users against accidental deleting would be called a backup-technique. You simply make a copy of the file when the user marks it as 'important'. If someone deletes it, you can always restore the file from your backup.
Good luck
|
|
|
|
|
|
That's not gping to work since the FSW only reports things that have already happened and will only work so long as the app is running.
|
|
|
|
|
That's up to the users to determine, not you or your code. You really can't do what you want unless the user creates a special user account your app has to use that modifies permissions on the files. That way, the permissions get copied with the files if moved to other NTFS volumes and are also backed up during a tape back up. This special account requires its own user name and password that your code would have to manage and generally makes your app more difficult to support in the long run. Not worth the effort...
|
|
|
|
|
hi
am working on hiding data in microsoft word document 2003 .i want hiding data in unused block in doc. file format , so i must finding the offset of BAT ( block allocation Table) the main table for space , i need more information on BAT of doc. file format 2003 (OLE files),details of how i loading the unused Block .......
i wish some one can help me
Thanx
Amani
|
|
|
|
|
Look, it's extrememly unlikely you're ever going to get an answer to this question, no matter how many times you ask it, simply because of the obscurity of the information you're looking for. There are very few people on the planet that have ever messed around with the old OLE file format of Word.
If you want the file format, you can look at this[^].
|
|
|
|
|
Hi,
When should i use this:
protected virtual void OnEvent_PageMenu_Info(string msg)
{
if (Event_PageMenu_Info != null)
{ Event_PageMenu_Info(msg); }
}
and this:
Event_PageMenu_Info(msg);
Sometimes i use one or the other but dont know why
Thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Assuming Event_PageMenu_Info is an event....
What happens if you raise the event before checking for null and
there's nobody subscribed to the event? NULL reference exception
If you've implemented a OnEvent_PageMenu_Info(), then that should be used
to raise te event.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
He could add a do-nothing event handler inside the class that throws the event so that the invocation list is never empty.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I found a neat trick recently - can't remember where.
You can add a dummy handler when declaring the event:
public event EventHandler<...EventArgs> MyEvent = delegate { };
Then the event is never null .
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
ooooohhhhhh - good tip. That deserves a 5.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Excellent - nice tip Nick - 5'd
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Yeah, as Mark said.
Plus wrapping it in a method allows derived classes to raise the event as well.
|
|
|
|
|
Everything the others have said. Also, Microsoft recommend (and use themselves) a copy to handle the possibility of the event becoming null after the null check but before it's raised. This is the way I implement something like this:
using System;
public class MyPage
{
public event EventHandler<PageMenuInfoChangedEventArgs> PageMenuInfoChanged;
private object _PageMenuInfo;
public object PageMenuInfo
{
get { return _PageMenuInfo; }
set
{
if (_PageMenuInfo != value)
{
_PageMenuInfo = value;
OnPageMenuInfoChanged(new PageMenuInfoChangedEventArgs("Changed!"));
}
}
}
protected virtual void OnPageMenuInfoChanged(PageMenuInfoChangedEventArgs e)
{
EventHandler<PageMenuInfoChangedEventArgs> eh = PageMenuInfoChanged;
if (eh != null)
eh(this, e);
}
}
public class PageMenuInfoChangedEventArgs : EventArgs
{
public PageMenuInfoChangedEventArgs(string message)
{
_Message = message;
}
private string _Message;
public string Message
{
get { return _Message; }
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thanks everone for the posts
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|