htayhlaing_win's Q&A profile
.NET Development WeakReference and TrackResurrection
I would like to understand the difference between short and long WeakReference in .Net, and in particular how they are respectively intended to be used. I think a have a clear view of the short weak reference behavior and purpose. But my understanding of the long weak reference is limited. In particular, I do not really understand the resurrection metaphor, is-it possible to re-root the reference from within the finalizer Thanks in advance, Joannes There is no safe pattern that I know of, and due to the non-deterministic, unordered finalization of objects, I doubt it's possible to design one (every obje ...Show All
Visual C# create a XML ini file
Hello, I have an application where i need to select a data from and XML file and assign this data to a variable. I would like to create a kinda .ini or .cfg file where the next time the user use the application it automatically load the previous choice so that the user doesn't need to reselect that same data. of course if a different data is needed then it should overwrite the xml.ini file which only contains the selected XML data. Any suggestion Thank you Did you try using App.Config in your application (or Web.config) with key value pairs to retrieve and store values The .net framework has inbuilt support ...Show All
Windows Forms bind to indexer
Hi, It's possible to bind to a indexer (ex: a["name"]) in VS 2005 beta2 (specially for datagridview) OK - you may be looking for something like the sample below - it takes virtual properties from a "model" and presents them to the DataGridView as "real" properties. It involves implementing ICustomTypeDescriptor - and although a bit complex this is extremely powerful (and how ADO.NET does a similar thing). It should be fairly simple to adapt your Entity type to this: class EntitySample : ICustomTypeDescriptor { Dictionary< string , object > ...Show All
Microsoft ISV Community Center Forums Defining a range according to the number of responses
Dear all, I'm a new user of Visual Basic (version 6.3) and need to write a Macro for use in Excel. I need the Macro to calculate Rank values for an unpredictable number of scores. The number of scores that need to be Ranked will vary and I don't know how to incorporate this variation into the Visual Basic Macro. In my current spreadsheet there are 11 scores (Sorted in descending order) in column DS (cells DS2:DS12). The Visual Basic code is as follows (DT is the column where the Rank values will be sorted): Range("DT2").Select ActiveCell.FormulaR1C1 = "=RANK(RC[-1],C[-1],1)" Selection.AutoFill Destin ...Show All
Visual C# How to convert the string to byte in c# ?
hello C# gurus, i am trying to convert string to byte using this code, but it gives error pls help me.. public static byte [] StringToByte( string InString) { string [] ByteStrings; ByteStrings = InString.Split(" ".ToCharArray()); byte [] ByteOut; ByteOut = new byte [ByteStrings.Length-1]; for ( int i = 0;i==ByteStrings.Length-1;i++) { ByteOut = Convert.ToByte(("0x" + ByteStrings )); } return ByteOut; } The easiest way to convert a string into a byte array is to use the GetBytes() method of an instantiated text encoding class, consider this example: ...Show All
Visual Studio Express Editions sendkeys and focus
Ok i got a bit of a prob. i'm tryin to make vb type in a webbrowser thing tht i got onscreen in a vb form. my friend suggested send keys but you have to set a focus to the webbroweser or somethin like tht. i tried everything he's said but i've had no luck. can anyone out there help me if u didn't get tht, i want vb to type in a webbrowser bit which is in my form when i click a button. ok a bit of an update here. i tried what my friend said again except with a textbox. tht worked. But i tried the exact same thing except with my webbrowser and it doesn't work. Why not and how can i fix it so it will ...Show All
Visual Studio Express Editions VB Express with Office
I just downloaded VB Express (thanks, Microsoft! ), and was wondering if it has the capability to interface with Office, as its big brother, VB .net, does. My primary development language is VBA (mostly Excel and Word, some Access), but can see the flexibility in using stand-alone Windows apps with Office. Is MS planning on offering VB Tools for Office, as big VB has Try http://uk.builder.com/programming/windows/0,39026618,39283157,00.htm . This works for Express aswell. ...Show All
Visual Studio Can I use vss 2005 beta with vs.net 2003?
Can I use vss 2005 beta with vs.net 2003 Will vss 2005 beta2 be standalone and be licensed as just one product LuisValencia wrote: Can I use vss 2005 beta with vs.net 2003 Yes, but remember VS2005 is a beta so you should not install it on any important system Will vss 2005 beta2 be standalone and be licensed as just one product I'm not sure I understand the question. Visual SourceSafe 2005 will be available as part of the MSDN Premium package http://msdn.microsoft.com/howtobuy/vs2005/editions/pro/ According to this web page Visual SourceSafe will also be sold separately so you can use it with other Visua ...Show All
Visual Studio Team System Keyword expansion in TFS source control?
Does Team System source control support keyword expansion I'm not seeing it in C# file I've checked in - is there an option somewhere that I need to track down How mind-numbingly lame. Even toy SCC systems have keyword expansion, and have had it for decades. I reiterate my earlier claim - TFS source control is cool but unfinished - and looking more and more unfininshed every day :( ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DX sdk 2005 october and vs2005
As far as I can tell, the october version of the sdk should have support for net 2.0 and as such is updated for vs2005. The question is then why the installer can still not recognize that you have vs2005 installed and thus let you add the visual studio integration. It seems that you need to install BOTH vs2003 and vs2005 to have this integration. If you do this then you (that means I) experience that the shader debugger when run from debug/directx/run with dx debug, does compile the project but does not start it. When running the application without debug and attaching the shader debugger, it complains about missing debug info. Why thi ...Show All
Visual C# Excluding files from release mode?
I have a couple classes (one per file) that are derived from abstract base classes that are only there to give me easy unit test access to some math functions in the base class. Is there a way I can exclude them from a release build since they aren't used except by the unit test project You can try surrounding your class file between #if DEBUG and #endif pre-processor statements. The DEBUG symbol isn't defined in Release mode, so effectively your class won't be included in Release mode. ...Show All
Visual C++ NAFXCWD.LIB
Now i am using microsoft visual C++ but i need the NAFXCWD.LIB that required in my project is that have any way to alternative or to solve this problem because i don' t have the license of Microsoft Visual C++ 6.0 Pro Edition I get this every now and again. Usually I get it when I switch to/from MFC or threading models. It's a real pain and would be nice if Microsoft fixed it. Check this article out on ways to fix your project: http://support.microsoft.com/default.aspx scid=kb;en-us;q148652 . Let us know if that works for you. ...Show All
Smart Device Development Changing the image of a picure box at run time!
Hi, I am using C# and I want to set the image of a picture box control at run time. I just want to be able to pasrse the picture box a string (path) to any image. (Images are stored in a a folder on their own - idea is to optimise performance). Is this possible Thanks in advance. Create a Bitmap object using the path to the appropriate image file and assign it to the Image property of the PictureBox. string fileName = "<place full path to image here>"; pictureBox1.Image = new Bitmap(fileName); ...Show All
Visual C# How To called Managed Code from Unmanaged Code ?
Hello, I want to know that is there any mechanism by which i can call my managed code(DLL which i developed using C#) into Unmanaged Code (Means my VC++ Application). Ur viewed Welcomed (prakash_paghdal@hotmail.com) Thanks in Advanced.... Hi Prakash, I have shifted your thread to the C# General forum since that's the right forum for your question. Generally you can register your man ...Show All
.NET Development How to count and retrieve the number instances of current process
Hi, My requirement is to count and retrieve the number of instances of current proces. I am opening Internet explorer with 5 instances. I want to retrieve the url address of each instance in vb.net. Is it possible Regards, Helan you may use the System.Diagnostics namespace and use the Process.GetProcessesByName giving it the instance name, which returns a collection of processes with the given name so internet explorer is usually known as iexplorer you can then count the number of instances of a particular application returns by using the .Length property on the number of instances return ...Show All
