.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

Show WPF Window from any application via Com-Interop (OLE) Interface

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :WPF


I have a C# dll library which contains several utilities and WPF Windows.
I need to use these from an unmanaged application (actually written in Delphi 2009).
To do so I added an Ole interface to my dll.
In my initial call I start a thread and create an Application object in it whith its own Dispatcher.
Every time I need to show a WPF Window I do this by Invoking an the Applications thread.
This works so far, but seems to have a bit overhead when I try to open a WPF window for example.
Here is some of my code below:

  public interface IOleBridge
   bool Startup();

   void ShowWindow();

  // [ComSourceInterfaces(typeof(IOleBridgeEvents))]

View Complete Post

More Related Resource Links

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

application programming interface


Hi All,

I am about to prepare for the webapplication.I have no idea of how to go for it.Please provide me some outlines on how to develop the api for a web application.I am using WCF as my service for interaction with the web application.Also security is also a chief concern for it.

Best Regards

Video: Business Connectivity Services for SharePoint 2010 Application Programming Interface (API)

This video provides an overview of development with Business Connectivity Services. (Length: 3:07)

Application programming interface programming

Where can I find a good article or tutorial to understand basic concept to create an Application programming interface?

how can we show error in our application when exception occur in webs service

how can we show error in our application when exception occur in webs service

How to get what application is connected to the topmost window?

My VB.NET application is suposed to monitor what application currently is running in the topmost window. I have tried the following approach using a timer: Declare Function GetActiveWindow Lib "user32" () As System.IntPtr Declare Function GetForegroundWindow Lib "user32" () As System.IntPtr Public Declare Auto Function GetWindowText Lib "user32" _ (ByVal hWnd As System.IntPtr, _ ByVal lpString As System.Text.StringBuilder, _ ByVal cch As Integer) As Integer Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick    Dim Caption As New System.Text.StringBuilder(256)    Dim hWnd As IntPtr = GetForegroundWindow()    GetWindowText(hWnd, Caption, Caption.Capacity)    'Caption now holds the title of the topmost window End Sub By this I can see that for example Outlook or Internet Explorer is the topmost window as the name is in Window's title bar. However, if the user crates a new mail in Outlook the title of the window is "Untitled message" givning no hint of what application is running in the the window. How do I get what application is connected to the topmost window?p> Help is appreciated!

Cannot Show Visual Studio Tools For Application Editor

Hi All,I was wondering if someone would be kind enough to assist me with the following issue?Using Visual Studio 2008 and editing an SSIS project. Using a data flow task, create a script component, when I attempt to edit the script I get the following errorCannot show Visual Studio Tools for Applications EditorAdditional Information:The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)I've gone through the following articlehttp://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=367845with no success and I also reinstalled SQL Server 2008 and VS 2008 still with no successRunning on Windows XP SP 2SQL Server 2008 SP 1VS 2008 SP 1Any ideas would be greatly appreciatedRegardsJohn

How can I change the WPF window title bar size through Interop services

Hi all,      I want to use my custom title bar in my custom window. In that need a title bar with more height than default widow title bar height. How can I achieve this through window Interop services???? Thanks in Advance.. Suresh.

Disable redirector when Installing 32 bit application on Window 7- 64 bit

When I install my 32 bit apps on Window 7 - 64 bit, it redirects registries and data files.However, the current codes have hardcoded to read the regular location such as:"HKLM\Software\MyApps" and "\Program Files\MyApps"Is there a way that I can disable the director while install my 32 bit application to solve this situation?If yes, can someone please show me how to do so in c#?I found they mention about calling Wow64EnableWow64FsRedirection in Kernel32.dll.Thanks

How do you integrate a flex 4 application in a wpf window? (With Error)

I am trying to integrate a flex 4 application into a wpf application.   I am following an old forum post: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/39d558c1-5a76-4aae-be57-6aec9b8bf319 as a guide but it doesn't work correctly. The first thing I did was create the windows form control to add the flash control, i added a com component at C:\Windows\System32\Macromed\Flash\flash10i.ocx and added the Shockware flash object to the form.  added a URL property so i could set the file it would play and saved the formcontrol as mycontrol.   Then in the wpf application, i added a reference to mycontrol and windowsformintegration. then in the mainwindow.xaml i added these two lines at the top  xmlns:ax="clr-namespace:mycontrol;assembly=mycontrol"  xmlns:wfh="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" then in the grid i added   <wfh:WindowsFormsHost>             <ax:MyControl1 x:Name="FlexFlash" URL="fileurl.swf"></ax:MyControl1 >         </wfh:WindowsFormsHost> It compiles and runs but it doesn't actually display the application.... instread it stays blank.  Now to make sure that it's a valid url i posted it in a messagebox  and copy and pasted it into a

Oulook.exe hangs when Domain User launches application through Interop windows 2003 sp2

Hello,I have a problem using Interop.Outlook on a win2k3 sp2 server. For windows 2003 version prior to sp1 i could use a specific identity for application pool and i had no problems launching outlook.User was authenticated and delegated correclty. With sp2 the Outlook.exe process is launched by the domain user specified as identity (also visible on Task Manager Processes) but no exception or time out is ever thrown.  The only way that i can make this to work is when i set impersonate=true in web config (without setting userName and password as this would have exactly the same affect with the application pool identity).Are there any permissions that i can set to overcome this?Help would be greatly appreciated. Normal 0 false false false EL X-NONE X-NONE Appreciate

Define "show icon and notifications" as default for an application (.NET VB)

Hello,   I am looking for a way that my application when "minimized to tray" has its icon with the property "“show icon and notifications". The default property in Windows 7 is "Only show notifications"   Thanks,   Kalos

Define "show icon and notifications" as default for an application (.NET VB)

Hello,   I am looking for a way that my application when "minimized to tray" has its icon with the property "“show icon and notifications". The default property in Windows 7 is "Only show notifications"   Thanks,   Kalos

Show hyperlink and popup window when Mouseover on image !

Hello , I am developing a web application using asp.net, telerik RadAjax control. I have to need to develop when mouseover the image then show a hyperlink and when click the clink then open a new window(like facebook profile picture change). Please Help me...

How show the Visual of WebBrowser on another Window

Hello, basically my idea is to "duplicate" in realtime(i'd want to watch videos too) the visual of WebBrowser on another Window. I add a WebBrowser control and i use it for web navigation. In realtime, i want to project that navigation on another window (that i move to the secondary monitor). I tried to use VisualBrush setting the WebBrowser as Visual but it show nothing. How can i "duplicate" the visual of WebBrowser control? Is there any way?   P.S. Sorry for my bad english

C#Net2008 Window Application - F5 launch wrong FORM


Hullo Good Friend,

I encounter another interesting problem.

I need your help. Please help me.

I am writing a new C#Net2008 Window Application. The first FORM that was created is FrmSales.cs

Then I created another FORM FrmMainMenu.cs which is the Main Menu form with 6 command buttons to load other forms.

When I pressed F5 to launch the application, FrmSales.cs appears instead of FrmMainMenu .

What must I do to make FrmMainMenu the initial form to lauch. Which provide menu options for the user to select and load other specific FORM.

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