aharuray's Q&A profile
Visual C# The "Target" property is reserved, and cannot be modified.
Can anyone explain this error message. It first appeared when attempting to build a project from a command line. It now appears anytime I attempt to create a new C# Windows application. Peter, Thank you for taking the time to actually read my question. As I said, simply creating a new project causes the error. It turns out that we had an environment variable named "Target" in the system. Removing that cleared up the problem. Frank ...Show All
SQL Server Data retrieval is much slower in RS than in management studio
A call to a stored procedure completes in 13 seconds when ran from within SQL Server Management Studio. A report whose data source uses the same stored procedure can take as long as 10 minutes to run. The same parameter values are used in both the direct call and the report. The execution log says almost all of that time is spent on data retrieval. How could that be What might be the cause Did you try to just copy the exact text from the profiler (to ensure that typo's and oversights aren't an issue) Also, is the amount of system resources available possibly an issue Meaning, when running with just SQL MS, you are just using sql, but when you introduce RS, that's another program eating resources as we ...Show All
Windows Forms Using DLLs in a Windows Form Application
I'm new to Visual Studio (I have VS 2005 Standard Edition) and I'm using C++. I'm trying to learn how to code a DLL with some standard functions I use instead of including a cpp file into every project that needs it. Using the help I got a DLL to work with a Win32 project using __declspec(dllexport) and __declspec(dllimport) and by using a .def file. I know the DLL itself works. When I try a Windows Form Application I run into problems. I follow the same steps for linking to the DLL but I get errors as it can't use __declspec(dllimport). From the help files in Studio I gather because Forms apps compile using CLR:Pure I can't import the usual way, but none of the examples seems to explain what you do to use the DLLs. I've tried .def fil ...Show All
Visual Basic Closing a Form?
Hi every one, I have a problem with closing form in vb.net.I have tow forms ,form1 with botton1 and form2.I have this code in botton1 to open form2 Dim newmform As New form2 newmform.MdiParent = form1.ActiveForm newmform.Show() but the problem is I want to close form1 after openning form2. this issue was very easy in vb6 with the event form1.close but I cannot do that in vb.net. so please give your help. thanks you would pass a reference of form1 to form2 and then you can control it. To do this, you would require say, a property in form2, which you will set from form1 when you are going to show form2: //form2: dim theMainForm as new Form1() .. .. public property TheMainForm() As Form1 get ...Show All
Visual Basic Remove from Collection
I have 10 items in the listview. I have 10 Object of this 10 items in the collection. I want to loop through the collection then remove the items from listview. The index of the items is stored in the 10 objects, and static unchanged. If I use for each loop, once the items has been removed, the index of every item in the listview will changed.(when you remove an item in the listview, the next line item will get shift up a row) How am I going to fix this if using for each loop, some of them items will not get deleted. Or is it possible to do a "Do Loop" or "Backward For loop" for a type collection Here are some examples of removing items from a collection in a listview using differen constructs. It depends upon w ...Show All
Visual Studio Express Editions Creating Icons
I have been trying to create an icon and saving it with paint as "icon.ico" but it isnt accepting it other icons will be accepted does anyone know why this is happening Polarbear541 png2ico - http://www.winterdrache.de/freeware/png2ico/ will take a .png and make it into an .ico ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Creator's Club Licensing Query
If I get a Creator's Club subscription on a 360 under my gamertag, and then log it onto a different 360, will I still be able to use it on the second 360 I know that this would work for arcade games and whatever (you get a license for the 360 you bought it on, and for the gamertag that purchased it), but I can't find any proper confirmation either way about CC subscriptions in the FAQs, and only conflicting stuff in the forums, so any help would be nice. Thanks, David. That would be great it would allow you to demo your product anywhere or play your creations at a friends house! ...Show All
Smart Device Development Cannot add desktop shortcut or shortcut icon
Hello there, I am using VS 2005 to create a cab file for a handheld device. It works fine but I want it to also do the following: 1. create a shortcut on the desktop of windows CE on the handheld. I have tried to add a custom folder called Desktop or Desktop Folder inside the Windows Folder but it doesnt work. 2. Have an icon on the shortcut of my applications logo instead og the custom exe icon of windows. Thanks in advance, John. There is no concept of "Dektop" in devices. You can create your application shortcut in Start Menu or Program Files or other supported folders. To attach a custom icon you should associate an icon to your application using project properties snap ...Show All
SQL Server SSIS Configuration in different environments
Hello, I want to store each SQL Server's (prod, test, etc) connection string in XML to make deployment & configuration easy. However, the connection string must be encrypted. Does anyone have any ideas or suggestions on how to accomplish both. I know how to encrypt it but I dont think SSIS can work with it. Any help would be appreciated. Thanks Donald! I just went through the Sql Server Configuration Type and it gives me the functionality I need. Oh Yeah... You're sessions at TechEd Boston were awsome (especially SSIS Performance Tuning). Eric ...Show All
Visual C++ Run only one application
Hi, I want to create application that can only be executed once. I mean like MSN, once you have run it and you execute it once again, the previous program window will appear. Can someone please show me how to do it Thank you idos wrote: Can someone please show me how to do it HANDLE hMutex = CreateMutex(0, TRUE, _T("MyUniqueMutex")); if(!hMutex) { // Mutex creation failed, deal with that return -1; } else if(GetLastError() == ERROR_ALREADY_EXISTS || GetLastError() == ERROR_ACCESS_DENIED) { // Already running, deal with that return -1; } // Woho, this is the only instance ...Show All
Visual Studio Express Editions Changing installation drive (on VB)
Hello! I'm trying to install Visual Basic 2005 Express Edition on another drive, other than C. Thing is, the installation wizard has a will of itself and still wants 1gb of my drive C and only 80mb of the destination drive i want it to install to. How can i fix this problem without involving manual file moving Thank you If you already have another version of Visual Studio installed, you CANNOT change the destination drive. There are dependencies on components that are installed the the Microsoft Visual Studio 8.0 directory that VB Express needs to function. ...Show All
Visual Studio Express Editions Going back to Originating Form
Okay, This may seem like a newbie question, and it probable is. How does one go back to an originating form when the originating form could be one of many, many options. So for example: You have twelve forms. Each named (for simplicity sakes) Form1 through Form12. Form1 can take you to each of the twelve forms. Forms 2-5 can take you forms 6-12. Forms 6-8 can take you forms 1, 2-5, 9-12 or they make go back to themselves (From Form 6 to Form 8 and vice versa) Forms 9-12 can take you 1, 2-5, 6-8 or they make go back to themselves (From Form 9 to Form 12 and vice versa) All Forms can always go back to Form 1 (which easy enough) But if I am on Form 9 and I want to go back to 5 (an orginating For ...Show All
Visual Studio Express Editions Displaying Data from Sql database
I decided that it was time to start looking at Sql Databases and have been working through the dvd series and code and came up with a small program to practice on. I am trying to make a program that will keep track of some of our bank accounts, namely checking, savings and school fund. This is what I have achieved so far: I have created two databases, 1 for account details and 1 for transaction details. I have a form (selectaccount) with a combox that displays the account names, which I have linked to the database and is working fine, when you click on the account name it opens my second form (bankingdetails) that I want to show a list of transactions (say the latest 15/20 – maybe scroll up to more ) this form has a button to my third fo ...Show All
Visual C# using an Observer Design Pattern with a reference property
Hi, I was wondering if anyone who has used the Observer Design Pattern with a container of observers knows how to notify when there was a change to a Reference type Property's property. I have searched all over online, but all I can find is when the Property is of a Value Type. For example, check out my "TODO's" in the following code below: class Wheel { private double _diameter; private double _width; public double Diameter { get { return _diameter; } set { _diameter = value; // TO DO: How do I say that ...Show All
Software Development for Windows Vista How can a "fork" (parallel split) pattern be implemented in a WF state machine workflow?
By "fork", I mean from within a root state machine workflow, how can I initiate 2 or more state machine subworkflows, have the state machine subworkflows execute in parallel and a) have the parallel state machine subworkflows join or synchronize later in the root state machine workflow ...or b) not have the parallel state machine subworkflows join or synchronize later in the root state machine workflow (i.e. have each subflow complete independently) Are there any restrictions on the StateMachineWorkflowActivity invoked by InvokeWorkflowActivity ...in particular, are there any issues having InvokeWorkflowActivity invoke an instance of the same workflow it is being invoked from ...i.e. can the child workflow created by ...Show All
