KirkAtCenterstance's Q&A profile
Visual C++ How to trap all exceptions?
Due to bugs in my code, users experience crashes. When this happens, they get a window saying "<MyApp> has encountered an error and must close", and offers to send a report to MS. I want to have my pgm get control when one of these errors (such as an access violation) occurs, so I can create and store my own report. How can I do this I tried _set_se_translator (complied with /EHa), but this did not work, at least when I run the pgm in the debugger. If I run the pgm without the debugger, I get a JIT debugger dialog. Ben Anderson MSFT wrote: I recommend subclassing CWinApp and overriding Run() as follows: CMyApp::Run() { try { return CWinApp::Run(); } catch ( ...Show All
Visual C# ComboBox Databinding Problem
Hi, I'm experiencing some problem which I believe I should know how to solve it myself. Here is what i've done I have a ComboBox that has its DataSouce points to a BindingSource I have this ComboBox (DataBindings)SelectedValue points to another BindingSource.ID which contains the ID I would like it to focus. When I run the application, i can see the option being populated in the ComboBox without any bugs All other databound controls are displaying data without any errors Here is the problem How come it doesn't select the proper option within the ComboBox since I've databind the SelectedValue Thank you all in advanced! ...Show All
Visual Studio Express Editions Need help reading a file
I need a way to read the contents of a binary file up to a certain string of characters & then read x number of characters after that. Could someone kindly show me how Thanks... The example I gave above would read the first 100 bytes...then you could do Array . Clear ( Buffer , 0, Buffer . Length ) sr . Read ( Buffer , 100, 2) to read the next 2 bytes ...Show All
Visual Basic Question about Visual Basic 2005 connect to SQL Server 2000
I want to display two join tables information in one data grid in VB2005, how i can do that Can any one tell me There are a couple of different ways to get your desired results....however the crux of the solution is to use a "Join" on the associated fields...for exampe: SELECT test.Id, test.TheName, Test2.Comment FROM test INNER JOIN Test2 ON test.Id = Test2.TestID; Two tables test and test2 the above sql statement pulls id and TheName from the test table and comment from the test2 table where testId(from table 2) is equal to ID (from table 1) once you have created the proper sql statement then you can yous that sql statemnt as a fill command for a dataset...and then you can bind you ...Show All
Visual Studio Registering new Project Type with VS2005
Hey all: I have created a new project type based on the IronPython project example in the Sept SDK, but I am unsure how to register the new project type with Visual Studio. I found this article in the MSDN docs http://msdn2.microsoft.com/en-us/library/3xa20z3f.aspx , but I am not clear if this is what I need to do, and if it is how to do it. I looked at all of the .rgs files for the Figures project and none of them looked like what the article showed. Is there a walk-through anywhere that I can follow Devin Hi Devin, You typically install the assembly in your own product directory. During development the package is typically registered with the regpkg.exe. But in a deployment scenario your ins ...Show All
Software Development for Windows Vista Information card "reset"
I'm preparing to enable pluralsight.com to accept InfoCards, and as I do, some practical issues are coming to the surface. Here's the first :) For the multitude of websites who will accept self-issued cards, we need to consider up front what's going to happen when one of our users' machines gets trashed and they lose those their self-issued card. Even if you're a website whose security bar is so low that you can simply email the user her password, that's not going to work with an information card! Regardless of the secondary authn mechanism you're considering (if any), I'm curious to know how you're thinking of exposing this "information card reset" feature to the user. It might be a good idea to have a relatively standard way of ...Show All
Visual Studio How do I add a custom reference to the Visual Studio macros?
How do I add a custom reference to the Visual Studio macros When I right click on "References" and click "Add References...", it only shows an already populated list of .NET references. It does not let me browse for an assembly that I have created. Let me irriterate that I am refering to the Visual Studio Marco IDE (the one that pops up when you edit a macro, which is different). I can add references without problems to non-macro projects. For VS 2005 (VS 8) you need to copy your custom reference to the folder: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies Once there, it will show up in the References dialog. ...Show All
Windows Forms Coloring TabControl.
As far as I can see TabControl object has no properties of either Back or ForeColor. Is it possible to assign these properties to this object Another question: TabPage object does have both properties but when you assign a color to it it does not cover the whole TabPage: the tab itself remains gray. Is it possible to give it colors Many thanks. With a fair amount of effort it is possible to get the TabControl to do exactly what you want. You will find some basic tips on my TabControl Tips page: http://www.dotnetrix.co.uk/tabcontrols.html You will also find TabControlEx (an extended TabControl) in my Controls section which will allow you to change the colors via a simple property change: http://www.dotnetrix.co.uk/cont ...Show All
Visual C++ How to get a wave file from an embedded resource
Hi All, I struggled mightily to figure this out and found no concise answers elsewhere so I thought I'd share. Plus I still have some questions at the end that I hope some kind .NET/CLR guru can answer. I wanted to embed a small .wav file into my C++ .NET Forms application so that I could deploy the single .exe file without the .wav file and play it with the SoundPlayer class. I did a lot of searching here but didn't quite find all the answers about how to do it in one place. But finally I have it working and here's how. 1. From Solution Explorer select your project, MyProject for example, then from the Project menu select "Add New Item" and choose "Resource" in the left pane and "Assembly Resource File&qu ...Show All
Visual Basic creating help for application
Hi, Can anyone guide me to any good threads, links etc. on how to make help for an application It seems that most books have left it out, and my app needs a help feature to make the grade. Thanks for all assistance tendered. Thank you. thanks for the info. The guide looks promising, I'll try it out. thnaks again ...Show All
SQL Server Pass data to a report?
Hi all, We have an ASP.NET application that generates various reports and word documents. The word documents and the reports require the exact same data and we have written some rather complex functionality that generates the SQL select statements to fetch this data. The statements are currently being used to create ADO.NET DataSets which feed the word documents. How can we now get these DataSets to feed the reports too We would really, really, really like to avoid having to recreate the logic for constructing the select statements within SSRS. Can we pass the DataSets themselves, or can we serialize them to XML using the WriteXml method then pass the Xml data as parameters or is there a way to just pass the SQL to ...Show All
Visual C# using DAAB in Enterprise Library 2.0??
Hi.. I need help in using the Data Access Application block Enterprise library 2.0. A step by step implementation of the Enterprise library configuration will be really helpful. can anyone please help. I am having trouble in Integrated Security option of the connection string. I want to use a different username and password other than the SSPI, what should i do I have changed the database value as Northwind and provided the server name. i have regferred the necessary dll's and still i am not getting the result in the grid view. here is the code that i have used: using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data.Sql; public partial class _Default : System.Web.UI. Pa ...Show All
Visual Studio Visual Studio .Net 2003 Installation Problem - Component Failure
I recently purchased a laptop with Windows Vista as the Operating System. I am trying to install my copy of Visual Studio . Net 2003 Professional Edition onto it, but it cannot install all of the pre-requsites. It fails when trying to install: Microsoft FrontPage 2000 Web Extensions Client I ahve tried enabling all of the Internet Information Services in Windows Components, but no difference seems to be made. Where can I get this pre-requisite in order to install VS It's really annoying that I cannot use my laptop for the reason why I purchased it! Unfortunately Vista officialy does not support VS 2003, though i haven't tried it on my machine, i strongly feel there will be a lot of problems using ...Show All
Windows Forms showdialog, modal.
Hi, I have a menuForm that launchs appForms. appForms are totally independent forms, the user can work in several appForms at the same time. My problem is when one of the appForms shows a MessageBox or any modal form, all other appForms and mainForm are blocked. i'd like only the form that show the MessageBox blocked, so user can work in others appForms. I use a system to imitate modality so only the parent form is blocked. Using the activate event in the parent so when parent is activate it pass activation to the child. And using the closed event in the child to get back to parent form. Put this system in a base class so all my forms have this special Show method that blocks only the parent. I was so happy. But then i realized th ...Show All
Visual Studio Can the debugger be used to step through a guidance package?
I have a few random questions - any help is appreciated. Note the general sense of frustration. Is it possible to use the debugger to step through a Guidance Package while it creates a solution Is there documentation, other than the chm file (note: this should include a how-to) What is the sequence of how code is executed when a solution is created from a package How does one interpret the below Action < Action Name = " ExportSolutionTemplateRef " Type = " RefCreator " AssetName = " ExportSolutionTemplate " ReferenceType = " Microsoft.Practices.SoftwareFactories.ServiceFactory.References.SolutionPropertiesReference, Microsoft.Practices.SoftwareFactories.ServiceFactory & ...Show All
