.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

EndScene function is called with several Direct3D devices.How to find out which one is a WPF window,

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :WPF


I am working on a screen grabbing application, which has a feature of grabbing a particular window. To make my application working with WPF applications with a good speed, I have chosen a "Direct3D hooking" approach for grabbing image of a WPF window, which means that I install hooks for some Direct3D calls, specifically, EndScene function. This works because WPF uses Direct3D for rendering windows contents.

However I ran into the following issue:
EndScene is called with several Direct3D devices, not a single one. I have looked into contents of each device's back buffer and found out that in addition to main window rendering, there are separate devices which are used for rendering of menus and tooltips.
However EndScene is called just with a pointer to a D3D device which is used for rendering and no information about whether a main window is rendered or a menu/tooltip. Also no information is available about position of menu/tooltip relative to main window coordinates (so that with that information I could compose a single image rendering images of window and menus/tooltips together).

So my question is: given Direct3D device which is used for rendering a window, how to identify a window (WPF window) by ob

View Complete Post

More Related Resource Links

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

Need function to find difference between two dates


Hi all

I need a function written in vb to find the exact month difference between two dates.

For example

    Start Date : 01/01/2010

    End Date   : 15/02/2010

 then the difference value should be like this 1.5  i.e i need the difference in decimal value.

WCF Service Function Getting Called Twice


I have a WCF Web Service.  I am trying to test the service from a web form.  The web form calls the service using WebOperationContext.  The call successfully sends, however the web service function gets called twice while stepping through the code.  Nothing happens in between the first and second function call.  Not even setup of the Service.  The function itself is building a Generic List<Of Type T> and adding objects to the list.  The odd thing that happens, if I do not make the call to the add function, the Service function doesn't get called twice.  I'm including the network log collected from the network layer.  I can provide more source code if need be.  

How to create a "search function" to find files and folders using C++ windows forms?

As mentioned above, how can I make a windows forms application that searches for files and folders specified by the user and display results in a ListBox? Thanks in advance another question: How can I make a textbox transparent? I would be really grateful if anybody told me what books are good to learn windows forms using C++? thanks again

Fail to create window in C++ DLL called from C#

Can anyone help here, please? http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/5b47544c-8151-4c8a-a8c3-14fbeabbbb41 Thanks in advance.

can the void main function be called all the time, when activated as a feature.

Hi, I have a console application using C#, in which i have a custom code under the static void main. I would like to know, if the console application is made to a feature and activated, will the static void main function be called all the time, without waiting for any events to be trigerred. Thank you

How do I find which queries use a given function



I have a Table-valued Function and a large number of views that potentially use it, I would like to produce a list of views in which the function is called as I need to edit each to make changes.

I am using SQL Server 2005, I have used the right-click to look at dependencies and this brings up a short list of SPs in which the function is used. I know there are views that call the function.

I hope this makes sense.

SSIS Function for find the Occurance of a character


Please help me to find the solution for the below requirement.

Input data: "AAAA,BBBB,CC" or "A,B,CCC"

I need to check whether the record is having any comma(,) or not. I need to check this this in a "conditional split transformation".

Please let me know which function will help me.

Many Thanks,


Cannot find either Column "dbo" or the user-defined function or aggregate "dbo.GetCandiateID", or th



Good morning to everybody. I am not understanding why I am getting the following error (also mentioned in the subject line).

I have written the following function in SQL Server 2005:

    declare @candidate_id int
    SELECT @candidate_id = max(c.candidate_id) from dbo.candidates c
    if(@candidate_id is null)
        set @candidate_id = 1001
        set @candidate_id = @candidate_id + 1
    return @candidate_id

The function compiled properly. I have used the above function like below in the query:

select dbo.GetCandidateID()

I am getting the following error:

Cannot find either column "dbo" or the user-defined function or aggregate "dbo.GetCandidateID", or the name is ambiguous

How to call a Public function of a window from another Window in WPF


How to call a Public function of a Mainwindow from another Window in wpf using VB.Net?

I checked this thread and tried to implement similar way as follows

1. Created an instance for the main window and declared a public function

Public Interface IMainWindow

 Function Show_Tickets(ByVal p_Para As String) As Boolean

End Interface

2. In the Mainwindow

at Initialization part

Class MainWindow

 Implements IMainWindow

3. Implemented the Function

Public Function Show_Tickets(ByVal p_status As String) As Boolean

how to capture value of javascript function called by GridView Linkbutton Click



i have gridview with linkbutton.when i click linkbutton it should call javascript function which returns value would be input for database functions.

how do i capture javascript function retun value(i am using Registerclientscriptblock)? and that should be input for database function.

Inshort i need to call two function from link button click - one javascript function,one ado.net function which will update value in database.

output of javascript function will be input for database function.

function Getlogitudelantitude(address)


return "35.3434343,-74.334343"


Linkbutton_click(object sender,Eventargs e)


register javascript function .. which should return value

string s = "35.34343,-74.334343"

then call database function(s) - does database operation


please reply..



Program to find first non repetable character in a string without using any buitin function?


Program to find first non repetable character in a string without using any buitin function?

Find window is hidden behind some other window when floating



I don't know what I did, but my Find dialog is hidden behind some other window when floating.   After I open find window, I can type "ffrwe2t4rtgf" and it'll come and tell me that "ffrwe2t4rtgf" is not found, but I can't see the find window.

Only way I can see it is to go to Windows then click on "Tabbed Document" then find window will show as a tabbed document.  But I'd like it to behave in its default behavior, which is floating dialog.


Anyone have any idea how to resolve this issue?


Thank you in advance!

How to freeze the background page when modal popup window called



when i call modal popup extender the background is scrolling , i want to freeze the background page then
 is there any properties or any other idea to get this .. 

Error "Could not find server 'System' in sys.servers" with non-context connection in CLR function


When trying to open a non-context connection in a CLR scalar valued function I am receiving the Exception:

Could not find server 'System' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers

I encounter this problem on two different SQL Server 2005 servers. The error seems strange to me since I am not using linked servers.

Here is an extract from my function:



class LimitSystemFunctions
  public static<

Need a function to find and format initials in a string


the following rules need to be applied to initials:

- if a two letter initial is required, type them in capitals with no space or stops between them. (eg. BB Construction)

-If a name requires an initials follow it with a space with no stop (eg.  A Sander Davids)

- initials should always be in caps

I need a function that can do the above, any help will be appreciated.


invoke or begininvoke cannot be called on a control until the window handle has been created


Hello , Our application use the SQL 2008 R2 express edition 32/64 bit .

Now we have a new upgrade for our Application but we need to update the Existing SQL 2008 R2 express to a SQL 2008 R2 advanced services

to install the add-in Full Text Search.

When we do a upgrade during the setup , maintenance / upgrade , First we get a completed messagebox , after 1 min we get

the following error : invoke or begininvoke cannot be called on a control until the window handle has been created.

On the internet / microsoft there are patches for this known issue but not for the R2 version only for the SQL 2008 Express .

What can I do to update my SQL 2008 R2 express edition to a edvanced edition.

Anybody ?

Thanks , Yours Sincerely

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend