|
MSDN[^] has a good article.
|
|
|
|
|
This article doesn't work. I think something between vs '03 and vs '05 has changed. It wants me to create a ButtonArray, which does not exist. Here is what they have in the example:
ButtonArray MyControlArray;<br />
MyControlArray = new ButtonArray(this);<br />
MyControlArray.AddNewButton();<br />
Well seeing how the ButtonArray thing doesn't exist, I can't really do anything with this. How do I go about creating control collections in visual studio 2005?
|
|
|
|
|
Hi all!
I did do a application with Visual C#.My aim is start this application at each beginning windows.
For of this,i am writing value to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" registry key.
My codes is those:
/*line-1:*/if(Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",true).GetValue("clnv1")==null)
{ Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",true).SetValue("clnv1",@"C:\WINDOWS\system32\clnv1.exe");
}
My application is starting at beginning windows.But right now shows warning!!!(on line-1)
Warning is that:
An unhandled exception of type'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not find file "clnv1.exe".
Please help me!!!
-- modified at 20:36 Saturday 24th December, 2005
|
|
|
|
|
Friends,please help me!!!
|
|
|
|
|
I don't get it, does your app run fine if you start it normally? I find it strange that you get a FileNotFoundException on the exact file that you're currently executing. Are you trying to launch it again from within the executable?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hi my name is zubair i am making an application for IP telephony
so i want to get input from MIC so how i can accomplish it in C#
thanks
Zubair Asghar
|
|
|
|
|
i'm using MIL-parser libarary which i get this libarary from code project site
i'm trying to select data from the axWebBrowser and trying to find in the parsed tree but some data found and another not found
f any one can help ???
|
|
|
|
|
Is it possible to get .NET types using some C# code? For example:
<br />
private void InitializeTypes()<br />
{<br />
cmbBlah.Items.Clear();<br />
<br />
foreach (NetType nt in GetNetTypes())<br />
cmbBlah.Items.Add(nt.ToString()); <br />
}<br />
?
tnx in advance
|
|
|
|
|
The NetType you're talking about is actually System.Type[^] . You can get it using Object.GetType[^], Assembly.GetTypes[^] etc. For example, if you want to fill a combobox with all public types in your assembly, you can do:
using System.Reflection;
private void InitializeTypes(){
cmbBlah.Items.Clear();
Assembly currentAss = Assembly.GetCurrentAssembly();
Type[] publicTypes = currentAss.GetExportedTypes();
foreach (Type type in publicTypes){
cmbBlah.Items.Add(type.ToString());
}
}
Welcome to the wonderful world of reflection!
Merry Christmas!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
After a bunch of ASync socket calls, I get the exception below. Google-ing it came up with only 4 hits, 2 from the same person, none with answers.
This is happing in a server application, so if no one has a solution, is there another way to run a TCP server (average of 500 simultaneous, sustained connections. Max possible connections is about 5000, but VERY unlikely) without having a thread for each client, that would be great.
-------------------------------------------------------
"The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone).".
at System.Threading.SynchronizationContextSwitcher.Undo()
at System.Threading.ExecutionContextSwitcher.Undo()
at System.Threading.ExecutionContext.runFinallyCode(Object userData, Boolean exceptionThrown)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteBackoutCodeHelper(Object backoutCode, Object userData, Boolean exceptionThrown)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
|
|
|
|
|
Update:
You can see my socket connection class code Here.
The exception occurs while executing a method in another class called from inside "OnDataRecieve".
-- modified at 5:35 Friday 30th December, 2005
|
|
|
|
|
My DataGrid is serviced by a DataTable. Suppose I would like to make a red background for rows 3 and 5 in this DG. How to make it?
|
|
|
|
|
hi all,
iam able to sending mails using SMTP sever..
but now,how can i send my inbox mails to my database?
can any one know it?
thanks in advance...
byeeeeeeeeeee
sree
|
|
|
|
|
How can i send file from computer A to computer B
|
|
|
|
|
Windows Sockets...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
You must learn network programming for this.
TcpListener,TcpClient,Socket,NetworkStream Classes defined for network programming in Visual C#
This classes in System.Net.Sockets namespace.
|
|
|
|
|
I'm writing a program that does a lot of heavy computing. I eventually want this program to run as a screen saver. But because of all the heavy computer the program does, after a few minutes of running, the fan turns on - wasting energy and making noise, two things a screen saver shouldn't do.
So far I've tried various ways of putting the current thread to sleep for some time, to give the computer a rest, but I haven't had very much succes. Is there a better way to slow down my program or as least (safely) manage it so the fan doesn't come on?
Thanks,
Drausin
|
|
|
|
|
Fan? Which Fan?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
I think he means the fan on his processor - you know, the thing that cools it down and stops it from overheating.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
You could try modifying your process priority. I don't know if this will reduce the absolute processor load or if it's just relative to other processes...
Regards,
mav
|
|
|
|
|
You can try System.Threading.Thread.CurrentThread.Sleep(somemillisecondsvalue); in your working loop...
Merry Christmas!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Yea, I ended up doing that - putting a sleep function into my loop (as opposed to on a separate thread w/ a timer), and it seemed to work pretty well.
Thanks everyone,
Drausin
|
|
|
|
|
Hello all,
I am reading different types of files from DB & Storing at perticular place.
My code is as follows...
<br />
FileStream fs = new FileStream(sFileName, FileMode.Create, FileAccess.Write);<br />
BinaryWriter bw = new BinaryWriter(fs);<br />
<br />
bw.Write(buffer);<br />
bw.Flush();<br />
<br />
bw.Close();<br />
fs.Close();
This is code is not writing proper data only in case of .sql files
Why .sql not writing properly, anybody help me. If there is any alternate in C# inform me.
regards
GV Ramana
|
|
|
|
|
Might be useful if you described what you mean when you say :
Gali Ramana wrote: sql not writing properly
what are yu expecting? What are you getting?
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
I have a service in a remote system that has a fixed port number.
Does any body has a simple code how to check if service is running using C#
Any help will be greatly appreiated
|
|
|
|