13yearoldgenius's Q&A profile
Visual Studio FileCodeModel.CodeElements throws an E_FAIL ComException
Hello, My problem is with the FileCodeModel object. I want to get hold of the code model for a project item without having it appear in an open project. In order to do so, I create a temporary invisible project of the appropriate kind (csproj for .cs files, vbproj for .vb files...) and add the item to that project. Once added, the file content is parsed and the code model may be accessed through the FileCodeModel property on the project item. While this strategy works with C# projects, it fails with VB projects with the CodeElements property born by the FileCodeModel object throwing a COM exception (E_FAIL) whenever it is accessed. Note that I am still able to get an actual reference to the FileCodeModel object with the expected valu ...Show All
Visual J# Adding an Icon to my Executable
How would I add an Icon to my program I have an Icon for my Form, but I would like to add a custom Icon for the executable. How could I do this in Visual J# .NET 2002 or is it not possible Yes it's possible. Please see: http://support.microsoft.com/kb/324969 Best Regards, Lars-Inge Tonnessen Microsoft VJ# MVP ...Show All
Visual Basic save file on another have the same name :"overwrite"
hi : how can i save file overwrite on the another have the same name thanks nogchoco .. but i want to save the file with the same name and the same extention... or delete the original file and recreate it again. thanks ...Show All
Visual Studio 2008 (Pre-release) DateTmePicker control
I try to insert DateTimePricker control value (VB Net) to Sql server data base CType(DH_DateTimePicker.Value, DateTime) I received the next message: System.Data.SqlClient.SqlException: {"Incorrect syntax near '.2006'."} Can explain me the message Thanks! George If you look at the strSQL after the assignment statement, what do have in it Try to execute the same SQL statement from the SQL Server Management Console (if you're working with SQL2005) or Query Analyzer if you're working with SQL2000. Do you get an error Guy ...Show All
Smart Device Development who to send and receive data?
hi, i new in compactframework and i need to build a aplication that can send and receive information between a mobile phone using compactframework and a pc using a winsock control. i can i receive and send information in the mobile i have tryed this: Dim server As TcpListener server = Nothing Try ' Set the TcpListener on port 13000. Dim port As Int32 = 3071 Dim localAddr As IPAddress = IPAddress.Parse( "192.168.2.129" ) server = New TcpListener(localAddr, port) server.Server.Listen(1) ' Start listening for client requests. server.Start() with this code the program stucks and i can’t work with the program who can can i receive and send information in the mobile to pc ...Show All
Visual Studio DSL - Model Renaming
Hi, I have been doing some estimation about using a DSL in a project. I build a demo model and it worked fine. Now I wanna start a pilot with that and changed the model Name, the product name, the namespaces, project ... Now I notice that some files have code with the old elements name. resourceName strings in the shapes.cs file the supporteddirectiveName in directiveProcessor.cs file what is the best way to do all the renamings I also wanna chande de language name and extension, so I can see the modifications in the experimental hive (mylanguage.myextension file and mylanguageReport.tt) Do I have to make a new project and redesign all the model Hi, Did you removed the ...Show All
Visual Studio 2008 (Pre-release) Are primary keys supported which include a property that is a foreign key on another table?
Is this really about many to many I'm getting the same in nw with things like orders ==>order_details: The Primary Key in the table 'Order Details' cannot be used as a foreignKey for the relationship 'FK_Order_Details_Orders', the relationship between table 'dbo.Orders' and table 'dbo.Order Details' was excluded. Done. Here's a link (I actually typed "linq" by mistake - egad!) to the question in the other forum for anyone who is interested in following it: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1300672&SiteID=1 And, Danny, thanks for being around on the weekend to answer q's. I'm desparately trying to fix up two (now overdue) conference session PPTs that are de ...Show All
.NET Development Authenticating client using SSLStream
I have seen the MSDN sample code for implementing SSL in a TCP client/server application (http://msdn2.microsoft.com/en-us/library/system.net.security.sslstream.aspx) I then wanted to add the 'optional' client authentication piece to this sample by changing the client to use: I Added: X509CertificateCollection X509Coll = new X509CertificateCollection(); I Added: X509Coll.Add(new X509Certificate(@"c:\Projects\SSLStreamClient.cer")); I Changed: sslStream.AuthenticateAsClient(serverName, X509Coll, SslProtocols.Tls, false); it originally was: s slStream.AuthenticateAsClient(serverName); I created SSLStreamClient.cer using makecert.exe and placed it in CurrentUser.Personal and in CurrentUser.Trusted Root Certi ...Show All
Windows Live Developer Forums Identifying the internet connection speed for the server
Hi, We are developing a real estate website with mapping capabilities and in the process of estimating the internet connection speed requirements for the server. With the usual estimates for 1. Average Page Size 2. Average page loads(traffic), we are trying too arrive at the must have connection speed. The estimated page size without the VE Maps comes to 100KB. The map image size is estimated to be 300px*300px. I am not sure how I should be calculating the page size with VE Maps. Can anyone throw some insights into how the page gets constructed with the VE Maps. Thanks in advance. Hi Chan, Thanks a lot. I still have a very basic question. Should the total page size to be rendered from the web site serve ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Enlarge a object from a .x file
Hello! I am having a .x file that I use to load a Mesh. At run-time, the object is very small. I f run with the file with DirectX Viewer, the size is OK. I am using this method to load a mesh : private void LoadMesh( string filename, ref Mesh mesh, ref Material [] meshmaterials, ref Texture [] meshtextures, ref float meshradius) { ExtendedMaterial [] materialarray; mesh = Mesh .FromFile(filename, MeshFlags .Managed, device, out materialarray); if ((materialarray != null ) && (materialarray.Length > 0)) { meshmaterials = new Material [materialarray.Length]; meshtextures = new Texture [materialarray.Length]; for ( int i = 0; i < materialarray.Length; i++ ...Show All
Software Development for Windows Vista Unable to open the c:\ using create file in vista
Hi, I am unable to open the c:\ drive by using createFile in vista. The program that i wrote is file working on the WinXP and it is not working on Vista. I am using VC++.NET 2003 for my application development. Can you post your code here .So it is easy to understand why you are getting the Problem the above description is not enough to tell you the exact reason of your Problem.and more thing instead of single \ use \\ in your code. Thanx ...Show All
Visual Studio Express Editions Problems setting up AspNetProvider
Hi I am having problems setting up the AspNetProvider in Visual Web Developer Express 2005. I have successfully set up the default sql database using the following command line. (I even manually added permissions to this database) \aspnet_regsql.exe -S SERVER01\SQLEXPRESS -U sa -P xxxxx -A mrpcw However when I click on Select a single provider for all site management data then test to AspNetSqlProvider. I get the following error: Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. I've tried everything that ...Show All
Visual Basic How to wait for user's answer
Hi, I wonder if it is possible to make a window form that has the same properties than the MsgBox witch stops the code and waits for the user's to click before the code can continue. I would like to call this form to ask data from the user in a Do-While Loop. That's why the code should stop when the dialog pops up... How can I do that Thanks! Sure, show your form with ShowDialog() method: Using form1 As New Form1() form1.ShowDialog() End Using The form will be displayed until user closes it. You can put a button on that form which would also close it: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ...Show All
Visual Basic System.Configuration.ConfigurationManager.AppSettings Does Not Exist
I am trying to upgrade a VB 2003 program to VB 2005. One warning I am getting is: 'Public Shared ReadOnly Property AppSettings() As System.Collections.Specialized.NameValueCollection' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings' C:\CS\CSolution\bin\Classes\Utilities.vb 8380 25 CSolution 1) what does the ! mean in the terminology of " System.Configuration!" above 2) More importantly, in " System.Configuration.ConfigurationManager.AppSettings" I cannot get ConfigurationManager to show up as an option in intelesense. It shows as an error if I try to use it anyway. 3) I have searched help, and for the life of ...Show All
Software Development for Windows Vista In July CTP, using StateMachineWorkflowInstance to obtain CurrentState freezes workflows in that State
Dear all, I have a working StateMachineWorkflow hosted under asp.net 2.0. I have written a simple routine (shown below) to interrogate the current state of a workflowinstance: public string WfCurrentStateDescription(string WorkflowInstanceId) { // Get the workflowRuntime which was started in global.asax WorkflowRuntime wfRuntime = (WorkflowRuntime)Application[WorkflowRuntimeKey]; StateMachineWorkflowInstance wfInst = new StateMachineWorkflowInstance(wfRuntime, new Guid(WorkflowInstanceId)); return wfInst.CurrentState.Description; } I find that, once I have called this on a workflowinstance, that instance gets "stuck" in the current state and never transitions to the next state, even though code appears to get c ...Show All
