|
int i = int.Parse(textbox.Text);
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.
|
|
|
|
|
Er nikesh yadav wrote: it is written something like this
Sorry, I don't see why anyone would need to ask a question like this. Why didn't you read the documentation and see for yourself? Really, this question smacks of sheer laziness.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
As does 99% (statistic provided by my arse) of the questions around here
|
|
|
|
|
Right.
So why answer such questions ?
public void replyToQuestion() {
if (lazy question in topic && nothing useful in body) {
throw up;
}
....
}
|
|
|
|
|
I don't :P
Or I reply with either a sarcastic answer or deliberatly misinterprit what the question is :P
asif_aslam wrote: why we using properties
Origin42 wrote: Because coding outside means getting wet :P
(well it does in this country anyway)
|
|
|
|
|
i am writing a code in C# to use the pda(windows ce)to send messages in a TCP\IP protocol to server using a wifi connection can any one know a refrence that can help me plz any suggestion is approved
Best Wishes
|
|
|
|
|
mezo_22 wrote: i am writing a code in C# to use the pda(windows ce)to send messages in a TCP\IP protocol to server using a wifi connection can any one know a refrence that can help me plz any suggestion is approved
Reference to what?
Try "Sockets" - is that enough of a reference? (It's in the System.Net namespace if I recall correctly)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
thanks for ur quick answer to my question i know a bout sockets but what i meant by refrence is a book to read in about wifi connection programming in C# and if it is different than the regular ethernet programming thanks again.
Best Wishes
|
|
|
|
|
The physical network doesn't matter, it's the network protocol.
i.e. your using tcp/ip whether its in a wire or in the air.
|
|
|
|
|
originSH wrote: your using tcp/ip whether its in a wire or in the air.
...or using pigeons[^]
---
single minded; short sighted; long gone;
|
|
|
|
|
they are known to increase latency.
|
|
|
|
|
Not where I work. Even with 9Mbit comming out of this place, there are two things faster than our network - pigeons and sneakers.
|
|
|
|
|
Hi to every developers
I want to send data from USB port to another device.
I using C# .Net 2005.
if you have any experience about this problem, Help me,Please.
|
|
|
|
|
The USB port is anything but. It'a a connector for a serial BUS. This "port" does not work like a serial or parallel port. It's not really directly addressable if you want to talk to a specific device on the bus.
You communicate with the devices on the bus using the methods made available buy the drivers for that device. Without knowing what the device is, there's really nothing anyone can tell you, except consult any possible SDK documentation on that device.
|
|
|
|
|
Hello all,
The following code will retrieve a unique processor ID (for the first processor) using the .NET Frameworks System.Management.ManagementClass class:
public static string GetCPUId()
{
string cpuInfo = string.Empty;
ManagementClass mgr = new ManagementClass("Win32_Processor");
ManagementObjectCollection mgrCollection = mgr.GetInstances();
foreach (ManagementObject mgrItem in mgrCollection)
{
if (cpuInfo == string.Empty)
{
cpuInfo = mgrItem.Properties["ProcessorId"].Value.ToString();
break;
}
}
return cpuInfo;
}
However I need to do the same thing using DllImport/Interop. Does anybody know how to do this?
|
|
|
|
|
MrEyes wrote: The following code will retrieve a unique processor ID
According to
this web page[^] the processorID is not unique at all.
You are confusing with the processor serial number which might be available through the
UniqueID field of WMI, but this feature may be absent or disabled (in which case
WMI returns a null value). The default state is: disabled.
To access such features without WMI you need low-level code, say C + assembly,
that executes the CPUID instruction and returns some register values; plus of course
the necessary P/Invoke stuff to interface to the native code.
For more info on CPUID, search for "Intel CPUID" and you will find utilities and
documentation (Intel App Note 485).
|
|
|
|
|
Hi All,
i have a problem while minimizing a form , actually i have a form and in this form i have a button and on the button click event i m opening a new form but when i minimize the second form it is also minimizing the first form , how can i fix this problem .
Please help me.........
Praveen Sharma
|
|
|
|
|
Just a wild guess.....
topksharma1982 wrote: i m opening a new form but when i minimize the second form it is also minimizing the first form , how can i fix this problem .
If you're using Form.ShowDialog(); , use Form.Show() instead.
Gideon
|
|
|
|
|
thanx a lot,
but is there any way with ShowDialog() also.
Praveen Sharma
|
|
|
|
|
no its not a MDI form .
Praveen Sharma
|
|
|
|
|
I dont think so, ShowDialog() exists to make the second form stay on top of the first;
minimizing the second without minimizing the first would defy that purpose.
|
|
|
|
|
Hi all,
I've seen a lot of posts over the web about this issue but not even one(!) prudent solution.
I'm creating an excel file. Filling in some data, saving the excel and then when i'm trying to delete it i get the following exception:
"The process cannot access the file 'c:\temporaryFiles\ANLsnir_yarom_276200717848.xls' because it is being used by another process. "
Here's a code extract of the problem, a lot of progarammers would appriciate an answer for this riddle:
Excel.Application excelApp = new new Excel.Application();
Excel._Workbook workbook = (Excel._Workbook)excelApp.Workbooks.Add(Type.Missing);
Excel._Worksheet worksheet = (Excel._Worksheet)workbook.ActiveSheet;
//write into the excel and...
workbook.Close(ANL_Excel.vk_true, filePath, ANL_Excel.vk_false);
excelApp.Save(filePath);
excelApp.Quit();
Process[] pProcess;
pProcess = System.Diagnostics.Process.GetProcessesByName("Excel");
pProcess[0].Kill();
File.Delete(filePath);
Many Thanks,
Snir Yarom.
|
|
|
|
|
two observations about your code snippet:
1. only the first process returned by GetProcessesByName is being killed; what if there is more than one EXCEL.exe?
2. none of the Excel COM objects are being released. Don't forget to Marshal.ReleaseComObject(aComObject); all those Excel objects being created.
hope this helps . . .
|
|
|
|
|
Thanks for the reply.
I've implmeneted your observations:
Process[] pProcess;<br />
pProcess = System.Diagnostics.Process.GetProcessesByName("Excel");<br />
foreach(Process prcs in pProcess)<br />
{<br />
if (prcs != null)<br />
prcs.Kill();<br />
} <br />
<br />
Marshal.ReleaseComObject(excelApp);
But still, i get the same exception when i'm trying to delete this file.
Any suggestions?
Thanks.
|
|
|
|
|
// Need this to clean up all refs
workbook.Close(null,null,null);
excelApp.Workbooks.Close();
excelApp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject (excelApp);
System.Runtime.InteropServices.Marshal.ReleaseComObject (worksheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject (workbook);
worksheet=null;
workbook=null;
excelApp= null;
GC.Collect(); // final cleanup!
then delete your file
Nav.
|
|
|
|