Davids Learning's Q&A profile
Visual C++ Casting the Object type
What is the correct syntax to cast an Object into an int For example, ListViewItem's Tag property is of type Object. After the property is set with an int value, how do I cast it back to an int value ...Show All
Visual Studio Express Editions How to Highlight Textbox Text on Gaining Focus
How to Highlight Textbox Text on Gaining Focus Opps sorry Tall Dude i was able to work out my former problem using the ff. codes. So i deleted that post. Now i need to highlight the content rather than erase it. Me.ActiveControl.Text = "" <-- I need to highlight the text rather than empty it. Private Sub txtAns_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtAns1.GotFocus, txtAns2.GotFocus, txtAns3.GotFocus, txtAns4.GotFocus, txtAns5.GotFocus, txtAns6.GotFocus, txtAns7.GotFocus, txtAns8.GotFocus, txtAns9.GotFocus, txtAns10.GotFocus, txtAns11.GotFocus, txtAns12.GotFocus, txtAns13.GotFocus, txtAns14.GotFocus, txtAns15.GotFocus, txtAns16.GotFocus, txtAns17.GotFocus, txtA ...Show All
SQL Server Should be easy - help formatting a conditional Query.
SQL Server 2000. Here's what I have so far. The section of the query I need help with is highlighted in blue. CREATE PROCEDURE dbo.GetByVersion ( @targetVersion varchar(30), @product varchar(50) ) AS SET NOCOUNT ON; SELECT * FROM MyTable WHERE (product = @product) AND CASE WHEN @targetVersion='' THEN (targetVersion='') ELSE (targetVersion LIKE @targetVersion + '%') END GO I get a syntax error in the Stored Procedure editor on an equal sign in this line: WHEN @targetVersion='' THEN (targetVersion='') What I want is this (in psuedocode): if @targerVersion is blank & ...Show All
Visual Basic Months and dates problem
I have been trying to do a calendar problem using the months of the year. 30 days for April, 31 for December etc. But I am stuck. I was going to use a select case, but again, stuck. Any help would be useful. Thanks I don't get the problem so far, can you explain a bit more and maybe show code you have which doesn't work like you want it to. -- SvenC ...Show All
Visual C# C#, VB6 or Borland C++
Hello all, I am part of a team of a new company, and we are fighting on what language to use. What are the advantages of C# over all the others. I need hard arguments to make them use C#. Thanks If you're having to fight to use C# over VB6 or Borland C++ then I'd recommend leaving the company and working for a company where you don't have to waste so much time. You can say that one of the big advantages of C# and .NET is that it's very easy to accommodate modern versions of the other two languages you mentioned (VB.NET and C++/CLI) once you're working in the .NET framework. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter, VB to C+ ...Show All
Visual C++ backgroundWorker1->Dispose() ?????
hi guys, I am using VC++ in VS2005. after I finished with a thread created by backgroundWorker1, i would like to call backgroundWorker1->Dispose() in the end of the Do-Wrok-Complete event handler. But I get this Error: error C2039: 'Dispose' : is not a member of 'System::ComponentModel::BackgroundWorker' 1> c:\windows\microsoft.net\framework\v2.0.50727\system.dll : see declaration of 'System::ComponentModel::BackgroundWorker' 1> You should invoke the destructor, '~BackgroundWorker' instead So I tried to use the "~" destructor, but still it is giving out errors. Can anyone plz quickly how I can fix this and free all the resources that was used by my time-consuming thread thank ...Show All
Visual Studio Express Editions Clear ComboBox Items "VbExpress 2005"
Hi How Can I clear ComboBox collection clicking on the button My ComboBox contain some values from DataBase and I have tried this code ComboBox1.Items.Clear() but display this error "Items collection cannot be modified when the DataSource property is set." Someone can help to resolve this problem Thanks Shady I want to refresh. But when i refresh that add the existing collection again. For example: In my combobox I have "Test1" and "Test2", when I'm clickng on refresh button that will add "Test1"and "Test2" again. I would like to clear the comboBox Collection and then add the dataBase values. ...Show All
.NET Development reset active directory account using c#
hai this is guruprasad i am doing active directory project. i have to do reset active directory computer object account i did it with run prompt in windows 2003 there is any way to reset the account using c# coding This forum is dedicated to questions about the System.Net namespace. This may be possible via the System.DirectoryServices namespace. Please repost this to a directory services / active directory focused forum as they will be able to give you a much better answer. http://www.microsoft.com/community ...Show All
Smart Device Development WM 5.0 + VS2005 + SQL Mobile Problem.
Good morning. A few people in here have helped me out with various noob questions I've popped out while developing my first Mobile app. Now I seem to have hit a major stumbling block. I've been scouring the net for several days trying to find an answer but I can't seem to make sense of the wealth of information. (The abbreviated gist of my post is - "Why can't I run SqlCe classes under Windows Mobile 5.0 and Visual Studio 2005 ") The story is this: * I developed the app using VS2003 and CF 1.0, succesfully deploying it to a Windows Mobile 2003 SE device. The app used SQL CE 2.0 as part of its operation. * The device we have been given now (Symbol MC70) which will be the production model has just been catastrophically diagnosed as ...Show All
Visual C# C library .lib
Hello, I got a C library .lib. How can I use it in my C# application Do I have to create DLL wrapper for this library If so, how can I do that Thanks, Tammy Hi, I don't know whether there will be difference in adding a c library or a COM library or a .net library.If there is difference , please let me understand the difference.Thanx in advance. The normal way of using a library in C# application is adding a reference to it and by using the name space , u'll be able to access the functions or classes etc. Thanx, Ch.T.Gopi Kumar. ...Show All
SQL Server how to write Crosstab Queries
I need to write Crosstab Queries just like this, Qty + previous qty = TOT QTY TOT 1 1 5 6 3 9 9 18 2 20 FYI, that's a running sum, not a cross-tab. Here are some resources: http://sqljunkies.com/WebLog/amachanic/archive/2006/02/28/18286.aspx http://sqljunkies.com/WebLog/amachanic/archive/2006/02/28/18309.aspx -- Adam Machanic Pro SQL Server 2005, available now http://www..apress.com/book/bookDisplay.html bID=457 -- <Tharindu Dhaneenja@discussions..microsoft.com > wrote in message news:1dbe93ef-2c64-4c56-b617-5d3938bea80c@discussions.microsoft.com ... I need t ...Show All
Visual Studio Team System Issues with customizing Work Item "Assigned To" field
I've tried to customize MSF for Agile Software Development - v4.0\WorkItem Tracking\TypeDefinitions\task.xml as follows: From: <FIELD name="Assigned To" refname="System.AssignedTo" type="String"> <VALIDUSER/> </FIELD> To: <FIELD name="Assigned To" refname="System.AssignedTo" type="String" reportable="dimension"> <HELPTEXT>The person assigned to do the work</HELPTEXT> <ALLOWEDVALUES expanditems="true"> <LISTITEM value="[Project]\Project Administrators" /> <LISTITEM value="[Project]\Contributors" /> <LISTITEM ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Cannot Open Prcomplied Header
Hello. I'm trying to compile, build, and play around with the "MultiAnimation" Direct3D sample. I've already worked through a number of other errors, and now my latest one is the following... c:\program files\visual c++\directx\samples\c++\direct3d\multianimation\multianimation.cpp(8) : fatal error C1083: Cannot open precompiled header file: 'Debug\MultiAnimation.pch': No such file or directory I'm using VC++ 2005 Express Edition Help! Thanks! Hi BenMo, I am not sure how everyone else overcomes this problem, but here is what I do. Go to the menu routine: Project | Properties | C/C++ | Precompiled Headers and then toggle the first entry to 'Automatically G ...Show All
Software Development for Windows Vista Rasing integrity level from a low level integrity process
From IE7 (Protected mode) on Vista, i am launching a process (A) which has low level integrity since IE7 runs as low level. Can i launch a process(B) from A with high or medium integrity level My previous comments apply to generic low integrity processes. IE7 actually happens to provide services to handle elevations for its plugins. See http://msdn.microsoft.com/library/default.asp url=/library/en-us/IETechCol/dnwebgen/ProtectedMode.asp There's a section about starting processes from Protected mode. ...Show All
Software Development for Windows Vista tableadapter update inside failed transactionscope doesn't rollback the datatable
I have a number of tableadapters which must update under one transaction. After a transaction failure I notice that the data in the (SQL Server 2005) database has rolled back but the data in the datatables on the middle tier has not. This creates problems as some of the tables contain data on which other data tables are dependent. In particular, identity fields on these datatables are left populated with the identity from the failed insert. Is there a way to accomplish a rollback of data in these datatables without resorting to datatable.clear() followed by datatable.Add[tablename]row Regards. All the work that gets done against the DataTables (inside DataSets) is accessed through methods ...Show All
