JGreene's Q&A profile
Visual C++ command line arguments problem
I'm having problems simply reading command line arguments into my program. Here is my simple program: #include "stdafx" #include <iostream> #include <fstream> #include <string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { cout << argv[0] << endl; cout << argv[1] << endl; cin.get(); return 0; } Despite giving the program a text file as a command line parameter all the program out puts is nonsense like: 003B6058 003E7234 Why is it not outputing the name of the program or the name of the file Can anyone tell me what is wrong Read http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=849851&SiteID=1 and see the linked pages. ...Show All
Visual Studio Express Editions remove an item from a combobox
i want to permanently remove an item from a combobox, but how what code do i need And if you combobox is databound then you need to remove it from the datasource. You cant binding to a datasource and then selectively remove items only from the items collection on this listbox. ...Show All
Visual Studio Express Editions making it count
hi trying to make a label count upwards. what have I forgot Dim tries As Integer = +1 Label10.Text = tries.ToString thank you whoisit, that worked how I wanted sorry I havent got my thinking hat on today, I know how basic that is lol thanks for your replies ...Show All
Software Development for Windows Vista External Events, ThreadPool and WaitForIdle
Hi, Given: stateMachineWorkfow, which waits for some external events that are being sent to it via ExternalDataExchangeService. The service code contains something like: public event EventHandler<ServiceEventArgs> FireEvent; void TestFireEvent { ThreadPool.QueueUserWorkItem(delegate { if (FireEvent != null) { FireEvent(this, args); } }); } where ServiceEventArgs have 'WaitForIdle' property set to 'true'. Such a code makes the workflow runtime to wait till the workflow becomes idle, before delivering the event. Therefore the thread in the thread pool may be waiting for quite a long time, because we can not be sure if the workflow will become idle fast enough. This leads to potential problems because t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Xbox 360 Guides in XNA
Hi there, I've been playing around with the framework and I have a little question for any MSFTies who can answer. On the Windows side of things, if we want to call up any useful built in functions of Windows like say the common dialog box colour picker (for say, a player's car paint job) or a MessageBox (you've reached the end of the demo!), we can still do so by calling in to the Windows.Forms namespace. On the Xbox 360 side though, any such UI we would have to recoded manually. However, as we all know, there are certain built in elements of UI on the 360 too in the form of the various Xbox Guide slide out panels. Currently, access to one of these does exist in XNA (The save Location guide for letting the user choose a Memor ...Show All
Architecture Storing Session State
We have been using SQL Server to store session state for a while. Now we are growing and looking for more scalable alternatives. It looks like there are three products on the market: ScaleOut, Ncache and StateMirror. Just wondering if anyone had any experience with any of these beasts. quite productive discussion .. guys pls continue... i will join you soon http://DotNetWithMe.blogspot.com Vikas ...Show All
.NET Development Problem with Windows service and C#.Net code
Hi, I am facing one critical problem.I have created one Windows service. I am calling a function of C#.Net class file by using remoting , say ProcessRequest(); from that windows service. Now, while executing the function ProcessRequest() if exception occurs, it is handled in the function. After this I do not want to proceed further and control is returned back to the calling component, i.e. Windows service code. After returning back to windows service, control is going in to the catch block of windows service . To remove this problem, I used ‘Delegate’ to call function of C#.Net class file i.e.ProcessRequest(). When I tested this modified code on Windows XP, it is working fine, i.e. control is not going in to the catch block ...Show All
Visual C# ( ), { } and [ ]??
Hi, Can someone please provide a detailed explanation of ( ), { } and [ ] and when each one should be used I have some knowledge of what they mean as I see them used quite often in different parts of the code. Sometimes I see them used in a rather confusing way but because the compilers never complained I had to assume that they were used correctly. Is there a standard for using them Thanks in advance Hi, yes, there are specific rules when to use which. () are used for conditionals (if, for, foreach), to specify the order of calculations and for casts. More info to be found here . [] are used for indexed objects (ArrayList[0] == first item in the arraylis ...Show All
Visual Studio Visual Studio SP1 run successfully but it not installed
Help... I'm running on Window 2000 SP4 my Visual Studio 2005 Professional Edition. I need to develop a Web Application and a week ago I installed th Web Application plug-in. Then I read abou the final release of the SP1 which include the Web Application and other fixes so I decided to UNINSTALL the Web Application and to install the whole SP1... and here the nightmare starts... The first tries were unsuccessful because I had not enough space on my Temp folder ... I change the Temp reference to a disk with more space and I was able to run successfully the installation of the *.msp file. I checked my Visual Studio and the version is 8.0.50727.762 (SP.050727-7600) and this is ok, then I checked the content of the "installe ...Show All
Visual Studio Express Editions Queries
I posted this earlier in the wrong place so I will try it here. I am wanting to set the filter of a query to a name saved in My.Settings Is this possible or is it done differently I was used to access and this is just a little different. Davids Learning Sorry for not explaining Yes I am using VBE with SQLE I tried in the query builder's filter SELECT EName, my1, my2, my3, my4, my5, my6, my7, my8, my9, my10 FROM EDF WHERE (EName = My.Settings.Name1.ToString) and I got the error The multi-part identifier "My.Settings.Name1.ToString" could not be bound Where did I go wrong Davids L ...Show All
.NET Development Puzzled about Linq
Hi, I'm quite puzzled... In the last few months i've learned to use TableAdapters, DataTables and all the fancy stuff that's in .NET to "abstract" the database. However, it's still not perfect - as there is no total abstraction between the data structure and presentation layer - it does make creating DAL and BLL easier. Now I keep coming across (D)Linq which uses a totally different, in my opinion, way of accessing the database. Using DLinq, i think i will end up writing queries in the presentation/BLL layer again, instead of using the DAL tools such as TableAdapters. Of course, you can write the queries only in the DAL, but i wonder what's the use of the TableAdapters then The question is all the more urgent because i n ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Blender
Can blender be used with XNA GSE Just wondering b4 i go and get my new comp this week because my desktop crashed... I am quite sure in blender you have to apply transformations and scaling, there is an option somewhere to do this. ...Show All
Visual Studio 2008 (Pre-release) Databinding Syntax?
<ComboBox.ItemsSource> <Binding> <Binding.Source> <CompositeCollection> <CollectionContainer Collection="{Binding Path=Objects}" /> <CollectionContainer Collection="{Binding Path=MoreObjects}" /> </CompositeCollection> </Binding.Source> </Binding> </ComboBox.ItemsSource> In my C# code I set the combobox's DataContext property like: comboBox1.DataContext = this; the this object happens to have two ObservableCollection<object> properties called Objects and MoreObjects... why doesn't this work The other question related to this is how do I use the CompositeCollection in C# I don' ...Show All
SQL Server sp_issues
hi i have the following sp. i want to be able to create a view from the sp that will store the data that can be retrieved with the select statement my sp returns me. if the table exists, it should be dropped i suppose, because columns may vary. now i also want that enough info be stored to retrieve information again from the view, that i can map the records back to their original form how do i set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER PROCEDURE [dbo] . [sp_DetailedBill_byPono] @payment_or_bill nvarchar ( 2 ), @pono nvarchar ( 25 ) AS BEGIN SET NOCOUNT ON ; DECLARE @fieldname varchar ( 10 ) DECLARE @stmt varchar ( 4000 ) DECLARE Fields CURSOR FOR SELECT A ...Show All
Smart Device Development .NET Framework 3.0 and WPF/E on WM 5.0
Is there any info available regarding: .NET Framework 3.0 on WM 5.0 WPF/E for WM 5.0 TIA, geo It’s easy - they do not exist. NETCF 3.5 will be released with next VS, but no details can be provided till official announcement. ...Show All
