SVerhalle's Q&A profile
Windows Forms Label Color Error
I created a custom control....In this control I set a label control to: Label10.ForeColor = color.red when I place the control on the form....label10 is black....why is this happening Thanks, Trey ...Show All
SQL Server Stuck between "Failed to generate user instance" and "An attempt to attach...failed"
I wrote an application using Visual Studio 2005 beta 2 which uses a SQL Express .mdf file, included in the project, for the database. After installing Visual Studio 2005 RC and the SQL Express that comes with it (I followed all of the uninstall instructions first) I can no longer add a SQL Express database to any of my projects, nor can I open the SQL Express database in my original project. When I try either of these tasks, I get the "Failed to generate user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I read the thread which dealt with this er ...Show All
Visual Studio 2008 (Pre-release) Control -> Geometry
Hello, how do I convert control to Geometry In order to perform VisualTreeHelper.HitTest and get an IntersectDetail I need to specify a Geometry, but I I have is just my poor control, which unfortunatly is a template-based one... So I can use any of hardocded geomtries like EllipseGeometry or whatever. So, I'm looking for something: Geomtry g = MyControl.GetGeometry(); :) Thanks. There is no existing service which does this, but you can theoretically implement it yourself: Use VisualTreeHelper to walk the Visual tree of your Control. On each Visual, call GetDrawing() to get the Drawin ...Show All
SQL Server Using OLE DB Source properties in Derived Column
I am converting the contents of 64 lookup tables from individual tables (each called lookup_xxxxx) into a single LookupReference table. The individual lookup tables are my OLE DB Source objects. I want to derive the variable part of the lookup_xxxxx table name from the OLE DB Source 'OpenRowset' property as a variable and make it into a derived column (which will be the lookup Type column in the output table). For example, extract "SpeciesType" from the input source called 'lookup_SpeciesType' and put it into the derived column. I cannot find a System variable that refers to the input data source. Does anyone know how I can d ...Show All
.NET Development A question on XPath...
Dear Experts, I got a problem on updating the value of an XML node. Please take a look at the following source codes. I am trying to update the node <EmailAddress> that has a value of 'peter@test.com' to 'david@test.com' , say for example. Unfortunately, the codes always locates the first node and updates it. That is, it always locates the <EmailAddress> node with a value of ' john@test.com' . I guess there would be something wrong with my XPath. Could you please advice a correct XPath (or otherwise) that can fix this problem Many thanks for your help. Tigger A) Code fragment: string xPath = "appSetting/E ...Show All
Windows Forms VB.Net:Error Recording Can not be started
I have developed Audio Recorder(vb.net) using 'wimm.dll' in WindowsXp which automatically detects sound and starts recording and similarly pause recording. A thread in vb.net contineously running to call a dll File Function to detect sound from sound card. this is running Ok in Windows Xp manually and automatically. this program is running ok in windows 2000 when ...Show All
.NET Development Open/Read file from Solution, not from disk
I want to read in the contents of a text file, where the text file is an item in my .NET solution, not a file residing on the disk. How do I find this file For example, in my C# code, I can create a StreamReader: System.IO.StreamReader sr = new System.IO.StreamReader( )) My .NET solution has a folder for my project and all the source code files. It also has a “Solution Items” folder, with a text file in it. I want to read that text file. If you are building from within Visual Studio (which I suspect that you are) and the file is part of your project, I would recommend copying it to the output dire ...Show All
Visual C# deriving from System.ValueType?
Should I derive my objects from System.ValueType I think this would be ok if my objects consist of just value types. If it doesn't, I'm not sure what will happen. Maybe the compiler make the choice for me Thanks Jason Sorry, I'm being stupid - the compiler won't let me derive from System.ValueType!! ...Show All
Visual Studio 2008 (Pre-release) Message SomeOperation(Message input) - Proxy is messed up
In addtion to other operations in my service contract I have a operation contract which looks as follows ( see the service interface below) Message ProcessInputAction( Message inMsg); [ ServiceContract (Name = "MyContract" , Namespace = http://test.com/MyContract , Session = true )] [ DataContractFormat (Style = OperationFormatStyle .Document)] public interface IMyService { [ OperationContract (Name = "GetData" , Action = "urn:GetData" , ReplyAction = "urn:GetDataResponse" )] DataSet GetData( string mpathQuery, string sessionID); [ OperationContract (Nam ...Show All
SQL Server Upgrade from SQL2005 Beta to release Version
Hello guys. I'm planning on installing SQL2005 (developer Edition) Beta on a windows 2003 machine, and start building some applications. But I was wondering if I will be able to update from the Beta version to release version once it's released. or would I have to un-install the beta and start fresh with the release version. If so, Do you think any databases that I create now (with the beta version) will survive such a transition (would the release version have any problems opening/modifying databases created with the beta version). Thanks for any help. There will not be a setu ...Show All
Visual C++ Problem compiling a program
How do I compile my code When I open a file, it won't let me debug or run the file. And if I manage to get that, as soon as it runs, it just says: Press any key to continue... then it quits. windows.h is part of the PSDK headers which is not installed with the VC 2005 Express SKU, you will need to install it separately. Check the below link for more details on how to proceed: http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx Thanks, Ayman Shoukry VC++ Team ...Show All
SQL Server SQL Server 2005 Reporting Serivces: XML Datasource problem
Hi, I'm just starting to use SQL Server 2005 Reporting services, and need to use an XMLdocument as the datasource. I will get the xml data from a webservice and then need to bind it to the report. Here is what I am doing: 1. I created a webservice at the following location: http://localhost/myWebDirectory/myService.asmx . this webservice has a method called " GetXMLDocument" that has 1 parameter (sql). This method uses the sql statement to fill a dataset from a SQL Server database, converts it to an xmlDocument, and returns the xmlDocument. Here is a sample of the results: < xml version="1.0" encoding="ut ...Show All
.NET Development Newbie, Updating Records
Hello, I'm quite new to .Net/C# in VS2005. Having years of experience in Delphi/Vcl environment blocks me here. I've created a grid that allows me to search in data, when selecting a record in that grid i'm updating another tableadapter to select the complete details of this record. In the search only the descriptions are selected. This works fine. The data is displayed with textboxes that have databinding. I've even (by test) attached a datanavigator to the 'editing' tableadapter. Whenever i change a value in a textbox, and than press the V-ok button of the navigator, or my own button that starts a this .productsTableAdapter.Upda ...Show All
Windows Forms menustrip scrolls out of window
I'm a novice VB user and am having a problem using a menustrip. As a simple illustration of the problem: 1. Create a new VB project using the Windows Application template. 2. Drag a menustrip onto the form and dock it to top. Insert the standard items 3. Set the autoscroll property of the form to True 4. Drag some control onto the form and place it near the bottom (for instance, a MonthCalendar). 5. Run the program. 6. When the windows opens, resize it smaller in height. The scrollbars appear and the menu disappears off the top of the window. So, what I'd like to know, is how to make the menu stick at the top and not ...Show All
Visual J# JMenuBar performance broken if using heavyweight popups?
Big problem. I have a simple JApplet which contains a JMenuBar, some JMenu s, JMenuItem s, etc. It works great if the applet is tall enough to fully enclose the menus when dropped down. (That is, it draws them using a lightweight JPopupMenu .) But if the applet is not that tall, then the menu bar responds very, very sluggishly when I try to navigate among the menus with the mouse. If I click on (say) a File menu, it drops down instantly, but then if I mouse right to an Edit menu, it takes ~1 second for the File menu to erase and for the Edit menu to appear. And so on when mousing to every other menu in the menu bar. (And sporadically, the ...Show All
