|
Basically, you can't hide from the Task Manager.
As for DRM, I'm with everyone else. It's an idea that looks great on paper in the Corporate Boardroom, but in all usability and actual security, it sucks. Take a look at Sony's attempt at DRM and tell me that it won't come back to smack you in the face...
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 14:58 Monday 26th June, 2006
|
|
|
|
|
Sounds suspecious; we can't help
Best,
Jun
|
|
|
|
|
|
Hello all.
With all respect to the fine programmers who replied to this post -who are by far much better programmers than me-, with all respect to them I don't think we have the right to judge anyones intentions when answering questions on the forum, do you?
Programs like security, administrative, or networks software might need such a feature. I don't know what is a "DRM software" -I told you I'm a lousy programmer -, yet I belive CodeLeon has the right to know the technique. Using it rightfully is his problem, not ours.
Anyway, that's my opinion -Again I pay respect to all who disagree-. So here is a link that might help:
http://www.codeproject.com/system/preventclose.asp[^]
Finally I believe that if we didn't learn how virii work, we wouldn't be able to stop them...
Right?
|
|
|
|
|
Thanks for support, man. 'Appreciate.
code -> MakeBest(forever);
|
|
|
|
|
True to some extent, until you've had to jump through the hoops required to recover from something like SpySherif... Then all your bile and distain will fly while foaming at the mouth at any mere mention of "how do I hijack poor unsuspecting users machine?" Nothing personal CodeLeon, you may have noblest of intensions, I don't dare guess your motivation. But luckily for me, I don't know the answer to withold from you and can skurt my moral delima, so take my rantings with a grain of salt.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
If your curious, my intentions were to stop the copying of files from one folder to another like Microsoft Documents Rights thing. I thought this would be useful.
code -> MakeBest(forever);
|
|
|
|
|
CodeLeon wrote: my intentions were to stop the copying of files from one folder to another like Microsoft Documents Rights thing.
Instead of hiding the process from task manager (which is a "bad thing" from the normal user perspective), this kind of application should run as a system service and the user account set to.. well.. user, instead of Admin because regular users can't disable services.
Personally I'd run away from hiding processes, it just opens you up to too many possible legal issues.
Mike Poz
|
|
|
|
|
Thanx! Good idea! How do i make my application a system service and do like you said? does cp have an article on this?
code -> MakeBest(forever);
|
|
|
|
|
Plenty, in fact Studio has a Windows Service project template. I don't have one off hand, but you should have no trouble searching for some.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
I was just kidding.
Best,
Jun
|
|
|
|
|
Nader Elshehabi wrote: yet I belive CodeLeon has the right to know the technique
If he can figure out how to get Digital Rights Management to work, he can write up an article and tell the rest of the industry how to do it. To date, noone has been able to get a DRM working with any reliability. So, to date, there is no technique to really tell him about! There's plenty of examples on how NOT to do it though!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello all,
I am using Custom Attributes in my classes, like this:
<br />
public class myObject<br />
{<br />
[Property("DBFieldName")]<br />
public int myName;<br />
...<br />
}
but, I can't find an easy way to get these attribute values, instead of reading all the attributes, for all of my class members. For example, the best way I can think is to use a function, like this:
myObject objectItem = new myObject()<br />
string AttributeValue = GetAttributeValue(objectItem.myName)
OR
string AttributeValue = objectItem.GetAttributeValue(myName)
My problem is that I can't find a Parameter Type for a function like this. Of course I don't want to use a string type, so that I can reference it easily in
my code.
Thanx in advance,
Pant
|
|
|
|
|
Athough it is overkill for what you want this article shows how to get the attributes of a class that is dynamically loaded http://www.codeproject.com/csharp/suiteapp.asp[^].
You can get the access to the CustomAttributes collection from the type.
object[] attributes = <br />
t.GetCustomAttributes(typeof(SuiteAppAttrib.SuiteAppAttribute), <br />
true);
|
|
|
|
|
Hi,
i have this text file
GENUARDI ADOLFO
90100
04800530828
VIA ORETO139
MARCHESE SALVATORE
90100
00464940824
IAZZA CARMINE 40
I must read 4 line each time and put into a database so till the end of the document,
i wrote this code but is not right
try
{
StreamReader sr=new StreamReader("\\Program Files\\SIP\\clienti.txt");
string[] After;
ArrayList lines = new ArrayList();
string line;
int lineb=0;
int conta=0;
while ((line = sr.ReadLine()) != null)
lines.Add(line);
if(conta % 4==0)
{
string a = (string) lines[0];
string b = (string) lines[1];
string c = (string) lines[2];
string d = (string) lines[3];
SqlCeConnection cn = new SqlCeConnection("Data Source=\\Program Files\\SIP\\data.sdf");
cn.Open();
string gg="INSERT INTO clienti(nome,CAP,piva,Indirizzo) VALUES('"+a.ToString()+"','"+b.ToString()+"','"+c.ToString()+"','"+d.ToString()+"')";
SqlCeCommand cmd = new SqlCeCommand(gg,cn);
cmd.ExecuteNonQuery();
cn.Close();
cont++;
}
}
catch(SqlCeException ex)
{
MessageBox.Show("Errore"+ex.Message+ex.Errors);
}
Please help me Bye
giulio
|
|
|
|
|
giulione wrote: i wrote this code but is not right
What's wrong with it? Please be more specific.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
You never change the "conta" variable, so it will always be zero. As (0 % 4) is zero, the condition in the if statement is always true. As you only have one string in the ArrayList when you enter the code in the if statement, the expression "lines[1]" will get you an "index out of range" error.
When you fix that, you will notice that you save the same data over and over again. That is because you never clear the ArrayList.
Furtermore:
You should open and close the database connection outside the loop, otherwise the loop will get rather slow if you get more than a few records.
Try to use variable names that are a bit more descriptive than "a", "b", "c", "d".
You should use a parameterized query instead of concatenating the strings into it. If you don't want to do that, you should encode the string correctly for SQL by replacing apostrophes (') in them with double apostrophes.
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
Can you please tell me how can I show a contextMenuStrip when a user right click a mainMenuStrip item?
Exactly like Internet Explorer Favorite menu and Firefox Bookmarks menu.
Thanks in advance.
|
|
|
|
|
|
Yes and it works but I don't want that. I want to show the ContextMenuStrip for the sub menu items of the favorite menu only, not for the main menu items.
|
|
|
|
|
Hello
I believe in this case you will have to do it manually, by adding a MouseDown event handler to the MenuItems you wish the ContextMenuStrip to appear for.
eg.
private void testToolStripMenuItem_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
if(e.Button == MouseButtons.Right)<br />
contextmenu1.Show(sender, new Point(10, 10));<br />
}
|
|
|
|
|
Thanks a lot. It worked but there's a little bug.
The problem is when I right click on a menu item the main menu (Favorites) is being closed as soon as the context menu is shown.
How can I fix that?
|
|
|
|
|
Hello again
This time it'll be a bit of a mess;)
you see, Internet Explorer uses Shell menus to do this task, we'll have to do it manually:
Modify the previouse code to this:
private void testToolStripMenuItem2_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(this, new Point(10, 10));
contextMenuStrip1.AutoClose = false;
menuToolStripMenuItem.ShowDropDown();
contextMenuStrip1.BringToFront();
}
}
Where:
testToolStripMenuItem2 is the submenu you wish to right click on -Like the favourite folders-
menuToolStripMenuItem is the Main menuitem -Like the favoutires menuitem.
Notice that after the contextmenu shows up the Menustrip behind it still has the mouse activity. To stop this:
1- Make another context menu
2- Assign it as the dropdown of your -favourites- menuitem
3- At the end of the RightClick event handler add this line
contextMenuStrip1.Capture = true;
it won't work unless the DropDown is another ContextMenuStrip not just MenuItemColection.
Note that you still have to set the AutoClose back to true to close the ContextMenuStrip. Do it when you know that the user won't be needing it any longer
I told you this is going to get messy
|
|
|
|
|
I'm looking for a free open source* RTE (Rich Text Editor).
I'm looking for ASP.NET, but I figured to my self, that this forum is more supportive and can help better than the other one (although I will post there also).
If anyone have any links that might help me, I would that him soooooo much!!!
Thanks in advanced... SOOOOOOOOOOOOOOOO Muchh.....
*Open source = A component that I can edit the style\looks of it, so I can change his appearens to my needs.
NaNg.
|
|
|
|
|