Anton Dimitrov's Q&A profile
Visual Studio How to detect if a DebugLaunch call succeeds?
When calling DebugLaunch in the code below, the HRESULT returned is always S_OK, whether or not the launch actually occurred. For a contrived example, for any project type, create a new text file, rename it to .exe, and set it as the program to launch in the project properties. The launch will show a dialog with an error message about the file not being an executable, and the launch will fail. However, the HRESULT will still be S_OK. This would happen with all the other failures I can get VS to have in launching as well. Is there a way to find out if the launch actually worked I can’t look for mode changes, because the launch could be without the debugger. BOOL bCanLaunch = FALSE ; VSDBGLAUNCHFLAGS fla ...Show All
.NET Development Problems accessing webservice (HELP!)
Hi there, I’m accessing the Google adwords api, and am getting an intermittent error relating to the soap connection I am creating and using to fetch data from the api. The error is: System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. Now its been suggested to me that I override a method used to make the connection as follows, as its the keepalive that is causing the problem: protected override WebRequest GetWebRequest(Uri uri) { HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri); webRequest.KeepAlive = false; return webRequest; } My problem is im using Visual Studio 2005 and do not have ...Show All
Visual Studio Tools for Office Reading Excel From C#
You can read data from Excel using the JET OLEDB provider. See the URL below for the necessary connection string, and a link to a KB article with further information ... http://www.carlprothman.net/Default.aspx tabid=87#OLEDBProviderForMicrosoftJetExcel -- Brendan Reynolds wrote in message news:9226766e-a1d5-400c-8d3c-8ffc566bec50@discussions.microsoft.com... > Hi > > Can anyone help me how to read values in Excel in C# . So that Once I > read I can send them to DataBase. My excel file Test.xls in ("C:\") > > Thanks > Doss > If you are using a dynamically generated excel file then you can use the following: Excel.Sheets sheets = m_Excel.Worksheets; Excel.Worksheet ...Show All
SQL Server Unable to use SQL Express wizards to export, import
I am using SQL Server v8.0 Enterprise Manager and I have been trying to export a database and a table. But no matter how many times I try I keep getting error messages. It just wont let me make a backup of anything. Ideally I would like to make a backup of a table from within a database. Then restore it but use a different file name so I can have a sandbox with which to test something out. When using the Export wizard the destination server is local using Windows authentication. Here is the error I typically see: Error Source: Microsoft OLE DB Provider for SQL Server Error Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. Context: Error during initialization of the provider. I only have one bo ...Show All
Visual Basic VB.NET UserControl used in VB6 application
Hi. I build in VB Net 2005 an usercontrol that contains a toolstrip.On this toolstrip I add in runtime 9 toolstripbuttons.The code in which I add those buttons is: Public Sub AddButtonsOnToolbar(ByVal intNob As Integer) Dim tsButtons(8) As ToolStripButton For i = 0 To 8 tsButtons(i) = New ToolStripButton tsButtons(i).Tag = i tsButtons(i).Image = System.Drawing.Image.FromFile("D:\Work\Controale_Espot\Pictures\01.gif") tsButtons(i).AutoSize = False tsButtons(i).Size = New Size(48, 48) tsButtons(i).ImageScaling = ToolStripItemImageScaling.SizeToFit If i = 0 Then tsButtons(i).Margin = New Padding(80, 5, 0, 2) Else tsButtons(i).Margin = New Padding(10, 5, 0, 2) ...Show All
Visual Studio Team System thread counters
What is the system/thread counter Is it a count of all the threads running on the box, or of the IIS worker process threads Is there a thread counter just for IIS worker process threads What about the "number of .net clr logical threads" and "number of .net clr physical threads" counters What are those We're in the process of refactoring from ASP and VB6com to .Net. We're looking to a) understand what exactly the thread counters I've mentioned are, and b) find a counter or counters that will tell us about threads in both parts of out app. Thanks! Charlie Charlie, with the VSTS load test editor, you can see these description for any performance counter by doing the follo ...Show All
Visual C# static method - Is there any workaround?
I think most know we cannot declare a static anything in an interface. However, let's say I have this: public sealed class MyClass { private MyClass(string someText) { m_someModifiedText = someText; } private readonly static m_someModifiedText; public static MyClass Create( string someText ) { string modifiedText= ModifyText(someText); return new MyClass(someText); } private string ModifyText(string someText) { string modifiedText = someText; //do something to modify text return modifiedText; } public static string UsefulText { return m_someModifiedText; } } Now, this "sample" is just to keep it simple, but PLEASE just consider the concept rather than what the ...Show All
Visual C# dynamic asp button click doesn't work first time
Hi all, I'm creating some asp buttons dynamicly and I associated them an event handler btnDel.Click += new EventHandler (btnDel_Click); but the first time I click on the button goes to the Page_load but the btnDel_Click is not fired. Somebody knows the reason Thanks in advance. P.D.: Sorry for my english. Hi Nikunj, Thanks for you answer, but I have an asp table where I'm adding these asp buttons, so I think it's no neccesary to add them to the page (this). The question is that the event isn't firing the first time I click on the button, if I click twice it's goes ok. ...Show All
Visual Studio 2008 (Pre-release) Problem with generic list nested
I have a SOA type WCF application with netTcpBinding that uses messages (request, response) to communicate client with Server, I use entity classes (Entity) and a collection ( EntityCollection ) that inherits from a generic list ( List < Entity > ). [ Serializable ] public class Entity { private int id; public int ID { get { return id; } set { id = ...Show All
Visual Studio 2008 (Pre-release) WCF + MSMQ + Large Data
Is it a sutable approach to transfer a large amount of data via WCF using MSMQ Certainly we know such limitation of MSMQ as 4Mb. The core of the question is whether to use WCF or not Thank you. Sorin, >You will have to send the messages as datagrams and have some kind of processing logic on the service side >that will group the messages together. The best way to do this is to pass some kind of identifier as part of >the contract. speaking of; do you know if the WCF team plans to-do an implementation of the ws-enumeration[1] specification if not, then perhaps a custom channel that supports sql2005 broker architecture. regards Allan [1] http://www.w3.org/Submi ...Show All
Visual Basic Tabcontrol Question
Is there a way to change the width of an individual tabpage header The small box at the top of the tab. jb You can change the size of all of your tabs by using the tabcontrols "padding" property...for changeing the individual sizes you are going to have to try ownerdrawing the complete tab! ...Show All
Visual Basic Capture line of an exception
How can i capture the line of an exception using Try...Catch If you compile with debug mode, the line numbers will be included as part of the stack trace which is available in the Exception object. However, when compiling in release mode, those references are removed. It is still possible to add line numbers (aka Basic circa 1980). If you do that, you can reference the last line number hit with a ERL() statement (which wasn't documented between VB 4-6 but is available with .Net again) see http://msdn2.microsoft.com/en-us/library/97sx19w1.aspx . Before you go implementing this in your solution, make sure to take a look at what is really going on under the covers. I have a simple example available at htt ...Show All
SQL Server Visibility Question
I have a report that looks like the following when expanded: - Group 1 Group 1A Detail A Detail B Detail C When expanding Group 1, the report will jump to the bottom of Group 1A such that Group 1A data is not visible. Ideally, I'd like the report to jump to the top of Group 1; however, I'll settle for it just to jump to the top of Group 1A. Any ideas Thanks in advance! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Quick question regarding accessibility of 360 hardware with XNA.
Hello everybody, First of all, let me say that I think that the concept of XNA rocks, and I'm very happy that Microsoft actually released a cheap "SDK" for the 360. Secondly, has there been a list compiled of things that are off-limits to developers All I know of that is off-limits is the networking. From what I've read, I assume that the DVD drive is out and so are any system/other game files on the 360. But I can't believe that these are the only things off-limits... I mean, can we really access everything on the 360's GPU and CPU (note that I'm not talking about every register because it isn't assembly language) I think a complete list of everything that is inaccessible would really help those on the "fringe" o ...Show All
Smart Device Development Barcode Scanning in Smart Device Applications for Windows Mobile 5.0 devices
I am developing a Smart Device Application in Microsoft Visual Studio 2005 that will run on a Symbol Handheld Device (Model: MC50). I was wondering if anybody knows the class or reference or toolbox control .NET uses to handle barcode scans. I am unable to determine the barcode scan event. I want to be able to scan a barcode capture the value, manipulate the value in the application, display the scanned value, and then write the value to a internal table. Any help or suggestions would be greatly appreciated. .NETCF does not have any built-in classes to deal directly with barcode scanners. Our recommendation is to contact the hardware manufacturer to determine how and when to capture bar codes. You may be ...Show All
