|
Cheers, that looks exactly what I was looking for!
|
|
|
|
|
There are several native functions like EnumWindows or EnumChildWindows that could be used. Take a look here to get an overview. More information on how to use the native functions in C# are provided by pinvoke.net.
www.troschuetz.de
|
|
|
|
|
i don't understand something.
the list view in windows application c# supports column reorder....but i cannot find a way to see which column is the first one.
can anyone help?...it is very odd...why did microsoft implement the column reordering in list view but didn't provide a way to read which column is first?...(the label of the column for example???)
thank you in advance.
|
|
|
|
|
|
Hi every one,
I am a webdeveloper with old concepts like ASP, now i would like to migrate my self with ASP.Net, for that i am concentrating on C#.
I need C# complier. so any one can help me in this, i need some links where i can download C# compiler for free.
thanks a lot in advance
nagarajuepuri
nagarajuepuri
|
|
|
|
|
|
The C# compiler is included in the .Net Framework - the name of the compiler executable is csc.exe (for C Sharp Compiler).
|
|
|
|
|
created a setup project for my comapny (windows based application) using .NET Setup and Deployment project (Setup Project). I want to change the registry enviroment variables for the current user, which I easily add in their registry editor. When I install the setup in fresh computer, its instals ok and shows the updated environment variables (Right click on my computer -> properties -> Advanced -> Environment variables) but they did not work. If i open the dos window (cmd.exe), and run "set", its did not display the updated environment. Even reboot didn't fix it. I have to manully edit those value in order to take effect, which is not acceptable at user point.
It seems like very basic feature to me, when you deploy the application, you want to change the environemnt variables. Is this a knows bug or I am missing something.
Please help me..
Shail Srivastav
shailsrivastav@hotmail.com
blog
|
|
|
|
|
I have to concatenate an unknown number of byte arrays, into a large byte array.
Do you know how can i accomplish this, optimally?
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
Bogdan Rechi wrote:
optimally?
performance-wise?
I guess get pointers to arrays' bases and use them (the array sizes too) with the memcpy function, accessible from C++ (i think it's in memory.h ).
Simplicity?
Create a big array and copy inputs into it with the Array.Copy(Array, int, Array, int, int) method
there are no facts, only interpretations
|
|
|
|
|
Use a memory stream:
byte[] arr1 = new byte[] {1,2,3,4};
byte[] arr2 = new byte[] {9,8,7,6};
byte[] arrFin;
using (MemoryStream ms = new MemoryStream())
{
ms.Write(arr1, 0, arr1.Length);
ms.Write(arr2, 0, arr2.Length);
arrFin = ms.ToArray();
}
Grim (aka Toby) MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL
GO
(0 row(s) affected)
|
|
|
|
|
Grimolfr wrote:
ms.ToArray()
I used GetBuffer and it returned an array larger then the actual number of bytes inside (it grows by doubling the current size).
Thank you!
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
I hvae a webmethod in my webservice, when I debug it, a xml format file is benn make. I want to out put the xml file on my webmethod, For example, At last line my webmethod add a some code.Because when I debug the webmethod, it can work normally. But when I call it at my webapplication, it has a error that There is an error in XML document (421, 39). I think that this is error what data xml have some special characters.
|
|
|
|
|
Have you looked into creating a SoapExtension for debugging purposes? Can be helpful.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Hi everyone,
Could you please tell me what the best and error-prone way to sign and verify XML files exists? Which CSP provider exists on all 2K and XP machines? What is the optimal key-length so that it works with all localized Windows versions?
The only constraint I provide is the ability to sign with the private key and to check with the public key.
Thanks in advance.
Regards,
Serge (Logic Software, Easy Projects .NET site)
|
|
|
|
|
Serge Lobko-Lobanovsky wrote: best and error-prone way
|
|
|
|
|
Your smile shows you have no practical experience in this subject and do not understand that there are problems with both 1.0 and 1.1 crypto API implementation. So I am really sorry for the traffic you've wasted when posting your smiley.
Novichek?
Regards,
Serge (Logic Software, Easy Projects .NET site)
|
|
|
|
|
Yo, I wasn't answering your question. I was just making a joke out of "error-prone". By definition error-prone means "capable of making an error". I'm sure that's not what you are looking for.
|
|
|
|
|
By default Katakana charactor (in Japanese) takes two bytes, but it can also be displayed using one byte(that reduces charactor width). Is there any standard way to convert two byte Katakana charactors in to one byte charactor in a given string that may have Kanji and Katakana in it.
Please guide.
|
|
|
|
|
No there isn't. You'll have to use some customized compression technique on the strings. But, when you wanted to do ANYTHING with them, like display them or manipulate the strings in any way, you'd have to decompress what your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi , i click button1 to open form1. if i click the button1 again, i don't want to open a new form1 BUT focus on the already opened form1. i tried for1.focus() but is not working. why?
Chris
|
|
|
|
|
Create Form1 as Singleton class. this will solve the problem
|
|
|
|
|
|
Try this.
<br />
private Form Frm;<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
if(Frm!=null)<br />
{<br />
Frm.TopMost=true;<br />
Frm.Activate();<br />
<br />
}<br />
else<br />
{<br />
Frm=new Form();<br />
Frm.TopMost=true;<br />
Frm.Show();<br />
}<br />
<br />
}
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hi, all.
I am working on a C# code that can retrieve system log by using WMI.
However, the code is working fine under windows 2000, but got error messages
under Windows XP.
The erro message is :
Unhandled Exception: System.Management.ManagementException:Access denied.
at System.Management.Management.Exception.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementEventWatcher.Start()
Part of my code is like following and I believe this is where the problem at:
----------------------------------------------------------------
public static ManagementEventWatcher getWatcher(string comp, string LogName)
{
ConnectionOptions co;
ManagementPath mp;
ManagementScope ms;
WqlEventQuery EventQuery;
ManagementEventWatcher watcher;
string wql;
string wqlAnd;
co = new ConnectionOptions();
co.Timeout = new TimeSpan(0, 0, 60);
co.EnablePrivileges = true;
mp = new ManagementPath();
mp.NamespacePath = @"\root\cimv2";
mp.Server = comp; // comp is the computer you are connecting to
ms = new ManagementScope(mp, co);
Console.WriteLine("host is" + comp +"Logname is "+LogName);
switch(LogName.ToUpper())
{
case "ALL":
wqlAnd = "";
break;
case "SECURITY":
wqlAnd = " AND TargetInstance.Logfile ='Security'";
break;
case "SYSTEM":
wqlAnd = " AND TargetInstance.Logfile ='System'";
break;
case "APPLICATION":
wqlAnd = " AND TargetInstance.Logfile ='Application'";
break;
default:
wqlAnd = "";
break;
}
wql = "select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'" + wqlAnd;
EventQuery = new WqlEventQuery(wql);
watcher = new ManagementEventWatcher(ms, EventQuery);
Console.WriteLine("end of first watcher");
return watcher;
}
---------------------------------------------------------
Could any of you tell me how to solve this problem?
Thanks a lot.
|
|
|
|