|
I dont think so...
Luc Pattyn
|
|
|
|
|
The File System is responsible to protect files and folders. The access limitation is defined by account (Windows' users and groups) and permissions (read, write, delete, etc.). You cannot set access permission by application.
Not every file system supports file access protection. NTFS supports, FAT doesn't.
Ami
|
|
|
|
|
For example isn't it possible to set a registry value when you start your app and reset the value when you exit ? And if that registry value is empty the folder may not open ?
I am searching for a couple of hours but found nothing ..
Should I use the WinAPI ? Or the namespace extension, shell etc. ?
There must be something, and I am ready to spend my weeks on this topic...
.:: Something is Wrong ::.
|
|
|
|
|
pashje wrote: isn't it possible to set a registry value when you start your app and reset the value when you exit ? And if that registry value is empty the folder may not open ?
No, it's not. If your in Explorer or some other app, what's going to check that registry setting to see if it's OK to open the file??? Nothing!! You'd have to write an NTFS extension to implement this kind of functionality, and even then, it's easily defeated because it won't work on a FAT32 volume.
pashje wrote: I am searching for a couple of hours but found nothing
And you never will find anything, because it's not possible. Well, not without LOTS of extra work.
pashje wrote: There must be something, and I am ready to spend my weeks on this topic...
Quite wasting your time. This functionality won't exist unless you write an NTFS extension to do it. And even then, it won't work over networked folders.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Create a special user account and restrict access to the file and directories. Then, in your application, you can impersonate. It really won't stop anything but then again, any user with physical access can do anything they want anyway.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
I show images on form, i wanna show image with "Windows Image Fax Viewer" when user clicks on any image.
How could i do ?
|
|
|
|
|
you could try something like this:
void OpenImageViewer(string f) {
Process proc=new Process();
proc.StartInfo.FileName=@"C:\WINDOWS\system32\rundll32.exe";
proc.StartInfo.Arguments=@"C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen "+f;
proc.StartInfo.UseShellExecute=true;
proc.Start();
}
Luc Pattyn
|
|
|
|
|
On the other hand, if you just want to open a file with its default tool (as if
you double-clicked it in Windows Explorer), you would need:
void OpenDefaultTool(string f) {
Process proc=new Process();
proc.StartInfo.FileName=f;
proc.StartInfo.Arguments=null;
proc.StartInfo.UseShellExecute=true;
proc.Start();
}
Luc Pattyn
|
|
|
|
|
Before you ask, you will have to include a "#using System.Diagnostics" in the
first part of your file, next to other using statements.
Luc Pattyn
|
|
|
|
|
Hi All
I want to display a line graph in a Panel or should I be using a picturebox or textbox. I have code that will a;;ow me to do all the calculations etc.
Where I am stuck is putting it all together, do I need to create an image of the graph and return this from a method or seperate class and using the this command add it to a panel etc.
Any help vastly appreciated!
James
|
|
|
|
|
You can draw the graph yourself in a panel.
Attach a paint handler to its Paint event; inside the handler get its Graphics, and do the
Graphics.DrawLine() and other calls as you see fit.
Luc Pattyn
|
|
|
|
|
Okay, so I have written my own class library... And have documented it with the inline xml thingy... So... now what?
How do I distribute them to others?
What files do I have to include so that IntelliSense works okay? (Do I have to include the XML file?)
Where do I have to copy those files so VS recognizes them?
Regards,
Vandra Akos
|
|
|
|
|
Distribution:
distribute your xml and dll files together (in the same directory), as Visual does.
Usage:
- add a reference to the dll(s) you need, e.g. using the Solutions pane in Visual Studio
- add a using statement to your client source code
Now the classes in your new dll(s) are available together with their XML comment (for
Intellisense).
Luc Pattyn
|
|
|
|
|
I believe the XML files you are refering to are the XML documentation files which are turned off by default in the project. Building the dll, however, should include the XML comments as they are part of the assemblies meta data.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
I was under the impression axos88 already got his XML file, but didnt quite know
what to do with it...
Luc Pattyn
|
|
|
|
|
I saw a few imaging programs, that use local database for storing data about images and thus provide extremely fast image search (wihtout accessing files).
I want to implement this: database for faster file search in my C# app, but any SQL tutorial begins with installation of some server tools. However, end user does not have these tools. I also cannot force him to install MS SQL Server, because he may not use Windows (my app should work on other platforms).
So I'm confused. Is is possible to use databases as well (in app release, that does not contain huge server tools) or it is better to use some alternative (e.g. store all the data in single XML file)?
Thanks a lot,
Libor Tinka
|
|
|
|
|
Libor Tinka wrote: Is is possible to use databases as well (in app release, that does not contain huge server tools)
SQLite[^] is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
|
|
|
|
|
Good alternative to real database servers is so called "embedded databases"
|
|
|
|
|
Libor Tinka wrote: he may not use Windows (my app should work on other platforms)
Are you planning on having your app work with Mono?
|
|
|
|
|
i tried this
Graphics g;
g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
g.DrawImage(System.Drawing.Imaging.Metafile.FromFile("logo.wmf"), new Rectangle(0,0,200,200));
but have no effect any idea how to draw wmf antialiased
Thanks
It is Good to be Important but!
it is more Important to be Good
[My Question]
|
|
|
|
|
Try setting the InterpolationMode property of the Graphics object to HighQualityBicubic (will give best results, though is the slowest method):
Graphics g;
g = e.Graphics;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(System.Drawing.Imaging.Metafile.FromFile("logo.wmf"), new Rectangle(0,0,200,200));
Instead of HighQualityBicubic , you can also use a different mode, for example Bilinear , if speed is necessary.
|
|
|
|
|
actually problem is it is not smoothing at all
i called it on
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
and also tried on
private void frmWelcome_Paint(object sender, PaintEventArgs e)
but nothing works
It is Good to be Important but!
it is more Important to be Good
[My Question]
|
|
|
|
|
Can anyone tell me how to unzip the files using C# application.
That would be great if anyone provide a solution for my problem.
Thanks,vin1070
|
|
|
|
|
Have a look at this free C# Zip/Unzip library:
#ziplib[^]
|
|
|
|
|