|
Which is my problem, this class will be instatiated by a Classic ASP Website (Sage CRM) which i cannot control so i cannot modify it to wire to the AssemblyResolve event ...
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
Hi,
I am developing an internet cafe software using C# and I want to know how can I Lock the PC from the server or based on a time.. but basically I want the whole screen to be covered by a form and user can't do anything in the PC unless the form is gone by whatever way I define.
Thanks,
Jassim
|
|
|
|
|
Blocking someone from the server is fine. Preventing me from using my PC would only get you an a$$ beating, or at least a lawsuit You may want to rethink that strategy.
Everything makes sense in someone's mind
|
|
|
|
|
The easiest way is to create a service on the administrator account that monitors the process and then if a user ever forcefully closes your form the service will reopen it. However, be warned, Boy's in public libraries will bypass it.
|
|
|
|
|
Look into using thin/zero clients rather than full PCs.
|
|
|
|
|
Pls i want to create a COM object, that has Protected methods.
pls how do i achieve this.
Thanks.
|
|
|
|
|
What do you mean by protected methods? Try and explain what problem you are trying to solve and perhaps someone can make a suggestion to help you.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
what i mean is that my COM object only has methods with qualifyers:
protected overrides viod some_method().
|
|
|
|
|
Sorry but I still don't understand what you are trying to do. COM objects are not the same as C# or C++ classes so you should not need to use qualifiers in this way.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
hi all
i use a visual studio 2010 to develop a windows application,
i want to open all forms in my application as a tab (not pop up),
like the tabs in visual studio it self.
and when i click on it open it as a pop up form.
whats control that can i use it in visual studio 2010 and how to do this??
thanks all
|
|
|
|
|
TabControl works for me - you will find it in your toolbox.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
ok, but if i click a tab i want to open it as a pop up form how can do this
|
|
|
|
|
If you aren't going to use the tabs to display the data, then don't use tabs at all - users are used to tabs and what they do, if you start going wildly away from that then they can get confused.
If you just want a list of files you can click and open in a pop-up, then consider a toolstrip instead, and make each file a button.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
ok,
when you use visual studio 2010 and open a form.cs[Design], if you click a double click on the form.cs[Design] this must shown in pop up from and if drag-and-drop it to tap the form return to be a tab.
|
|
|
|
|
|
i'm trying to run a process through my application ,and i need to know if that process finished to go ahead, so before going to the next function i check
process.HasExited , in my local pc it works fine with xp. but in some other pc's with xp it gives the exception "No process is associated with this object error"
any idea why this happens.
thanx in advance.
|
|
|
|
|
There may be a So many reasons for this..,
can you post the Process Code snippet Here..
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
bool isRunningFirst = true;
ProcessStartInfo ps = new ProcessStartInfo("telt.exe");
ps.Arguments = "D:\test.txt";
ps.WindowStyle = ProcessWindowStyle.Hidden;
Process prcs = new Process();
prcs.StartInfo = ps;
prcs.Start();
Process prcs2 = new Process();
if (prcs.HasExited)
{
string[] files = Directory.GetFiles(tempFolderpath, "*.txt");
ProcessStartInfo ps2 = new ProcessStartInfo("telt.exe");
ps2.Arguments = files[0] ;
ps2.WindowStyle = ProcessWindowStyle.Hidden;
prcs2.StartInfo = ps2 ;
prcs2.Start();
}
while (isRunningFirst)
{
if (prcs.HasExited && prcs2.HasExited)
{
isRunningFirst = false;
fill_datagrid();
}
}
please ignore the "telt.exe" just a small tool. here in the while i get the exception only for the prcs2.HasExited
|
|
|
|
|
While Process.Start() can throw some exceptions, it also returns a boolean; you should check its value. Start() may fail, e.g. when your exe isn't present, or its containing folder isn't in the Windows PATH.
|
|
|
|
|
follow the above answer..,
why don't you use ps.WaitForExit(); for Process to complete ....
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
How can i restrict a file so it cant be opened in any windows.
cause i wanna to save my password in file and nobody cant see it.
just lock the file without passowrd.
I have serialized my pass but i wanna to deny Access to this file in all windows just in program i access to it.
|
|
|
|
|
I am not sure that there is any mechanism for protecting a file in this way. The safest way is to encrypt the contents and use a custom program to access it. There are plenty of samples around on encryption that you could implement fairly quickly. Alternatively there are a number of password programs available that already provide this feature.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
You can't.
It's that simple.
Think about it: If no program can see the file content, how do you read it?
Unless you encrypt it, and provide a password to decrypt it. But then, you will need a encrypted file to hold the decryption key for the password to the password file. And then you need...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
As you aren't part of the operating system, you can't restrict access to the files. Sure, you could add a group policy that would restrict the file from being opened, but there's nothing to stop somebody from taking your file onto another machine and open it there.
|
|
|
|
|
The only way I can come up with is writing a Windows service that opens the file with exclusive read access, and at that point, no other application can open the file.
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|