|
JOB.exe is legacy software that monitors registry and file system changes - sadly I don't have the source code available to show exactly how it works but ... it works fine for the logged-in user.
Do I maybe have to do something special to my CreateProcessAsUser() to load the environment? Profile? etc... I also noticed that accessing HKEY_CURRENT_USER doesn't seem to work ...
|
|
|
|
|
Hi,
I have a FlowLayoutPanel, and I implemented it's SizeChanged Event,
the strange thing is when I change the size of the FlowLayoutPanel, the event is called two times, I don't know why.
for example:
FlowLayouPanel p = new FlowLayouPanel();
p.Size = new Size(10,10);
when debbuging this line the event SizeChanged called two times.
any ideas why ?
C.R.E.A.M
|
|
|
|
|
1) you should know that when the control's "Size" property changed., 'SizeChanged' Event Triggered.
2) I Guess:
1. when you "FlowLayouPanel p = new FlowLayouPanel();", p Object has the default Size, so SizeChanged Event Happened.
and then "p.Size = new Size(10,10);", you set the new size for p, so SizeChanged Event Happened again.
2. may be in "SizeChanged" Event , you write some codes like this: 'P.Szie = ....';
so when In "SizeChanged" Event triggered twice;
modified 27-May-14 5:31am.
|
|
|
|
|
Dear All,
I have 5 projects under a single solution and i am using VS 2k5. i have made a setup project which builds MSI file. every thing works fine.
I want to copy a file from a specific folder before installing my msi package and then delete that file after installation is successfull.
any ideas or suggestions please?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Any decent installer package will let you specify your own tasks and the order in which they occur. I have no idea about the ones that VS creates.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It supports Custom Actions. Right click on the installer project and choose View -> Custom actions.
|
|
|
|
|
thanks for reply, as I mentioned before I have 5 projects in one solution. I put an Installer in one of those projects and I overrieded OnbeforeInstall and OnAfterInstall. I copy the files in "OnBeforeInstall" and when i restore that file again in "OnAfterInstall" that file is not populated again.
OnBefore Install works, but OnAfterInstall doesent work. I am getting no errors, nothing but I have simply wrote to move that file, but it doesent.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
Thanks alot, helped me alot
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
You are Welcome
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
For example, my input was 1000042738 (doesn't matter this 10 number is integer or string type)
After encrypted, it will become an output of 10 byte length
something like this example >> 8273650283
and after decrypt it will back to 1000042738.
i do not know whether this is possible or not, because I'm still fresh to encryption
i already google for this kind of example for few days and i cant find a suitable one because all the example out there was 64bit encryption, which already exceed 10 digit length.
**my input length is always 10 and consist of numbers only
**output length must be 10 and consist of numbers only
btw, i do try xor which i think its not a good method.
because it gave me 8372400001 which reverse the original input.
thx alot guys!!!
|
|
|
|
|
wSheng87 wrote: because it gave me 8372400001 which reverse the original input.
That is what xor does.
If I were you, I'd look for encryption methods in the encryption namespace. If you MUST generate numbers, and they then convert back to numbers, you're greatly reducing the scope for an algorithm to be secure. It's possible you'd have to write your own for that, and expect that it is breakable.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It really depends on how much security you need.
If you need a lot of security then you're not likely to be able to retain the 10-digit requirement.
If only a little security is need then maybe you don't need any at all.
Can you give more information?
Anyway... this may be an area where just a little security can go a long way; after all, how would someone who intercepts the message know he had correctly deciphered the number?
The following code is an example of a very simple/non-secure encription algorithm, similar to ROT13[^]:
private static readonly System.Collections.Generic.Dictionary<char,char> wombat ;
static Template
(
)
{
wombat = new System.Collections.Generic.Dictionary<char,char>() ;
wombat [ '0' ] = '9' ;
wombat [ '1' ] = '8' ;
wombat [ '2' ] = '7' ;
wombat [ '3' ] = '6' ;
wombat [ '4' ] = '5' ;
wombat [ '5' ] = '4' ;
wombat [ '6' ] = '3' ;
wombat [ '7' ] = '2' ;
wombat [ '8' ] = '1' ;
wombat [ '9' ] = '0' ;
return ;
}
private static string
Wombat
(
string s
)
{
System.Text.StringBuilder result = new System.Text.StringBuilder() ;
foreach ( char c in s )
{
if ( wombat.ContainsKey ( c ) )
{
result.Append ( wombat [ c ] ) ;
}
else
{
result.Append ( c ) ;
}
}
return ( result.ToString() ) ;
}
If more security is required, you could extend this to provide for passing a "key" between partners, but you would then need separate encription and decription methods.
|
|
|
|
|
for my case, i have P-1234-1000042373.
which i need to encrypt the final 10 digit into another integer combination.
which mean it still readable by human. because when user enter in this key, it should be numeric form and it is not suppose to be very long, or else user will feel ...
and maybe i gona encrypt all 14 digit which is 12341000042373 together into numeric form also..if possible
erm, if you can make one with the encrypted output not very long or short
something like 12-13 or 15-16 @_@
i appreciate ur reply..thx u so much
|
|
|
|
|
wSheng87 wrote: P-1234-1000042373.
wSheng87 wrote: encrypt the final 10 digit
A Regular Expression can be used to split them off.
|
|
|
|
|
I was practicing coping files in C# console application. I have only one execuitable and i am trying to copy that execuitable using File.Copy method inside that execuitable. I know this sounds stupid but can be done and if yes how.
|
|
|
|
|
Yep - add the following using statment
...
using System.IO;
...
then in your code do something like this:
...
File.Copy(@"C:\test.exe", @"C:\Temp\test.exe");
...
|
|
|
|
|
string str = "hai";
Console.WriteLine(str==str);
Console.WriteLine("Hello"+str==str);
Output:
True
False
Have doubt in second,... why did not print "Hello" and why print False instead of True
|
|
|
|
|
Hi,
you should check the documentation on operator precedence to find out whether
"Hello"+str==str is the same as "Hello"+(str==str)
or is the same as ("Hello"+str)==str
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Argh, beat me to it! 
|
|
|
|
|
|
anishkannan wrote: why did not print "Hello" and why print False instead of True
I guess there's a common reason for...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
For Console.WriteLine(str==str);
here compiler checks "hai" is "hai" or not !!
Compiler : Yes
So your Console.WriteLine(str==str); is "True".
For Console.WriteLine("Hello"+str==str);
now the compiler checks is "Hellohai"(the outcome of "Hello"+str) is "hai".
"Hellohai" == "hai"
Compiler : no
So your Console.WriteLine("Hello"+str==str); is "False".
The key portion here is C# operator Precedence.

|
|
|
|
|
Hi,
I have configured the ASPNET membership database to use for security. I am planning on using Client Application Services with WinForms so that I may be able to have one UserID for the website and the Desktop App.
How can I check the UserId tag in the aspnet_Users table in order to populate a WinForm with information for the specific user?
Currently I have a PersonTable that has a One-To-One relationship with aspnet_users and the Person Table has a One-To-One relationship with the EmployeeTable and a One-To-One relationship with the ClientTable.
Thank you!
Illegal Operation
|
|
|
|
|
Illegal Operation wrote: How can I check the UserId tag in the aspnet_Users table in order to populate a WinForm with information for the specific user?
Are you able to do this from ASP.NET? If yes, best way is to create a web service which will use membership provider APIs. Your windows application can just call this service without messing with ASP.NET APIs.
|
|
|
|