BillH's Q&A profile
.NET Development Unload/unbind an assembly
I have a question with respect to loading assemblies and what overhead there is if I continue to load new assemblies. What drives this question is that I have a script engine that loads VB or C# source files, builds a temporary assembly and then loads that assembly and then starts execution from a known interface. Once I'm done with the assembly I would like to release/unload/unbind the assembly and remove the temporary files. I want to do this because I assume that the assemblies are taking up space in memory and need to be released. Is this so and if it is so how do it I've answ ...Show All
Windows Forms Events Handling Determination
Hi all, How can I know that a specific event handler has been already registered to listen for a specific event, for example How can I know that the following event handler registration has been already registered so that I can avoid duplication with the event registration. myDataTable.ColumnChanged += new System.Data.DataColumnChangeEventHandler(myDataTable_ColumnChanged); And if a specific hand ...Show All
Visual C# What is the technique to read data file from Remote Machine??
hi, what is the technique of read data file for example txt file from remote machine on network.. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=466312&SiteID=1 see this article of making sharing folder to be help for me..but not usefull i think..,do you have an idea thanks ...Show All
Windows Forms Composite Control Child Docking
Hi! I have a composite control which inherits from System.Windows.Forms.UserControl and uses ParentControlDesigner so I can use it as a container. At the top of my control I have a panel which acts as a "header" of sorts. Below the header is just client area to hold the child controls. It seems to work just fine with one exception.&n ...Show All
Windows Forms Possible C# .Net bug
I am using a rich text box to populate sections of a document from a database. I am also dynamically building tables with rows and cells with in the rich text box. Everything seems to be working well except for sentences that are bigger than the cells. Instead of the cells expanding to fit all of text, it allows the text to run out of the cell. My question is, is there a way to have the rtf cell expand to fit all of the text I opened the rtf code in WordPad and it worked fine, but it still doesn't work in my rich text box project. Any ideas of what I need to do to make it work in ...Show All
SQL Server Can't attach database
HI all, I'm trying to move a mdf from a dev machine onto a production server and when I try to re-attach I keep getting the following error " ...the mdf file is not a primary database file" ...and it won't attach. It's SS2005, does anyone know why this error occurs. Thanks Thanks for the prompt Euan, I just found out the database wasn't detached properly, they just burned it onto a CD directly!..hopefully the correctly detached one will be OK. ...Show All
Windows Forms Inherited forms
I'm working in C# and have a bunch of similar forms that let users do updates to a DataSet with a master-detail type of interaction. Since they have the same basic elements (save button, cancel button, load DataSet funtion, etc), I thought these should all go into a base class and then have each individual form visually inheit the base form ...Show All
Visual Studio 2008 (Pre-release) WPF in MFC App
hi all, I am experimenting adding WPF controls to an existing MFC app. Everything seems to work fine except that everytime i make changes to the WPF control xaml, the hole MFC app recompile itself. I looked at the sample app in the handon lab, and it does the same thing. Is there a way to get around this jz Hi, This usually happens because of IDE detecting that a piece of code that other code depends on has been changed. Are these two projects One project with several files How does MFC code knows about WPF control #include, added reference on a project level Nikol ...Show All
Visual Basic Issues with Express Registration and Activation
Now that Visual Basic 2005 and Visual Studio 2005 has shipped the final release, we have a new home for setup and registration issues for VB Express. Please direct all setup, install/uninstall, and registration issues to this forum: Installing and Registering Visual Studio Express Editions Thanks, Paul Hi, After may tries, over many days, I was able to finally register (Monday), but I have not yet recieved an email with a link to the online books. Should I wait longer, or is there another way to access the online books Thanks much Bill ...Show All
.NET Development Changing label.font.properties as runtime
I want to be able to change the properties of a labels font at runtime e.g. bold or size, but the properties are read-only How do I change them Any ideas Thanks ...Show All
Windows Forms Using ListView SelectedIndexChanged Event to Show Forms
I have a ListView called TrainingListView that has a collection of 12 items. Each item represents another form that I would like to show if the user clicks on it. My problem is that the items in the collection don't appear to have a click event, so I need to use the SelectedIndexChanged event as workaround to get the same functionality. I've been struggling for the last several days on the code to get the SelectedIndexChanged event to open the appropriate form based on the user's choice. I listed the code below for the first two items in the collection. My problem seems to be in the syntax for the index value of the item in the collectio ...Show All
.NET Development Dictionary, StringDictionary, Hastable, ... and NameValueCollection - When to use which
There are many options like Dictionary, StringDictionary, Hastable, NameValueCollections and ... The purpose of some are clear like SortedList, rest can be used interchangeably. Hybrid is also kind of clear along with ListDictionary and so is Hashtable. Is there any documentation, which can suggests which collection/dictionary should be used in which scenario Improving .NET Application Performance and Scalability - Chapter 5 — Improving Managed Code Performance. Also search for "Collections and Data Structures" in MSDN. ...Show All
Windows Forms Can you have a My.Settings scoped to Application and changed at Runtime?
I want some of my settings to be scoped application but allow changes at runtime. Can this be done The example is I have a database location that only needs to be entered once for the machine, it doesn't have to be entered for each user on that machine. Regards, Michael Proctor I have to admit I was confused at to why Microsoft made the Application setting read-only, you have put a perfectly valid explanation with permissions, makes sense. Thanks for your input ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Transform error
I have created a simple mesh picking code and placed it under my mouseup event, here is the block of code for ( int i=0; i<50;i++) { //intersection information IntersectInformation closest; //the near vector Vector3 near; //the far vector Vector3 far; near = new Vector3(e.X, e.Y, 0); //the mouse coordinates far = new Vector3(e.X, e.Y, 1); //the mouse coordinates near.Unproject(sampleFramework.Device.Viewport,sampleFramework.Device.Transform.Projection, sampleFramework.Device.Transform.View, Matrix.Translation(MapX , MapY , MapZ )); far.Unproject(sampleFramework.Device.Viewport, ...Show All
Visual Studio Tools for Office specified cast is not valid error when tryning to create new word template project
hello, i am trying to create new word template project in VS 2005 this is after I created few word project on the dev computer, and done some deployment practice on the same computer like : set framwork security, using publish wizard and setup project and such things. Now every word project(document or template) I am trying to create I getting this error: specified cast is not valid and the create project failed if it is excel project everithing works fine. any Suggestions thanks itzik Hi, I cant pinpoint what the issue is but there are some things that can be tried. Can you make sure that Word is not active ...Show All
