microsoft.public.dotnet.framework.clr Archive - October 2001
Post a message to this list
Messages
Page: 12
CodeDom & preprocessor keywords (2 replies)
microsoft.public.dotnet.framework.clr
Does System.CodeDom describes preprocessor keywords?
Version Redirect - How? (2 replies, VIP)
microsoft.public.dotnet.framework.clr
I'm following along with an example in the O'Reily book for version redirection. I have two assemblies properly registered in the GAC AVehicles 1.0.0.0 AVehicles 1.0.1.0 I have a program called Drive.exe in another location that was originally built against version 1.0.0.0. I wanted to see how I can get it to use the newer version AVehicles assembly without rebuilding. I put a configuration file i...
Fonts from a resource? (2 replies, VIP)
microsoft.public.dotnet.framework.clr
We need (so very badly) to be able to load a font from a resource or similar embedded object (resource DLL?). There doesn't seem to be a way to load a font from any source but from a windows handle (which I presume to mean use the font that an existing window has as default), or by name. Any clues?
Perf Whitepapers on MSDN (4 replies)
microsoft.public.dotnet.framework.clr
Recently, Emmanuel, a summer intern working with us in the CLR team wrote a set of whitepapers on Performance that you may find interesting. Here are the pointers. Please let me know of any questions/comments. thanks, Mahesh Performance Considerations for Run Time Technologies in the .NET Framework http://msdn.microsoft.com/library/default.asp?url /library/en us/dndotnet/ht ml/dotnetperftechs.asp?...
perfmon values != PerfCounter vals (2 replies, VIP)
microsoft.public.dotnet.framework.clr
I'm using the PCREAD example from QuickStart (QuickStart\How Do I...\Diagnostics\Read from a performance counter) on Win2KSP2, and I'm getting different values from PerfMon on some counters. PerfMon shows the usual twitching of the hard disk for PhysicalDisk\ Total\% Disk Time; PCREAD always shows 0. This only happens for certain counters. An example is: pcread PhysicalDisk "% Disk Time" " Total" ...
How to set the Graphics Drawing Mode (ROP) (2 replies, VIP)
microsoft.public.dotnet.framework.clr
How would you set the drawing mode of the graphics object? In Win32 API, you would just call SetROP2 passing in the DC and the desired drawing mode. What is the equivalent in .NET? I want to draw column resizing line in a custom control. Muchas Gracias
ONPAINT & DRAWIMAGE (ANYTHING FASTER?) (2 replies)
microsoft.public.dotnet.framework.clr
I have a form, like Studio's start page, that is ownerdrawn. I have doublebuffering turned on and paint the form using DrawImage() to copy 2 jpg images to the graphics dc (creating a splash screen). When I move other dialogs over my start page you can see a trail of dialogs lag behind (a bit). I cannot seem to get enough speed from DrawImage(). Any thoughts? Steve PS Also, is there a DrawImage() t...
Convert System::String to char * (3 replies, VIP)
microsoft.public.dotnet.framework.clr
I have a library of routines written to use char * If I want to convert a System::String passed into the C app into a char *, how would I do this? I want to basically do this: MyClass::SetMemberString(System::String* szNew) { if (szNew){ szMember new char [szNew Length 1]; strcpy( szMember, szNew); } }
A ResourceManager problem (2 replies, VIP)
microsoft.public.dotnet.framework.clr
It is easy to include a file as an resource into an assembly: just set Build Action: Embedded Resource, without using .resx or .resource file. But how to retrieve the resource?
Assembly.Load enumeration (3 replies)
microsoft.public.dotnet.framework.clr
Is there a way to enumerate all the valid names for Assembly.Load(). e.g. all the assemblies loaded in the GAC that can be loaded without having a direct path to the DLL?
creating a 'selected' image (3 replies)
microsoft.public.dotnet.framework.clr
Hi, I'm trying to transform an image to look like it's selected. F.e. selecting a file in Windows Explorer, gives the icon of the file a more blue color. Does anyone know how to do this using the .NET framework classes? I now tried making every second pixel in the image blue, but this really doesn't look like the windows explorer style. Thanks, Chris van de Steeg
assignment & reflection (3 replies, VIP)
microsoft.public.dotnet.framework.clr
Hello, I want to use Reflection to define a dynamic type and its property, and then construct one of a property Set for this property to make an assignment of a value to the property of this dynamic type in the way of : DynamicType.Property someValue; I have two questions: First one is, is it possible to implement this functionality using Reflection? Second question is, if it is possible, how to i...
CodeDOM (3 replies)
microsoft.public.dotnet.framework.clr
Any Idea on how to generate Handles Statement with CodeDOM, support is there only for Implements Statement for VB.NET Thanks, krishna
Problems with PictureBox and System.Drawing.Graphics class (2 replies, VIP)
microsoft.public.dotnet.framework.clr
I have two little problems with PictureBox and System.Drawing.Graphics class. The problems are following: 1) I have a form (say Form1) with a PictureBox box object (say picturebox) on it. The function below drawing diagonal the line over the PictureBox: void DrawSomething() { System.Drawing.Graphics Graphic null; Graphic picturebox.CreateGraphics(); System.Drawing.Pen pen new System.Drawing.Pen(Sy...
How to determine Windows group membership (security) (2 replies, VIP)
microsoft.public.dotnet.framework.clr
I have a simple Windows app. and want to determine Windows (2000) group membership. I see I can use: WindowsPrincipal.IsInRole Method (WindowsBuiltInRole) BUT, WindowsBuiltInRole is an Enumeration containing only a fixed set of Groups. How do I test for MyGroup?? Thank you in advance, David
MouseEventHandler deprecated ? (2 replies)
microsoft.public.dotnet.framework.clr
Is this delegate deprecated: System.Windows.Forms.MouseEventHandler I cannot find any document to state that, yet the intellisense do.
Delegate usage question (3 replies)
microsoft.public.dotnet.framework.clr
Hi, Let's suppose thet we want assign the same eventhandler method to two different object's two different event It's not clear for me what is the p r a c t i c a l difference between the two solution? a) button1.Click new System.EventHandler(this.OnCommonEvent); button2.Click new System.EventHandler(this.OnCommonEvent); b) EventHandler eh new System.EventHandler(this.OnCommonEvent); button1.Click...
Reflection.Emit (2 replies, VIP)
microsoft.public.dotnet.framework.clr
Hello, We have two questions related to "Reflection.Emit": 1. We have a subroutine which generate an assembly with a class. We define a property "ageProperty" for this class and a "GET" and a "SET" methods for this property in this subroutine. In the main subroutine, We generate a "anyClass" from the first subroutine and then instantiate an object "anything" of this type. But when we use the metho...
CLR equivalents for Win API GetCursorPos, GetKeyState? (3 replies, VIP)
microsoft.public.dotnet.framework.clr
I've got a little DotNet app that among other things tracks the screen position of the mouse cursor, and it's pure CLR except for the two Windows API calls to get the mouse cursor position (GetCursorPos) and to check for certain keys down (GetKeyState). I've roamed all over the DotNet framework documentation, searched on every keyword I can think of, and I can't find the CLR equivalents of these t...
a marshal-by-reference class (2 replies)
microsoft.public.dotnet.framework.clr
Hi, I have little problem when adding custom properties to winforms user control. I get following error when I try to compile code below. Cannot pass 'Kobush.UI.Math.test1.a' as ref or out, because 'Kobush.UI.Math.test1.a' is a marshal by reference class But when test1 class is not inheriting from UserControl everything works great. I wonder if it has anything to do with that UserControl class inh...
Bug in remoting (3 replies)
microsoft.public.dotnet.framework.clr
Hi All, We encountered a case that if we call a public function that contains Guid, somehow the next parameter after Guid is just like shifted to the left. For example if there's function like: public void CallMe(string szPar 1, Guid gdPar 2, ArrayList par 3List) {...} then we call it as: CallMe(szMyVal, gdMyGuid, myList); it will throw an error "It can not convert ArrayList to Guid.". Is it a bug...
Emulating IDispatch in .Net (3 replies)
microsoft.public.dotnet.framework.clr
I want the ability to handle the equivalent of the GetIDsOfNames and Invoke methods of the IDispatch interface in DotNet. In other words, in COM I would inherit from the IDispatch interface and supply the implementation for the GetIDsOfNames and Invoke methods. In DotNet what interface and methods would I need to implement to do the same thing. Any ideas... Shannon
Service stopping itself. (2 replies, VIP)
microsoft.public.dotnet.framework.clr
Hi, I'm trying to add error handling to my C# .NET service. I don't want the service to continue execution if it can't establish a DB connection during its OnStart() event. I can trap the DB connection error OK, but I need to know how I can get my service to stop itself. The following code tries to use the ServiceController class to stop itself, but doesn't seem to work. :( There is no SCM EXCEPTI...
Anybody experiences memory leaks in CLR (3 replies)
microsoft.public.dotnet.framework.clr
Hi We have developed a .net Service application ( NT service ) in C# which waits for messages on a MSMQ. When the service initially starts up it uses aprox. 9,5 Megs and 8 threads. When a message is received from the MSMQ the application increases its memory usage which is okay but it never reduces this memory size again. when another mesage is placed on the MSMQ is placed some more memory are use...
Win32 API Calls, Data Marshalling Syntax Error (6 replies)
microsoft.public.dotnet.framework.clr
i am doing some win32 api calls, and i am having some data marshalling problems. the following will not compile: Public Declare Auto Function GetDriveType Lib "kernel32" alias "GetDriveTypeA" (ByVal MarshalAs(UnmanagedType.LPStr) nDrive as string) as Long specifically, vs.net puts a litte squiqly line under the (right before the type marshalling) and says "expected identifier" i have looked all th...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com