Chas2002's Q&A profile
Visual C++ Any C++ equivalent for "IS" C# function?
Hi, Many times, available code examples are in C# or VB, a few in C++ unfortunately. I am wondering what would be the C++/CLI equivalent of following C# code, mainly the "IS" function: private void MenuHandler(object sender, EventArgs e) { MenuItem m; if(sender is MenuItem) <=== how do I translate this ... I looked if dynamic_cast could help me but without success. Any hint Thanks in advance, Stephane Hi, Many thanks for replying. I applied equivalent of following suggestion with success: ...Show All
Smart Device Development What wrong in this code for smartphone work well in pocket PC
#include "common.h" #include "MYappext.h" #include "MYContactsProvider.h" extern LONG g_cRefDLL; extern HINSTANCE g_hinstDLL; UINT cmdCtxCustom = 0; UINT cmdCtxJournal = 0; UINT cmdCtxSales = 0; UINT cmdCtxFax = 0; UINT cmdCtxAdd = 0; UINT curCtxCmd = 0; const int WM_CUSTOM_FLDS = 0x0415; const int WM_JOURNAL_FLDS = 0x0416; const int WM_SHOW_SALES = 0x0407; const int WM_FAX = 0x0431; const int WM_EDIT_CONTACT_EXT = 0x0408; ContactsContextMenu::ContactsContextMenu() { MessageBox(0, L " ContactsContextMenu " , L " Constructor " , 0); m_cRef = 0; m_punkSite = NULL; ++g_cRefDLL; ...Show All
Smart Device Development Transfer VB.6 project to .NET for windows mobile 2003
Hello! I'm new in this forum and I'm not so experienced in VB programming. Nevertheless I've done a project in VB.6 that runs on windows 98, 2000, xp and so on. I'd like to ask whether there is a certain method to setup this project fpr pocket pc's. It is somehow difficult, as I tried to import the VB.6 project to .NET which did not work correctly - and I don't know why. Of course, if someone is interested in helping me, I can post the source code in this forum. Pleeeeease help! Truly Bernd I don’t believe you can import VB 6 project into device VB.Net project. You might be able to convert it into desktop project then port it to device. Or, better, start from scratch. Considering you're & ...Show All
Visual Basic Handling Repeated Arrow Keys
I was amazed to read that noncharacter (eg. arrow) keys do not raise the KeyPress event in VB2005! I am developing a program where I want to capture, say, repeated down arrows key presses ... where the user holds down the DownArrow key for a few seconds and the program captures them all [the program has an overflow feature in the event the key is held down too long]. Am I correct in reading that this is not possible in VB2005 Surely not. Thanks. Oops ... I didn't make myself clear. I want to allow the user to hit the down arrow key and hold it down and as those repeated down-arrow characters come in I want an event handler to "capture" them. I have a stack mechanism where if the char ...Show All
Visual C# How to import C# library to VC++ 6.0.
Hi, Is it possible to use C# library to VC++ 6.0. If so can you please give a steps to create a sample from VC++ using C# libraries. Thanks for your help. Hi James, Thank you very much for all the updates and take care for me. My exact requirement is, I have created a library using C#. I want to use this library file in VB6 and VC++. Where as the same dll working fine with all functionality in C#.Net and VB.NET framework 1.0, 1.1 & 2.0. In the case of VB6, I have a TLB Com file and I have added this reference to the project and then I created a sample using it. Also I have tried it by VC++7.1. It works fine in 7.1 windows application. I need to use it by VC++ 6.0 & 7.0. I hope you to take care about me. Thanks for sp ...Show All
SQL Server Installing SQL SERVER 2005 Enterprise Edition On Windows XP??????
Hi, I brought the MCTS Sql Server 2005 Implementation and Maintenance,Self paced training kit recently but i cant get my hands on the required OS for SQL Server 2005 Enterprise Edition which comes with the book. (Too Expensive!!!!!!) Is it OK to intall it on Windows XP Will I encounter any problems Many thanks Uma Hi, How do you login in to SQL Server 2005 When I load Microsoft SQL Server Management Studio I get a dialog box with the following entries: Server type: Database Engine Server name: I enter localhost Authentication: Windows Authentication When I click connect, I consistently get an error message. Can you tell me what I'm doing wrong Thanks much, Johnnie ...Show All
SQL Server oracle oledb provider not registered in local machine
Hi, I am trying to establish a connection to an Oracle database using the following code in a script task: Dim oOleDbConnection As OleDbConnection Dim sConnString As String = _ "Provider=OraOLEDB.Oracle;" & _ "Data Source=DBxxx;" & _ "User ID=Userxxx;" & _ "Password=Passxxx" oOleDbConnection = New OleDb.OleDbConnection(sConnString) oOleDbConnection.Open() When I execute the script task, I receive the following error: The 'OraOLEDB.Oracle' provider is not registered on the local machine. Am using the correct provider I do not know how to resolve the said error. Here are some facts: Oracle 8i is installed. Tnsnames.ora is updated. I have successfully ...Show All
Visual Studio Team System Subversion folders/files are being included
Hi, First, let me say that VSTS for DB Profs is definitely on its way to becoming a much needed product. So, keep up the great work! I do, however, have a quick comment. I am using Subversion as the SCC repository, and after adding the database project to the repo, the .dbproj now insists on including all of Subversions folders (.svn) and their files in the project. I have attempted at manually removing the <DBProjectFolder> and <DBProjectItem> elements from the .dbproj file, but it keeps readding them. Is this a known bug or am I missing something Thanks, Vitaly vito1281, have you attempted to imprort an exsiting SVN repository into VSTSFDB I have an exsiting reposito ...Show All
Windows Live Developer Forums Map Control: What is legal?
We are having a bit of trouble understanding the legal stuff for Virtual Earth. What we want is a very small internal system that simply displays a map with pushpins/custom icons. The system has a very small number of transactions daily. By internal system, we mean used by 3 people internally in a company. The site must not be accessible to the public. Can we do this free, or will we have to purchase a license Interesting you would fail the google maps criteria as they need it to be public. The issue for you is: is what you are doing commercial If not then your fine John. ...Show All
.NET Development Concurrency Violation with Delete Command
I've generated a standard Master-Detail Windows form and have the master fields in individual text boxes and the child rows in a datagrid. When I use the Delete button that was generated by the form generator I get the message "Concurrency Violation: the DeleteCommand affected 0 rows" and noting gets deleted. This is a single-user application and this is the only form using these tables, so how can I get a Concurrency Violation under these circumstances The database is Microsoft Access 2003 and the Master Table has a one-to-many relationship with the child table and Cascade Updates and Deletes is turned on. Try this (you need to change the Adepter modifier from private to public in dataset defin ...Show All
Visual Studio Example code and it's language
How do I place example code in a code file that is language specific. For example: public class MyTester() { <SUMMARY>Test Method</SUMMARY> <EXAMPLE> <PARA>C#</PARA> <CODE> MyTester tester = new MyTester(); test.Test(); </CODE> <PARA>VB</PARA> <CODE> Dim tester As MyTester = New MyTester() test.Test() </CODE> </EXAMPLE> public void Test() {} } I would like to be able to do this so that users of my documentation can filter on the language which they want to see. I have noticed that the MSDN site works this way which leds me to believe that it can be done. Can some one shed some light on how this is done. Thanks John No ...Show All
Smart Device Development Strange linker warning... can I ignore it?
Hi, I'm using the VS2005 Team System Eval on a PC that previously had VS2005 B1 and B2. Both were uninstalled prior to installing the RTM. I created a simple Smart Device dialog app to be built for a custom CE 5 platform. If I build the solution without changing it, the following warning happens: MSVCRTD.lib(chandler4.obj) : warning LNK4099: PDB 'libbmtd.pdb' was not found with 'C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\x86\MSVCRTD.lib' or at 'd:\projects\...\debug\libbmtd.pdb'; linking object as if no debug info Can someone point me in a direction to find out more about this I googled "libbmtd", but nothing comes up. Any help is greatly appreciated. Thanks, Nick ...Show All
SQL Server Problem connecting to external SQL Server
Hi all... Very much a newbie here to setting up SQL server, and am pulling my hair out over a problem... I have a VPS running Win2003 64bit and have setup my ASP forum on it (I also have SQLExpress 2005 installed on the VPS) - I have a SQL DataBase running on an external server which my old host setup for me and the old forum has been using... Now all I want to do is for my ASP forum on my server to connect to this external SQL DB... How easy! Well not for me .. This is the error Microsoft OLE DB Provider for SQL Server [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied I know its my VPS causing the problem, as I asked a friend to see if he could connect to it via his server and the forum worked straight o ...Show All
Software Development for Windows Vista DirectShow 2 input filter
I have created a Directshow filter that has 1 input, the base class is CTransformFilter. The input is MEDIASUBTYPE_RGB24. The filter does some color correction. Now I would like to add another input and make it a two input video filter for DirectShow. The idea is to use the second input for doing a composite. Both inputs should be both MEDIASUBTYPE_RGB24. Has anyone done this before Should I still be using the CTransformFilter base class Or should I use another base class or extend CTransformFilter base class to support 2 inputs. If anyone has any code samples for 2 inputs vide filter that would be great Don James Yeah, so are we, but by no means are we pr ...Show All
Smart Device Development Can I write my own shim engine?
The Application Verifier used the shim engine to do a lot of work. In the Memory Leak Detection presentation of MEDC2005, it is said that shim engine will be open for the developers soon. Can I write my own shim engine and is there any sample code Thanks ...Show All
