Farrokh Moori's Q&A profile
Visual C# How to get the active application
I have the code to get the active window (for example notepad) and the capiton of the program (untitled - Notepad) But now I want to get the application, cause if I save a file in notepad the capiton will change. And I need something unique, like the program name. I mean I can start notepad a zillion times, it will always be called notepad. So does anyone know how to do this in C# You should keep a local var lastHwnd, or whatever. int currentHwnd = GetForeGroundWindow(); if(currentHwnd != lastHwnd) { lastHwnd = currentHwnd; ///do the process stuff } Save on the process thrashing... ...Show All
SQL Server Plz Clarify my query in SSIS
Hi There, I have Task in SSIS to import the flat file to the table and break the table and insert and update the other tables in the same database. I searched every where i couldnt find appropriate tutorial for this. Please advice me how to achieve this task. Thanks in Advance Regards Savera Savera, Please read through my posts in this thread . I think you should go through some tutorials so that you can obtain a better understanding of SSIS. ...Show All
Visual C++ Urgent Super easy question ! I cannot use the protected method of DataGridView
Hi there! I am using VC++ in Visual Studio 2005. I have created a DataGridView, and I am trying to use the "SetSelectedRowCore" method (it is a protected method) of that DataGridView to highlight (select) say row number 3. but the compiler says this protected method, SetSelectedRowCore, cannot be accessed !!!!!! please help! this should be a quick one for you guys ! Thank alot in advance. Cheers Best wishes, gon_no1 Hi. Well this is protected method. Protected means that you can access it via child class. So make a class that inherits from this one that contains this function. Here are inheritance types (just for freshing memory): Public Inheritance: Public is still public in a child ...Show All
Software Development for Windows Vista ICS API crashing in Vista RTM
We are trying to make an internet connection sharing profile in our Application using ICS APIs. While we make the below API calls we sometimes (1-2 times out of 10) get error message “Host Process for Window Services stopped Working” (Refer attachment). These APIs are working fine in XP . Moving network profile to Internet Connection sharing mode sometimes gives following problems: INetSharingConfiguration * pNSC; O hr = pNSC->EnableSharing(ICSSHARINGTYPE_PUBLIC); o Return Value of hr is “cannot Complete this function” O hr = pNSC->EnableSharing(ICSSHARINGTYPE_PUBLIC); o Return Value of hr is “The service canno ...Show All
Visual Studio 2008 (Pre-release) How to turn off anti aliasing for small text?
Anti aliasing small text tends to make the letters look blurry and indistinct. I cannot find a way to disable the anti-aliasing of text in WPF and as a result label or button text looks really bad. Ideally I'd like to disable anti aliasing globally for font sizes below a certain size. How can I accomplish this -Ryan rfuller987@hotmail.com I did a bit more research on this and it seems the entire foundation of ClearType for smaller fonts relies on "hinting". However, its obvious that NO hinting is being applied to the fonts that are rendered (see images above). More information can be seen here in this video interview - http://channel9.msdn.com/ShowPost.aspx PostID=147814 For thos ...Show All
Visual Basic VB 6.0 ActiveX Control in HTML
I have developed my ActiveX control using Visual Basic 6.0 and planned to load it through the HTML / Web Page. For that the Object (HTML tag) is used for IE versions and Embed (HTML tag) for Netscape versions. But how to get my OCX classID to refer my activeX control in the HTML object tag These forums are for vb.netr questions ask vb6 questions in the vb6 newsgroups . There will be changes with ie7 check out the ie7 readiness toolkit . ...Show All
Visual Studio How to show the totalpage number with c#
dear all i am a newbie today i have a question in CR 11 How to use code to show the totalpagenumber in My Winform Application(Not VB.NET) my environment C# 2005 ,CR 11 HELP me pls! mewdied , you said right !! i must type all code in c# 2005. (myreport.FormatEngine.GetLastPageNumber(new CrystalDecisions.Shared.ReportPageRequestContext()) may be c# is Hidden this method.. by the way thanks a lot ! you give a good answer , give you a flower!!!thanks ...Show All
SQL Server Getting "extremely complex query" error when using xml data type parameters
Good morning, I am trying to figure out, and understand, why I am receiving the error that I am when I use xml data type parameters. If you look at the proc below, I have a proc with 8 xml data type parameters. When i call this proc adn pass in the values for the parameters, I recieve is the following: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information. In debugging, I found that I DON'T get this error if i have ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Hmmm... forum posts...
It would be really nice to have a forum for the absolute beginners... I have a game idea... the next AAA title is on it's way How to create a project in C# Express How to do a simple task like clicking a mouse button by myself How to read the <bleep> documentation first How to learn reading before point 4. ... Click and play stuff RTFM Sorry Please use nicer language to express your frustration We need to remember that there are a LOT of enthusiastic beginners here that have no idea how to start or what to expect, but they are very passionate about gaming. Lets find ways to help them. I usually start with this post (which needs to be updated to reference XNA). I'll probably make a new, ...Show All
Visual Studio Super slow installation for VS2005 SP1 beta
Well, it’s not something new, there are people at Microsoft that work hard to make our life easier, like the Microsoft Windows Vista installer for example, an entire OS in 20 min; and there are some less experienced developers (my assumption only) who are given for some reason the task of creating the VS2005 SP1 installer. Whoever wrote that thing, he, she or they, can say whatever they want, but to take 2 hours to get the SP1 beta installed is just damn stupid, here are 2 hours by a million people in the world, a total of 2 million hours lost, thanks to a group of developers at Microsoft, maybe they could have spend 100 more hours to learn math, or to profile the installer, and could have saved the world a million hours ...Show All
Visual C++ makefile project never up-to-date
Hi, When creating a makefile project using VS2005 that wraps a call to nmake, it seems that Visual Studio always thinks that it's out-of-date and attempts to build it. I've tried explicitly setting the output filename (in project settings, NMake, Output) but this doesn't have any effect. I have a test case that simply contains a project with a makefile that does a file copy, and you can see that VS always invokes nmake, even if the file is up-to-date. Let me know if you want it. It's not clear to me how VS infers what the output file should be compared against Am I missing something Btw, the behaviour is the same in VS2005 and SP1. Ian "I've tried explicitly setting the output filename ...Show All
Visual Studio Express Editions ProgressBar and Background worker
im trying to get my BG worker to report progress in progressbar...i tryed in 2 ways that some other dude asked and none worked..i have no clue why.. like that one Private Sub BackgroundWorker1_ProgressChanged(ByVal sender As Object, ByVal e As System.ComponentModel.ProgressChangedEventArgs) Handles BackgroundWorker1.ProgressChanged ProgressBar1.Value = e.ProgressPercentage End Sub i do have the report status of the bg worker to enable, and in dowork he downloads file...that he do but dont report progres.. thx. BackgroundWorker cannot help you here, because the background thread blocks while executing DownloadFile. So you cannot give feedback about progress - well you do not even have any informa ...Show All
SQL Server Spool command in SQL Server 2005
Hi Can i have the output of my queries on the console window as well as in a text file at the same time something that Oracle's SPOOL command does. Regards Salil hi Salil, Salil wrote: Hi Can i have the output of my queries on the console window as well as in a text file at the same time something that Oracle's SPOOL command does. Regards Salil SQL Server does not provide these kind of "features"... SQL Server "just" returns result sets and messages in a native format known as Tabular Data Stream over the network libraries.. it's then up to the "client" to "consume" the results accordingly to it's needs.. you can sometime use the command line ...Show All
Visual Studio WindowClosing event in VS 2003.net plugin
Hello, I am developing an addin for Visual studio 2003.Net. When i close the file opened in editor with some changes in it,editor prompt me to save the file.I don't want editor to prompt me to save the file. Besides i want to save the file explicitly with File.SaveSelectedItems or File.SaveSelectedItemsAs , because i can trap them. For this i trapped WindowClosing event but i could not handle it , in any case window is going to closed which i dont want.I want to stop closing if file has changes and i want to flashy my own message to save the file with Save or SaveAs command. Kindly help me out. Thanks and regards, Ruhina Unfortunately what you're trying to do is not supported. However if you want to ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Request: Direct3D 10 Layer for Direct3D 9
Direct3D 10 Technology Preview Engine Abstractions / Separation Applications, including Games, that wish to support both Direct3D 9 and Direct3D 10 at the same time need to have the rendering layers abstracted from the rest of the code base. There are many ways to achieve this but key to all of them is the design of the abstraction layer for the lower level Direct3D device. All systems should communicate to the hardware through the common layer which is designed to provide GPU resource and low level type management. Maybe it’s only me but this is a step back in Direct3D usability. As much as I am like the idea of “No more caps” the price that especial small developers have to pay for it is high. I am sure we al ...Show All
