1

GTK# switch between Process window handles

Hi,

In a GTK# program. Does anyone know how to switch between Process Window Handles? For example if I press a button in a GTK# program it switches the window to process gedit (text editor), or switches window process to another GTK# program running.

Basically I'm trying to port some of my previous windows C# code which switches between windows (processes). For example in C# to switch windows I used:

[DllImport("user32", EntryPoint = "SetForegroundWindow")]
public static extern int SetForegroundWindow(IntPtr hWnd);

I simply passed the Process Main Window Handle to this function above. Is there something similar I can use in GTK# on MonoDevelop for Centos Linux?

Thank you,

Andy

1 Answers1

0

There is a library called libwnck: http://developer.gnome.org/libwnck/stable/ (Window Navigator Construction Kit) which handles all this functionality. There seems to be bindings for Mono called wnck-sharp which as far as I can tell, are included with gtk-sharp.

iain
  • 5,660
  • 1
  • 30
  • 51