Hi all,
I'm trying to add keyboard customisation to my app. I need some help understanding the relation between virtual key codes the "extended" bit.
If a user associates numpad 3 with a command, my app will store the value VK_NUMPAD3 (0x63) against that command.
If a user associates page...
Hi all,
I'm filling a ComboBox called f0ParamList with Addstring as follows:
CString sParm;
for (int i = 0; i < numParams; i++)
{
sParm.Format("%d: ", i);
int idx = (myDialog->m_f0ParamList).AddString(sParm);
}
At this point, (myDialog->m_f0ParamList).GetCount() returns 8 as...
Hi,
When I right click a control in my dialog (Slider control, edit control, combo box etc..) in the resource editor and select "Add event handler...", I get a popup with the following error message:
Internet Explorer Script Error:
An error has occurred in the script on this page...
Hi all,
Here's a sequence of events that seems OK but leads to an error on my system:
1. Start VS.NET, select new project.
2. Choose to start a Win32 Project
3. Set to dll, click finish
4. Go to Add resource, and add a dialog box.
5. Right click the OK button (or any button for that matter)...
Hi all,
2 points:
1. I'm looking for a calculation that would show the advantages of using the decimal primitive in C#, ie a calculation that would yield different results when using floats and decimals.
I Java such calculations would be repeatedly dividing 9 by 10, or 0.70 * 1.05. With C#...
Isn't there a way I could just convince the CLR to allocate more memory to the heap? This would surely help as less GC would be required.
Cheers,
Robin
Hi,
My C# app is running much slower than expected (about 3x slower than Java equivalent).
Profiling with the AQTime profiler has revealed that the CLR is collected garbage from heaps Gen0, Gen1 and Gen2 every few second! I assume that this is what is slowing it down.
How can I remedy this...
Hi all,
I recently tried out my C# program on a system on which the .NET Framework Redistributable had been installed (as opposed to the Framework SDK).
I expected it to run fine, but it threw an exception when trying to initialise a ".NET CLR Memory" / "#Bytes in all...
Hi,
Thanks for your answer.
I'm not writing a server app, but I may try mscorsrv.dll instead to see what happens. I'm not using any COM components. However I'm not using Visual Studio .NET - do you know how I can disable "Register for COM Interop" from the command line?
Cheers,
Robin.
Hi,
I recently profiled my C# app with Intel's VTune.
A sample based profile revealed that over 50% of the clockticks are spent in mscorwrks.dll, executing mainly the following methods:
GetCompileInfo
CoInitializeCor
CoEEShutDownCOM
CorExeMain
DllGetClassObjectInternal
Does anyone know what...
Hi all,
Has anyone else noticed the differences in values returned by string comparison in C# and Java?
C#: Java*:
"1".CompareTo("2"): -1 -1
"b".CompareTo("a"): 1 1
"ant".CompareTo("art"): -1 -4...
Got it!
The solution is of course:
x >>> y; becomes (uint) x >> y;
If your x is a constant negative integer, you'll need to do:
unchecked{ (uint) x >> y; }
Best Regards,
Robin
Hi all,
I need to perform unsigned bit shifting on integers in a C# program. In Java you can do this with the >>> operator. There's no such operator in C#. Any ideas on how I could implement it?
Cheers,
Robin.
Hi all,
I'm trying to extend the Image class, but my constructor keep causing the following error:
error CS0122: 'System.Drawing.Image.Image()' is inaccessible due to its protection level
I'm assuming it's something to do with Image being abstract or not having a public constructor.
Here's...
Hi all,
Anyone know what the C# equivalent of Java's getRuntime().totalMemory() and getRuntime().freeMemory() would be?
The Process class has a load of memory related properties, but I don't know which would correspond best.
Regards,
Robin.
Hi all,
In Java, you can specify the minimum and maximum heap sizes using the -Xms and -Xmx parametres as so:
java -Xms<bytes> -Xmx<bytes> class
How can this be done in C#?
Cheers,
Robin
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.