Leonid Vaner's Q&A profile
Windows Forms embedding default event handler in derived UserControl class?
Hi, I'm new to .Net, and was wondering if the following is possible: I have created a template user control that has a standard toolbar/menu and events that are raised when the buttons/menuItems are clicked. When someone derives a new User Control from this class, I want to have default event handling code embedded in the class that they are creating which will act as a sample/default handler (rather than having them create the handlers from scr ...Show All
Windows Forms How to display contents from multiple tables in one datagrid
I need to display contents from 2 tables in one datagrid. For example I want to display products and supplier infomation in one datagrid from the SQL server's northwind database, how can I do that everywhere I look, it is either display one ta ...Show All
Visual Basic Setup question
I developed an VB Windows app in VS2005, that uses an access db. I added a special folder to the setup and included the access db. The install works ok, but the user wants the db on a network share. Even if I copy the db to the network share and configure the ODBC Name to the network share the program STILL uses the local db. Furthermore if you delete the local db, then when you click on the app it runs a quick setup and uses the db's from a cac ...Show All
.NET Development char* from c code via dllimport loses last character
Hello, Im using dllimport to get a char* from a c function like this: <code> [DllImport("RasWrapper.dll")] private static extern String findIpOfRasConnection(String conn); public static string RasConnectionIP( string connection) { return findIpOfRasConnection(connection); } </code> In the C function, the char* looks as it should, but in c# it has lost the last character. T ...Show All
.NET Development Multi-threading reference book
Hi. Could anyone recommend a decent reference book for multi-threading I have seen a couple of books on amazon etc. but various reviews claim they are mostly regurgitated MSDN articles. I am building a .NET remotable Client-Server application using c#. There will be different processes running concurrently (hence the multi-threading) on which I would like to run remoting events etc. When I needed a book on remoting Ingo Rammer's ThinkTectu ...Show All
Smart Device Development Copy protection?
Hello guys, I was thinking of some ways how to protect my .net cf application from pirates, but I could not figure out something very useful. I think the obvious way to do it is to use keys. The customer will buy the application and you will send him the key generated for his Owner name for example. My application will check if it is OK and then it runs. But the potential cracker could just disassemble this app and create a keygen or people can ...Show All
Visual Studio Express Editions I have problem with the tutorial. not able to delete
Hi, I am a beginner in using visual basic 2005 express edition. And I went through the tutorials. But when coming to 'Connecting to an Existing Database' part, I encounter the problem which I am not able to update the changes to the database. When i tried to delete a record, the change is not made to the database. So everytime when i press F5 again, the data will be get back to the old one. I understand that t ...Show All
Visual Studio Unable to debug: The binding handle is invalid
When i try to debug a C# application I get this error: Error while trying to run project: unable to start debugging the binding handle is invalid What can i do Thanks for your answers ZAiNT, Thank you so much for your help. To test native debugging: 1) File->New->Project... 2) Visual C++->Win32 Console Application 3) F10 Thanks, Gregg ...Show All
Windows Forms Cancelling then restarting a BackgroundWorker
I am writing a windows explorer type Listview control. I'm trying to get the thumbnail view working correctly. Ive got the actual thumbnails creating ok but because it can take a while I've used a BackgroundWorker to make it run in a separate process. That works fine too. The problem is that sometimes I need to restart the backgroundWorker. for example, if the user changes to a different directory then I need to restart getting the thumbna ...Show All
Visual Studio Team System TFS Mirroring
Hi To aid check in/check out speed we have several development teams in satellite offices working with local copies of TFS. Is it possible to mirror these so every office can see all the code Hi, What we typically recommend is that one TFS server is deployed in a central location and the satellite offices all deploy an Application Tier Proxy (aka Version Control Proxy) which caches the source downloads, ...Show All
Visual Studio Express Editions Checked vs CheckState
Just curious if the following statements do the same thing and what is the difference between the properties .Checked and .CheckState for a CheckBox Me .ActiveCheckBox.Checked = CheckState.Checked Me .ActiveCheckBox.CheckState = CheckState.Checked If you have Option Strict On, your first line won't compile: the Checked property is Boolean, so it may only be True or False. CheckState, on the other hand, ma ...Show All
SQL Server SQL2005 Peer-to-Peer Transactional Repl. Table Constraints
I am researching the possible use of Peer-to-Peer Transactional Replication with SQL 2005 to improve the availability and scalability of the SQL-farm. The "Peer-to-Peer Transactional Replication" MSDN-document states: "Conflict detection and resolution are not provided. Updates for a given row should be made only at one database until it has synchronized with its peers. This can be accomplished, for example, by the application directing updates ...Show All
Visual Studio Build is being skipped
So I got my copy of VS 2005 Standard at the rollout event and installed it. I took a compact framework project produced in VS 2003 and copied it to a new directory and converted it to VS 2005. When I attempt to "Clean", "Build", or "Rebuild" the project I keep getting the message " ========== Build: 0 succeeded or up-to-date, 0 failed, 1 skipped ========== ". I tried deleting the exe's and the object files manually to no avail. ...Show All
Visual Studio Team System Branch or second workspace?
I have a simple problem I'm trying to solve, but I'm hung up on the workflow best practices with TFS version control. I'm accustomed to using copy project to move applications from my machine up to a web server. Now with things stored in the repository it's unclear the best way to move them (promote them) through the rest of the life-cycle. Suppose I have a new team project....I've added my solution everything works fine. I checkout some files, ...Show All
Visual Basic Extracting Variables from Strings and Event for a Tabchange in a TabControl
I have a program that is meant to take a user defined string (ex. x2 + 2x + 1) and divide it, and then store those values (the coefficents of x); there is a practically indefinite number of numbers in the coefficient. I've looked at the String.Split Method, but I don't understand it very well nor do I believe it's very practical when you have to keep splitting each variable to get the coefficient. Is there an easier way to the the opposite of ...Show All
