Jim_SE's Q&A profile
Windows Forms Add/Insert Items to a ComboBox
In asp.Net I do it like this: DropDownList1.Items.Insert(0, New ListItem("Display Text", "Value")) I need to use the add and insert methods of the windows forms combobox to add both the Display and value items to a combobox. I know both methods accept the Item index and an object but all the examples I have seen just use a display string as&n ...Show All
Visual C++ using or not using namespaces
this work : #pragma once #using <mscorlib.dll> #using <System.dll> #using <System.Windows.Forms.dll> using namespace System::Windows::Forms; __gc public class C_SimWindowForm : public Form { public: C_SimWindowForm(){ MainMenu* teste = new MainMenu(); }; }; and this dosent work: (why ) : #pragma once #using <mscorlib.dll> #using <System.dll> #using <System.Windows.Forms.dll> __gc public ...Show All
Visual C++ Connect/use databases, using the lowest level API possible?
I would like to know what is the most basic (I don't mean easy; I don't wish to use .net) way to connect and use an SQL (and/or Oracle...) database using C/C++, can anyone point me in a direction please I simply cannot find any sort of API on the internet! Don't database providers other than mySQL want people programming apps that access them Thanks in advance!! http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_dataaccess.asp That shows all of the data access tools available for native windows apps. These cover Sql Server, Jet and Oracle. ...Show All
SQL Server Database restore to new database
Hello all, I am using SQLDMO to try and restore a database to a 'new' database. I am using the relocatefiles property and setting it correctly, but when I restore I always get the error: "[Microsoft][ODBC SQL Server Driver][SQL Server]Logical file 'OLDDATABASENAME' is not part of database 'NEWDATABASENAME'. Use RESTORE FILELISTONLY to list the logical file names. [Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE is terminating abnormally." My code is set up like this: restoreObject.RelocateFiles = "[oldDbName],[C:\newDbName.mdf],[oldDbName],[C:\newDbName.ldf]"; Any ideas Can I assume the log ...Show All
Visual Studio 2008 (Pre-release) ListBoxItem selectable by right mouse button?
Hi, I've added a ContextMenu to a ListBox. The notion is to have the right click on a ListBoxItem select an item and then present a context menu specific to the selection. Default behavior of ListBox is to select a ListBoxItem by the click of the left mouse button. Can a ListBoxItem be selected by the right mouse button Many thanks in advance, Rana Rana - True, but I can think of a number of other situations where I would want to know the scroll offset, or the first visible item in a scrollable ListView. I tried iterating through the ListView items checking "IsVisible" ...Show All
Visual Studio 2008 (Pre-release) Release Date
Does Microsoft have a time frame for the release Hi John, As you know,WCF is part of winfx winfx release date=Vista release date According to press notes,Vista may be available to customers in Jan 2007(Depends on beta2 feedback) http://msdn.microsoft.com/windowsvista/default.aspx -Thank you Madhu ...Show All
Windows Forms Results do not display in List Box
I am using Visual C#.Net version 2003. A Form is created with a List Box, List View and a button to populate the lists. Clicking the button should produce the output in both lists. After clicking the button the text does not display in the List Box but will display in List View. This works fine on PCs that Visual Studio.Net was installed prior to XP SP2 - it displays in both lists. On PCs where Visual Studio.Net was installed after XP SP2 I have the problem. Any ideas Thanks Sample Code: using System; using System.Drawing; using System.Collections; using System.ComponentModel; ...Show All
Visual Studio VS2005 RTM Help can search but does not have contents or index
I have the RTM of VS2005. I can do a search either on the web or locally, but I have no table of contents or index. I can't seem to find any documentation on how to fix this. My install was on a clean machine that never had any beta code on it. I uninstalled and reinstalled to no avail. There should be some command to generate an index and table of contents. It looks like the files are there (but I am not an expert on VS help files). Thanks, I have both VS 2003 and VS 2005 help working properly. My solution was to uninstall both versions, all MSDN, SDK, and third-party controls that use Help 2.0. I then reinstalled in this order: VS 20 ...Show All
.NET Development Soap Serializer does not support serializing Generic Types.
I tried to serialize an object contains list (List<>) of objects and I got this exception: Soap Serializer does not support serializing Generic Types : System.Collections.Generic.List. It works fine with the BinaryFormatter. That is correct. We have decided not to invest in any significant new feature work for the SoapFormatter in Whidbey. -- Eugene Osovetsky ...Show All
.NET Development .xsd ordinal
Hi, Using Strongly Typed dataset, I would like to refer to a column. This is what I am doing at present: //dsEmps is the .xsd EmpBusRule.EmpService.dsEmps employeeDetailsData; int intEmployeeIDColumn = employeeDetailsData.Employees.Columns[0].Ordinal; int intFirstNameOrdinal = employeeDetailsData.Employees.Columns[2].Ordinal; My intention is to use something like : int intEmployeeIDColumn = employeeDetailsData.Employees.EmployeeID.Ordinal; int intEmployeeIDColumn = employeeDetailsData.Employees.FirstName.Ordinal; If I do this the the compiler error is: 'EmpBusRule.EmpService.dsEmps.EmployeesDataTable' does not contain a definitio ...Show All
Windows Forms Clickonce error when installing
I have tried to use the clickonce and it works fine for me. I am running IIS on my machine and I get no problems. Neither do other people on my network. Other people outside the network get problems though. A message appears saying that the "application is improberly formatted". I published the application to a host outside of my network and now I also get the error. What is the problem and how can I solve it If you need the error file then I can upload it. Thanks Jon Did you change the installation URL on the project properties - Publish tab to http://www.mydomain.com/etc ... or is it ...Show All
SQL Server Function that returns a table
I have a function that returns a single row table with two columns: dbo.Fun1(@param1) : colA and colB I tried to create a stored procedure that use this function: select col1, col2, dbo.Fun1(col1) from table1 The result is : Invalid object name 'dbo.Fun1' There is no join between table1 and Fun1, how can I select the both columns of Fun1 Thanks in advance. Long You are trying to use a table-valued UDF like a scalar UDF which is incorrect. You can use a table-valued function only in the FROM clause or as a table source. In any ca ...Show All
SQL Server SMO
hi everybody, I want to add the Microsoft.Server.smo.dll to my VS 2003 .net project. However, when I try to do just that, I get an exception (A reference to Microsoft.SqlServer.Smo.dll could not be added. this is not a valid assembly or COM component etc). Any idea Ozbourn now let me put this way i have visual studio 2003 and i have also installed Framework 2.0 I have installed SQL Express 2005 and i want to build an application on VS 2003 which uses SQL Express 2005 what are the requirment ...Show All
Software Development for Windows Vista Designtime experience in Workflow designer Control Sample
Hello I have used the sample in my own application, and I am very happy with it. However, I don't understand how the designtime experience comes into play - In the visual studio designer, there are little red blobs that appear when the validations fail. When I put in my own validations on my custom controls there is no designtime experience like this. Is there anything one can do It would add the icing on the cake. It would also be useful to have the propertygrid select the offending property, like is the case in VS. Best Regards Peter Villadsen Hi Peter, Are you noticing this when you don't set a property that you have deemed as "requi ...Show All
Windows Forms All Green Lights and No Critters
I have installed 1.2 Terrarium on 2 machines of mine. (Behind a firewall, port 50000 opened and NAT support checked) All lights are green but i dont get anything coming into my terrarium. I have this thing running for at least 24 hours so i know it isnt just a shortage of critters. Something else has to be wrong, but nothing is showing a ...Show All
