Bo_'s Q&A profile
Visual C++ changes in namespace member in managed code not reflected in unmanaged code
I have an unmanaged project (a simulation) that has a set of global variables within a namespace. Another project, this one being managed, acts as a front end for the unmanaged code, and changes these global variables on user input before running the simulation. The code for loading user input simply writes directly to the variables with their namespace qualifier. I then call the simulation, at which point the unmanaged code takes over. The problem is that those changes to the global variables aren't reflected once the unmanaged code takes over, almost as if there are two copies of the namespace. An example of how to duplicate this behavior: A.h: #pragma once #include <iostream> namespace N { static double namespace_member = 0.0; ...Show All
Smart Device Development System.TimeZone.CurrentTimeZone
I am writing an application for a Windows Mobile device using C# and .Net Compact framework. I need to obtain the system timezone or timezone that the user specifies in the Settings/Date and Time area. System.TimeZone is an abstract class and if I do try to call System.TimeZone.CurrentTimeZone I get a NotSupported exception. I have also tried p/invoking GetTimeZoneInformation() and also received a NotSupported exception. I went to pinvoke.net to see what methods are available under coredll.dll and GetTimeZoneInformation is not there, so I have no idea how I am to get the timezone. Thanks Harry NETCF V2 is required in order to run V2 applications, V1 naturally won't do. And you did not use the _ same ...Show All
Visual C++ How can I capture WM_DEVICECHANGE message in my consle program?
How can I capture WM_DEVICECHANGE message in my consle program I mean the program has no window an is not a service.I find out some code in msdn,but it's win32 program which shou window.I build consle project inin .net 2005,how can i do this Do i have to use hook thank you ! Hi, I think that you are forced to use Window because a window receives this message through its "WindowProc" function, so you have't alternative way to do that. Regards. ...Show All
Visual C# How can I detect Enter on a textbox control?
Hello, I have a textbox and a button on my form. I want to let the user enter anything in the textbox except when he hit enter I want to raise the button event. Can you please tell me how can I do that Hi You need to set the Form properties window AcceptButton to the button control that you have created so that when the user click Enter while the cursor is on the textbox it runs the button event. Hope this helps. ...Show All
Visual Studio Team System Call to Static class from Set of originating Methods
Hi, I'm new to FxCop and am not sure what I want to achieve is possible so was hoping that someone could confirm this. I need to determine whether any calls to a specific static class are being made from a fixed set of methods. The methods are defined in a base class but overridden by descendants. However, what complicates this further is that these methods may be several calls deep within the call stack, as they call other methods which in turn could call others. The methods called by the ORIGINAL set of methods are unknown. For example: Originating Method 1 -> Sub Method 1 -> Sub Method 2 -> <CALL TO STATIC CLASS> I would want this to be flagged as a broken rule. So I have two problems I'm not sure FxC ...Show All
Visual Basic Many questions regarding the DATAGRID
Hey all, I am in the process of developing a pretty major application and have had a lot of success with it, except for some issues with the datagrid control. There are a few areas that are pretty major that I address: Autosizing columns to fit the data that is in the rows (this needs to be dynamic for each query) Multiline capabilities - there are some areas of the datagrid that have a lot of text (ie "notes") where many characters are entered, and so I suppose that I need to get a type of autosizing for each row to occur, dynamically as well. Active cell highlighting - this is probably the most prominent issue for the application I'm developing. While I would like to allow a user to scroll through the data and lo ...Show All
Visual Studio Uninstalling Pre-RTM Visual Studio (CTPs or Betas)
Here are a set of resources to use before installing the RTM versions of VS or the .NET Framework. The main key is to uninstall SQL Express, VS, and MSDN *before* uninstall the .NET Framework. If you don't, you will end up with some orphaned files in the GAC which will lead to package load failures. Aaron's blog has some suggestions on how to clean that up. Tools and Tips on Uninstalling Previous VS 2005 Releases Official: http://lab.msdn.microsoft.com/vs2005/uninstall/ Official: http://lab.msdn.microsoft.com/vs2005/uninstall/preRTMuninstall/default.aspx astebner: http://blogs.msdn.com/astebner/archive/2005/11/09/491118.aspx astebner: http://blogs.msdn.com/astebner/archive/2005/10/30/487096.aspx astebner: http://blogs.msd ...Show All
Visual Studio Express Editions forum comparisation..
Hello, I'm sure I'm in the wrong forum with this thread, but that's only because I want some attention of you 'VB' people at the moment. I've been 'studying' the VC++ forum here, and I noticed that the average 'top poster' in that forum posts about 50 posts a month.. In this forum, I see 'top posters' with about 120 posts a month Now I'm not sure about this one, but aren't here some coders who also know some VC++ that could sometimes have a look at the VC++ forum to see if they can't help I'm asking this because I posted a question a couple of days before, and whereas I would have had about 10 reply's in this forum, I don't even have 1 in the VC++ forum.. This could be because it might be a difficult question, but it might ...Show All
Visual Studio MS Visual Studio 2005
Hi, Can someone tell me the difference between MS Visual Studio 2005 and MS Visual Studio 2005.net I am a beginner and recently installed SQL Server 2005 developer, Visual Studio 2005 professional and MS BizTalk Server 2006 in my laptop. If I need to develop a global platform to administrate my tables and applications could I do it with MS Visual Studio 2005 or do I have to have MS Visual Studio 2005.net /Prasa ...Show All
Visual Studio Cannot progressively flush Output Window from Custom Tool
Hi, I am implementing a custom tool based on the provided BaseCodeGeneratorWithSite class. I am able to send text to the Output Window but it does not appear until the GenerateCode command has completed. I am unable to progressively flush the Output Window. This is a problem because the custom tool may take some time and incremental progress updates are important. Does anyone know how to flush the Output Window Thanks Hi Josh, Here is the piece of code I used in my custom tool. As you can see I used OutputString method of OutputWindowPane class. As I said earlier - all text I see only after generation is completed :( Could you please provide us something better ...Show All
.NET Development Xml element attributes
hi, I am getting a return value from a stored procedure like following way <m_allergies import_id="200"allergy_type="1" Code="5763" Name="abcd" Reaction="skin peels" add_date=12/12/2006"/><m_allergies import_id="200" allergy_type="2" Code="57" Name="ab" Reaction="peels" add_date=12/12/2006"/><m_allergies import_id="200"allergy_type="3" Code="763" Name="bcd" Reaction="skin burns" add_date=12/12/2006"/> But i have to update xml document using values allergy type attibute value(ie 1), code attribute value( ie 5763) reaction attibute value ( ie skinp ...Show All
Windows Search Technologies Windows Desktop Serach Filter
How do I stop these blasted error messages that continue to pop every few seconds in the Windows Desktop Search Filter I have tried to debug it each time or send in the error report and each time it comes back. My computer is new and I am running Windows XP Pro, Business Contact Manager and MS Small Business Accounting. JEM374 JEM374 - Business Contact Manager stores contacts in an SQL database. WDS is not able to index this database. In order to prevent the errors going forward you should remove the folder that holds the contacts stored in Business Contact Manager from the indexed locations in WDS. Paul Nystrom - MSFT ...Show All
Smart Device Development Pocket PC applications
Hi all l recently purchased myself a pocket PC running Mobile Window 5.0 . l have Visual Studio Pro 2005 and downloaded Pocket PC SDK (174 MB) l am familiar with Visual Basic and would like to make a couple of simple applications that can run in my pocketPC . l am looking for articles and/or tutorials and/or any help which will describe STEP by STEP how one can transfer an application made in Visual Basic with VSPro 2005 to the Pocket PC and see it running . Thanks in advance If you've installed the appropriate Windows Mobile SDKs (Pocket PC and/or Smartphone) then you should be able to go to File, New-->Project, and create a new mobile device application. From there, you wo ...Show All
Visual Studio Debugger - Visualizer (VS2005)
I'm trying to better visualise my class in the Debugger. I noticed that in VS2005 a new/great feature was introduced to help visualise containers (STL and ATL) in debugger. By this it is easy/fast to display important data from complex classes. Unfortunately, I can't visualise one stuff. I have a class B with a member variable A* m_ptr . If I edit the autoexp.dat file \ [AutoExpand] section "B=ptr=< m_ptr, t >" then the magic "t" make sure that if the m_ptr is an instance of class C which is derived from class A the debugger displays it as ptr=[ C ] . This is great so far. However I would like to do similar thing in [Visualizer] section: A{ preview ( #( $e.m_ptr ) ) ) Since there are no official documentati ...Show All
SQL Server Error: 18456, Severity: 14, State: 11 Valid login but server access failure
Hi I am new to SQL server and I have been trying hard to make a client computer to remote connect to a SQL express database on host computer I have a VB6 application that can connect to SQL server database LOCALLY without problem: Connection String is: my_connection.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyMushroom;Data Source=LAPTOP\SQLEXPRESS" I have followed instruction on enabling remote connection function from this blog: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx I then try to run the same app from the client computer, it gives me: Login failed for user 'LAPTOP\Guest'. After looking up the web for solution, ...Show All
