Software Development Network Logo
  • Windows Forms
  • Microsoft ISV
  • Windows Vista
  • Visual C++
  • Visual FoxPro
  • Game Technologies
  • Visual Studio
  • Visual Basic
  • VS Team System
  • Smart Devicet
  • Audio and Video
  • .NET Development
  • IE Development
  • SQL Server
  • SharePoint Products

Software Development Network >> mnelson's Q&A profile

mnelson

Member List

Deraldo
Olle Gustafsson
Hobb
Al Christoph
r3n
Steve Jackson
Darren Tao
ChitownDotNet
Dilmer
ridvan
Prince of Dhump
thelonesoldier
vitich
Andrew Raymond
harvard_isaac
Tej62007
CSCNavy
Meadensi
Lifebook
guywwe
Only Title

mnelson's Q&A profile

  • .NET Development What is the right way to instantiate/dispose a Control?

    Hi, In Windows Forms application I am trying to dynamically create and dispose Controls. However, while testing it I ran into the fact that the way I do it leads to a stable GC Handle leak (one per instance). Here is the code that seems to produce a leak: for ( int idx = 0; idx < 5000; idx++) { Control tmpCtrl = new Control (); tmpCtrl.Dispose(); tmpCtrl = null ; } This results in exactly 5000 extra GC Handles (according to performance counter). What am I doing wrong Thank you, Leo. Thank you, nobugz. I already posted the question on this group: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=986071#986071&SiteID=1 Is that the right g ...Show All

  • SQL Server ODBC SQLFetch problem

    Hi, I have ODBC code reading data from a XLS file. It opens the file, reads the sheets and columns available, then presents a dialog to allow the user to select which columns are to be used to load the data. All of this works, almost. It is a simple "Select A,B,C FROM Sheet1" using SQLExecDirect When using SQLFetch it always skips the first row of data. Thanks, any ideas would be great. Keith Hi, SQLExecDirect does not change the bind buffers. Have moved the SQLBindCol calls before and and after the SQLExecDirect call both have the same effect. I also used SQLGetData instead of SQLBindCol and they also always miss the first row of data. Keith ...Show All

  • Visual C++ compiler switches

    I am working on a new project that has a lot of regular DLLs. I wanted to find out when and where a particular DLL got loaded. Is there a compiler swicth that would list that in output window If not, where should I set my breakpoint to iterate the flow Is there an easy way of doing it BTW, It got loaded in the very beginning. My guess is that there are some global variables. But I don't know which one since there are too many classes in this particular DLL. Thanks The error is "Error loading type library/DLL". I guess it is still a managed DLL even though regasm created an entry in the registry. My question is that how do I use it in C++ program after I regasm the C# Dll into COM ...Show All

  • Visual Basic How to zoom in picture box??zoomin and zoom out

    any ideas how to zoom a picture at certain X&Y of a picture box with a click of mouse First set the size mode property to zoom: Me . PictureBox1 . SizeMode = PictureBoxSizeMode . Zoom Then use the mouse events of the picture box to size the picturebox with the users mouse movement.....this will cause the picture to zoom in and out.... ...Show All

  • Connected Services Framework Message Routing doesn't work

    Hi, all. I defined a very simple ASP.NET Web service as follows (namespace omitted): [WebService(Namespace = " http://tempuri.org/ ")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : WebService { [WebMethod] public void Log(string log) { using (StreamWriter writer = File.CreateText(@"C:\log.txt")) { write.WriteLine(log); } } } The session manifest is as follows: <Session timestamp="0001-01-01T00:00:00.0000000-08:00" timeout="30" serialize="None" routeAnyAction="true" ackOnRouteMsgToParticipants="false" xmlns:xsd=" http://www.w3.org/2001/XMLSchema " xmlns:xsi=" http://www.w3.org/2001 ...Show All

  • .NET Development Unable to cast object of type 'System.Runtime.Remoting.Identity' to type 'System.Runtime.Remoting.ServerIdentity'

    Hi, I am getting the following exception: Unable to cast object of type 'System.Runtime.Remoting.Identity' to type 'System.Runtime.Remoting.ServerIdentity') thrown when trying to access a remote object that has been created in a remote processes AppDomain. e.g. - Client remotes to a Well Known SAO (the 'broker' object). - Client requests the Uri of a 'service provider' object from the 'broker'. The 'broker' creates a new AppDomain and creates the 'service provider' object in this new AppDomain (using CreateInstanceAndUnwrap). The 'broker' then calls RemotingServices.Marshal for the 'service provider'. The 'broker calls RemotingServices.GetObjectUri for the new 'service provider' and returns it to the client. - Client remote ...Show All

  • .NET Development searching through an xml document

    I'm creating an application that needs to search through a large xml document for any text matching what the user has entered. Can anyone please tell me what would be the most efficient way to handle this as the xml file is fairly large (20mb) Many thanks It is a bit huge XML i would say. Anyway, as far as i know the XPath is a best case here. I suggest to use XPathDocument (or better say XPathNavigator) because at this size you will pay a lot for opening it as XmlDocument. Hope this helps. ...Show All

  • Visual Studio Debugging error

    I have created an C++ application with Windows Forms, ADO and SQL server 2005. Feeding in some new records I found out I need to change somthing and started debugging the code. Then suddenly I receive an error. An unhandled exception of type 'System.AccessViolationException' occurred in mscorlib.dll Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. The progran ends on a windows form designer generated line: this ->pictureBox1->Image = (cli:: safe_cast <System::Drawing::Image^ >(resources->GetObject(L "pictureBox1.Image" ))); I ran a memory test and there is nothing wrong with the memory of the computer. The funny thing ...Show All

  • Visual Studio passing date range parameters from .net windows application

    Hi! I need to pass the initial date and final date to a report from a Windows vb.net application, is there any tutorial about this i'm absolutelly newbie, i'd appreciate any help. I've already did the report and launched it without parameters from a form but can't find how to do it with a date range parameters THIS IS A SAMPLE CODE 'this one uses crystal report 8.5 Dim XFROM As Date Dim XTO As Date Dim APP As New CRPEAuto.Application Dim REPORT As CRPEAuto.Report Dim PARAMS As CRPEAuto.ParameterFieldDefinitions Dim XSTRINGDATE As String Dim XSTRINGDATE2 As String XFROM = 'your start date in here XTO = 'your end date in here XSTRINGD ...Show All

  • Visual Studio Express Editions Registry PW

    I was wondering is there is a simpla way to save a PW to the registry and keep it there.So the next time the program is used it will only start with that PW from the registry, Also to set the default PW when its first run on the PC. Any particular reason why you want to write to the registry and not to the application configuration file - suitably encrypted. You'd be wise to encrypt it even if you write to the registry and with security becoming a major issue - machines now often prevent users other than admin's writing to registry or specific locations - writing to the application configuration files which go with you application are almost certainly guaranteed. So using the registry to do anything may be more problematic when ...Show All

  • Visual Studio Express Editions FindNode.... not found...

    Hi folks, I am messing around with treeviews and listviews, and I am missing something. In the documentation I encounter commands like FindNode, TreeNodeConverter, ConvertFromString etc. But I cannot get it to work. In the sample provided by MS (below) it results in the errors like "FindNode is not a member of "System.Windows.Forms.TreeView". Also the parameters like ValuePath are not found (not member of treeNode). I tried to import the namespace mentioned, but it is not "there". Have I stumbled on a difference between VBA and VS2005, or is it just "not ready yet". Searching the internet yields no proper samples... .. I intend to use the Tree- and ListView controls a lot in the project I ...Show All

  • Visual Studio 2008 (Pre-release) Problems and questions: ResourcesDictionary, styling Expander, setting width/height using % values

    Hi!, I'm having some problems and questions with/about XAML. First the problem with ResourceDictionary. I created a file called "XamlResources.xaml" with some styles in it and now I'm trying to "include" it to the MainWindow.xaml using this code (which I found from MSDN documentation): <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="XamlResources.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> However, this results to an error "Value 'XamlResources.xaml' cannot be assigned to property 'Source'". What's wrong The XamlResources.xaml is in the same ...Show All

  • Visual C++ unresolved link when using template class

    Really new to C++ so please be gentle with me on this one. When I try to compile the following code, I get 4 unresolved link errors. Note that I have three files in my project, "Sample.h", "Sample.cpp", and "Main.cpp". //Sample.h template <class t> class Sample { public: Sample() ; ~Sample() ; } ; // Sample.cpp #include "Sample.h" template <class t> Sample<t>::Sample() { } template <class t> Sample<t>::~Sample() { } //Main.cpp #include "Sample.h" void main() { Sample<int> Sampleint; Sample<float> Samplefloat; } An example error is as f ...Show All

  • Visual C# C# threading issue

    Ok, I'm having a bit of trouble with this one. Can somebody help me out and perhaps give me a better idea Problem: In a nutshell, I want to synchronize several different threads but can't. One thread, we'll call it A, produces other multiple threads, B,C, and D. These threads execute asynchronously with A. B,C, and D will synchronize with each other, but not with A. A creates these threads and moves on to do other work, but requires B,C, and D to continue. It executes a wait on a eventwaithandle that only B,C, and D can signal (this eventwaithandle is encapsulated inside of a class. There is only one object of this class used by all of these threads and the primary thread. So they signal the eventwaithandle in this object, but the signal ...Show All

  • .NET Development How to move the DB of my application and not die in the attempt

    Hi, I just finished my first application in C# that includes access to a DB. Everything (VS, code, SQL Express, DB) is on my computer. Now I would like to install the application in my coworker's PCs and have them all sharing the same database. What do I need to do - Should I install SQL in the server or just the DB - What files do I copy from my PC to the server - To change the connection is enough to the VS Database explorer, browse and find the new connection, hit the test connection button Sorry for all these questions. I did the SQL part using the VS Wizards, and now I'm completely stuck to do the DB related changes and have everybody sharing the same DB. Thanks, Isa ...Show All

©2008 Software Development Network