I have heard that if you are a MSDN Pro or greater subscriber, MS has talked about doing an August distribution of the Tech Preview materials they gave us at the PDC. Not sure if this will actually happen or not. Anyway, MS should start the beta program sometime this fall, say October-ish.
Keith Hill
Posts
-
.NET rocks -
Cool or UncoolThat code was inserted by the VS wizard for a "C# Windows Application". As I understand it, C# suffers the same problem as Java. The destructor or finalize method is not called in a deterministic fashion since Garbage Collection is not deterministic. So the docs recommend adding methods with names like Dispose() or Close() if you are holding onto non-memory resources that should be freed immediately when they are no longer needed as opposed to waiting for the GC to run.
-
.NET rocksI totally agree. I have been playing around with the NGWSSDK, C# and VS.NET since the PDC and I really like what I see. Of course, the performance isn't up to snuff but this is pre-Beta after all.
-
Cool or UncoolWAH! What happened to my spaces?
-
Cool or UncoolC# is definitely cool to program in. BTW, you won't need to drop back to VB to do UI. C# (as well as managed C++) gets the same RAD support that VB has in VS.NET. Check out the following code I wrote in about a half hour to display three jpg images. Note, this code probably wouldn't be too hard to duplicate in VB, but try this in VC++ using Win32 API :-) NOTE: the use of XML comments. The compiler supports stripping these out into an XML document like so: all: MyPhotoAlbum.exe MyPhotoAlbum.exe: MyPhotoAlbum.cs csc /debug+ /doc:MyPhotoAlbum.xml /t:winexe \ MyPhotoAlbum.cs /r:system.dll \ /r:system.drawing.dll /r:System.WinForms.dll \ /r:System.Data.dll /r:Microsoft.Win32.Interop.dll namespace CSharpApp { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Collections; using System.ComponentModel; using System.WinForms; using System.Data; /// /// Class representing my application's main window /// public class MainWindow : System.WinForms.Form { /// Required designer variable private System.ComponentModel.Container components; private System.WinForms.Button m_button3; private System.WinForms.Button m_button2; private System.WinForms.Button m_button1; /// /// IVar to hold reference of bitmap to paint /// private System.Drawing.Bitmap m_bitmap; private System.Drawing.Bitmap m_bitmap1; private System.Drawing.Bitmap m_bitmap2; private System.Drawing.Bitmap m_bitmap3; private System.Drawing.Point m_orgBitmap; public MainWindow() { // // Required for Win Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after // InitializeComponent call // try { m_bitmap1 = new Bitmap(@"c:\images\A.jpg"); m_bitmap2 = new Bitmap(@"c:\images\B.jpg"); m_bitmap3 = new Bitmap(@"c:\images\C.jpg"); } catch (Exception e) { MessageBox.Show(e.ToString(), "Bummer!", MessageBox.IconHand); } m_orgBitmap = new Point(10, 60); } /// /// Clean up any resources being used /// public override void Dispose() { base.Dispose();
-
How does a Client know if there is a COM server that belongs to itFirst you need to know either the CLSID or the ProgID of the server. If you know the CLSID then convert the CLSID to a string using StringFromCLSID. Then attempt to open the following registry key: HKEY_CLASSES_ROOT\CLSID\"Your server's CLSID as a string" If the key exists then the server has been installed on this machine. If you have the ProgID, you can use CLSIDFromProgID() to get the CLSID and then proceed as indicated above. The other option, is to use CoCreateInstance() to see if you can actually create the object and then shut it down. However, that might affect performance of your app unacceptably.