|
dethsta wrote:
2) Something pops up saying "do you trust this company" or "can this program have full permissions"
This is not really what CAS (Code Access Security) is about. The whole idea is that people will run something, even if warned not to. The security model is placed solely in the hands of the admin to allow or disallow what code can run from where. The user is not asked.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
I totally agree with you . . . CAS is definately the way to go when under the supervision of an admin. However, for a home user with minimal knowledge of .NET security . . . I would prefer that the are just prompted for trust, letting me handle the rest. Much like how the Windows Update site works.
I believe this can be done with a signed CAB file and an embedded object in a web page. Does anybody know the pros/cons of this approach and where to find good .NET tutorials on the subject? I am slowly getting closer to a solution.
-Dethsta
|
|
|
|
|
I remember seeing an article about this at:
http://www.sellsbrothers.com/[^]
Don't remember which one but I am sure you can find it while browsing there. It was a fairly indepth article.
Rocky Moore <><
|
|
|
|
|
Hi,
I'm adding some controls on Panel at runtime. This works fine, but after removing this controls, Application can't be closed (and Closing event isn't called).
Creating controls:
MyControl ctrl=new MyControl();
ar.Add(ctrl);
panel1.Controls.Add(ctrl);
Removing all controls:
panel1.Controls.Clear();
foreach(MyControl ctrl in ar) ctrl.Dispose();
ar.Clear();
When I'm not removing controls it works
i'm only pointer to myself
|
|
|
|
|
Tomas Petricek wrote:
MyControl ctrl=new MyControl();
// MyControl is derived from UserControl
ar.Add(ctrl);
panel1.Controls.Add(ctrl);
You are duplicating code.....
Tomas Petricek wrote:
panel1.Controls.Clear();
foreach(MyControl ctrl in ar) ctrl.Dispose();
ar.Clear();
It seems the GC might be invoked too early, therefore modifying the collection while enumerating thru it, which is illegal.
Rather use a while loop:
while (Controls.Count > 0)
{
Control ctrl = Controls[0];
Controls.Remove(ctrl);
ctrl.Dispose();
}
Hope this helps
Who is this miscrosoft, and what devilish plans have they for us?
|
|
|
|
|
I heard somewhere that this can happen if controls are hidden.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
There is a bug where a Form can't be closed if you remove a control that has the current focus.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thank you !
Setting focus to another control solved my problem.
i'm only pointer to myself
|
|
|
|
|
I'm very new to programming in general but if I get a push in the right direction I think I will manage. I'm trying to build a windows application that will output a sequence of keyboard/mouse presses. What I need to know is where in C# do I find the functions that outputs the pressing?
|
|
|
|
|
Not the only option but probably the easiest. Consider DirectInput, part of the DirectX 9 SDK[^].
Of course, the downside is that anyone who wants to use your software needs the DirectX 9 runtime, which is a 32Mb download. But if that isn't a problem, DX9 will do the job.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I was wondering if anyone has input on howto
pass SafeArrays into .Net assemblies ???
Example:
Create a Javascript file which creates then passes in an Array
to a C# .Net assembly (assembly is set to use COM interopt)
-------------------------------------------------------
Begin js code
-------------------------------------------------------
var javascript2csharp = new ActiveXObject("MyCSharpComp.DoIt");
anArray = new Array();
anArray[0] = "Weeee";
anArray[1] = "Arggg";
javascript2csharp.PassArray(anArray);
-------------------------------------------------------
End js code
-------------------------------------------------------
Any help would be great !!!!
Thanks
|
|
|
|
|
HI,
I am writing an application which actually connects to a oracle db hosted on a unix machine. There will be around 1000 desktop clients(win XP) hosting the application. Right now the database username and pwd are stored in app.config to connect to db. How can i hide these details from client mahine user? I mean how can i prevent desktop user to know the db passwords from config file..?
encryption is taking very big maintenance work, every time they change db password...each time they need to change the config file with encrypted passwod.
Webservice scenario doesn't work in this context as there are no web servers.
please help me finding someway
regards
sudhakar
|
|
|
|
|
Is it possible to send message to instant messengers using c# and asp.net
|
|
|
|
|
|
Thanks a lot for your response. My actual requirement is that I need to send alerts to the subscribers via various channels like mail, IM etc. In lieu with that, is there a possibility of sending messages to Windows messenger or the MSN messenger using the Interop feature or a built in feature of the .Net. The application would be on ASP.NET and C#. Is there any reference for the same.
|
|
|
|
|
|
|
Is is possible to take ownership of a file using c#. (Like when you right click on a file in explorer, click properties, securities, and then the take ownership button).
Anybody have any c# examples on how to do it and what namespace should you use.
Cheers in advance
Satvinder
|
|
|
|
|
OK , I managed to get a answer but the example is in VB6.
The article for all who want to know is a MSKB article 318744, which I will try to convert to C#.
http://support.microsoft.com/default.aspx?scid=kb;en-us;318744
|
|
|
|
|
I am new to C# and am trying to call some old legacy C stuff that accepts as input a pointer to a struct that has several fields that are pointers to large byte arrays. I am able to get a clean build but am not able to run without getting an exception that says something like unable to marshal structure field of this type (it's referring to the array pointer (reference) fields). I have even tried unsafe mode but have had problems taking the address of an array. I am using the Beta-2 Visual Studio. tfbriscoe@msn.com
Tom
|
|
|
|
|
tfbriscoe wrote:
I am using the Beta-2 Visual Studio
Well, not sure of the exact changes in the Marshal class, however why don't you post a little code so everyone can take a look at what you are doing.
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
Hi Nick. Thanks for your willingness to help! I solved the problem yesterday in both managed and unsafe modes. Just had to do a little more research about unsafe mode, "fixed" code groups, and structure layout attributes!
|
|
|
|
|
I'm working on a desktop toolbar type application, much like a suped-up
taskbar. I would like to take advantage of the dockable feature to dock the
bar with the desktop, is this possible or will I have to do it manually.
Another feature I would like to implement is the ability for the bar to
slide in and out of view, much like the tasbars ability to auto-hide. My
initial thought for this sliding functionality was to move the bar's x-y
position off the screen using a SetDesktopLocation(...) loop, finishing at
the bar's width. However, a form at (0, 0), of width 70 pixels docked on the
left side of the desktop shifted to (-70, 0) does not shift off the desktop
completely, I need to shift to about (-120, 0) for the form to disappear. Am
I using the correct function, or even the correct idea?
Thanks in advance,
-e
|
|
|
|
|
Rather than shifting the position of the toolbar, you may try resizing it to a width of 0 pixels. This should result in the desired effect.
You could perform this action with some pizzaz by animating the resizing of the control. If you're interested, check out ActiveWare Solution's AWControlAnimator at http://www.ActiveWareSolutions.com
-msf
|
|
|
|
|
Anonymous wrote:
Another feature I would like to implement is the ability for the bar to
slide in and out of view
I have actually been working on something like this for a while, however with classes a lot of my "projects" go into a hibernation mode. I found something like the following works well. The reson I resized to a width of 2 was that allowed for a white line to be drawn and shown along the edge of the form similar to the edge on your task bar when you look really close.
void HideMe()
{
while(this.Width > 2)
{
this.Width -= 1;
Thread.Sleep(10);
this.Refresh();
}
}
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|