|
Hi,
I have a Peculiar problem in my C# Windows application. The scenario is, we have a windows application running in windows Xp environment, its main operation is copy the Employee word Document file from one employee machine and paste it to the other employee. It’s purely a File copy and Paste operation. To do this we shared One drive in all the employee machine with full access writes to every in the network. So my application go to that particular shared drive copy all document from that location and paste it in to other shared drive. This is working fine in the current environment.
My problem is, now that all shared drives permissions are changed and restricted to Read only permission, every one in the network they only read the file in the network shared drive, they can not paste any file in to that drive. This is to avoid other employee miss use and security purpose. After this implementation my application is not copying the file from that shared drive and pasting. It’s throwing the error unauthorized access or don’t have a permission to access folder.
My question is how to give permission to the application to access that folders and copy to other network shared drive even if the application runs in windows user login mode. This application runs in entire employee machine. Once they login to the system it starts running. Please suggest me the best way to over come this issue
Thanks in advance.
By,
Rajasekarn Shan
|
|
|
|
|
You should probably use TCP/IP sockets to send the file across. When a file needs to be copied you can establish a connection with the particular machine and send the file, the receiving machine can save the file into a configured folder.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
Hi tarakeshwar,
can you provide me a little more about TCP/IP? some examples if possible.
By,
Rajasekaran.S
Rajasekarn Shan
|
|
|
|
|
|
Hi there,
I am currently creating a web application in c# 2005, on my search form i would like to display an animated gif image while busy doing the search in the sql database.
As soon as the user clicks the search button i want the image to become visible and then as soon as the gridview got binded with the results, i want the image to be invisible again.
Now the problem is that the image does not become visible at all
mmmm i dunno where to start finding the problem cause it does run the code but does not actually do it lol.
I am thinking i should probably use like "sleep" or threads but thats some weird stuff for me as i am still beginner. Is there any other solution to this problem?
Thanks in advance
Regards
|
|
|
|
|
Hello,
I think the problem is that you are running the control with the gif in the same threat (which is busy) where you are doing the search.
You could do a control.Refresh();, after you set Visible=true.
But it would only show the not- or rarely moving gif I think.
All the best,
Martin
|
|
|
|
|
Hi All,
I am using VS.NET 2005 and using C#.net.
I want to develop a functionality as follows.
when I run my application , it should create a Icon in system tray. When I close the application it's instance should be running in the background and Icon should be displayed in the system tray. Again when i click on my applications shortCut Icon on desktop , not the icon from system tray, it should bring forward the already running instance of my application in the background.
thnx in advance
Praveen
|
|
|
|
|
Have a look at this article[^]
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
|
Hello everyone,
How can I find if two controls intersect or not ?
Best regards...
.:: Something is Wrong ::.
|
|
|
|
|
if (control1.Bounds.IntersectsWith(control2.Bounds))
...
That should do it.
|
|
|
|
|
Hi =),
I have class that works with a Generic.Dictionary and now i want to access the elements by an index.
Is there a way i can do this ? ...or are there other classes where i can access the elements by an
index and provides the same functionality like the Generic.Dictionary?
I already found the Generic.SortedList, but there my listing will be sorted and i dont need/want that =/
|
|
|
|
|
Hello,
If you don't need the access per key functionality at, you should use an ArrayList. (System.Collections)
All the best,
Martin
|
|
|
|
|
Hi Martin, thx for the quick answer, but the ArrayList is useless for me cause i need the generic-properties.
I have a Generic.Dictionary that looks like this...
Dictionary<Guid, TcpClient> tcpConnections = new Dictionary<Guid, TcpClient>();
... and in some cases i want to access an element of the listing without to know the Guid, like this...
tcpConnections.Values[2]
... but unfortunatly this dont work
|
|
|
|
|
Ok,
And if you make a second Dictonary with 1, 2, 3, ... as key and access it like this.
tcpConnection2[1]
Hope it's not complietly stupid, but I have only .NET1.1 and never worked with Dictonary class before.
All the best,
Martin
|
|
|
|
|
I'ts not completely stupid, all youve done is make a second index for the list. Ive accomplished many tasks in this way.
Another way is with a collection that supports both key or index lookup - there used to be one in .NET 1.1 in the System.Collections.Specialized namespace. Im sure there will be a generic version in .NET 2
|
|
|
|
|
Hello,
Thanks for the info.
I think System.Collections.Specialized.NameValueCollection would be the .Net1.1 non generic version.
All the best,
Martin
|
|
|
|
|
The class System.Collections.ObjectModel.KeyedCollection provides the functionality you are looking for. However, you have to derive your own collection class from it, as you must override the GetKeyForItem member. Maybe it is suited for your application.
Regards,
Tim
|
|
|
|
|
yea your right , thx Tim
|
|
|
|
|
|
Martin
I believe that the reference should look like this:
[DllImport("user32.dll")]
public static extern int GetKeyboardLayoutList(int nBuff, ref int lpList);
Then, in your code, you would work with it like this:
int[] layouts = new int[1];
int length = GetKeyboardLayoutList(0, ref layouts[0]);
layouts = new int[length];
GetKeyboardLayoutList(layouts.Length, ref layouts[0]);
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello Pete,
It works!!!!
Thanks a lot.
Actually I made the mistake to define it as an array.
like this:
[DllImport("user32.dll")]
public static extern int GetKeyboardLayoutList(int nBuff, ref int[] lpList);
int[] layouts = new int[1];
int length = GetKeyboardLayoutList(0, ref layouts);
layouts = new int[length];
GetKeyboardLayoutList(layouts.Length, ref layouts);
This was strange because the first call of GetKeyboardLayoutList returned the write value (Lenght of 3).
But the second call, brought back a lenght of 1 with a value 0.
But with your help everything is fine now. (And it was not the first time of corse!)
So thank you very much again.
All the best,
Martin
|
|
|
|
|
When you create .NET UI objects on the fly, how do you handle the events that come to them?
Lets say that in code, I create any number of new buttons and put them on my form. How do I code a handler for the click event on those buttons? I won't know their names until they exist (Button1, Button2, Button3, etc), and I can't just have a huge list of
private void Button1(), private void button()
handlers sitting around in my code.
So, how do I code a handler for Button[x]? I'm sure there is something basic I'm missing here.
Thanks,
Joe
PS. I posted a much more specific version of this question in the .NET framework forum, before I realized that I had a much more general lack of understanding here.
|
|
|
|
|
In continuation with my answer in the .Net Framework forum
You could create a single event
Private void Button_Click(object sender, System.EventArgs e)
For each of the buttons you can assign the event handler as
Button1.Click += new System.EventHandler(Button_Click);<br />
Button2.Click += new System.EventHandler(Button_Click);<br />
Button3.Click += new System.EventHandler(Button_Click);<br />
.<br />
.<br />
ButtonN.Click += new System.EventHandler(Button_Click);
Based on the sender you can define what needs to be executed inside the Button_Click Event
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
|
|
|
|
|
Please see the following link:-
http://www.codeproject.com/useritems/DynamicServerControls.asp
It will help you.
Amit
|
|
|
|