getting position (x,y) , width and lenght of Lotus Notes window in vb.net - vb.net

I'm trying to get the starting position (x,y), the width and the lenght of a Lotus Notes application window from a vb.net application.
so far, I've tried using Process to do the trick but I can't figure out what to use after finding the good process in windows running process list. The only "usefull" thing which use or see the UI is the Process.MainWindowTitle. It does give the title of my Notes Window but As I said, I want coordonates, width and lenght.
I also tried using back-end classes: COM object lotus and domino
But nothing in those have necessary stuff to fill my needs.
I would also need the state of the window, something like
SHOWNORMAL
HIDE
RESTORE
SHOWMAXIMIZED
SHOWMINIMIZED
...
EDIT
I want to get the position of the window to modify the position of my application. Also I want to resise and modify the position of the Notes client. My goal here is to make both of my application and the Notes client fit in the screen.
Any help is very apreaciated!

I did something like that using the Windows API some years ago. Right now, I got no examples about that, but what I did it was this: get the handler from Lotus Notes window, and then, get the handler from an embedded view, and simulate a click event to set the focus in it.
You can use the WinAPI, but that's not necessarily the best approach. You should consider other alternatives as Karl-Henry Martinsson says.

Related

VBA draw a box on another application

I'm writing an implementation of the windows UI automation client in VBA and that's going pretty well. But I would like to be able to draw a simple box around the UI element of another window. I'm aware of the inspect.exe application, but was wanting to recreate some of its functionality in VBA for instances where company policy restrictions prevent me from installing any 3rd party applications. Code I've written myself can be copy and pasted from a paste bin account.
Is there something in the windows API or a reference I can import that I could use to draw a box on top of another screen at specific coordinates for a second or two? I'm trying to limit this project to just things that come with an out of the box windows installation.

display a popup inside external application

I'm developing an application in which, if I press a combination of keys shows me a popup inside the form of another external application, I mean something like the "windows game menu", but I have no idea how to show the popup in the external application. I leave you an image to make you understand what I mean as a popup. sorry for my english but I do not speak.
Thanks in advance
You cannot control one application form of another application without having access to its code or knowing if a queue messaging command has been set for doing it.
It is possible to program a window of your application to be shown over any other , likely this will not be working over a Directx - OpenGL full-area, i.e. when you are playing a videogame that is using the same functionality because the last one is winning.
In this case your popup will be visible barely as a flick, but considering standard form application you can make it to stand over by working with userd32.dll method
"SetWindowPos" with the flag HWND_TOPMOST.
You will need first to detect the position of the application window, or if it is a fullscreen one you can simply detect the size of the screen and consider to place it in the center, then you can set the position of your application form "pop-up".
Details about the SetWindowPos , which is among windwows base dll but can be invoked from .net here below:
https://learn.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setwindowpos
Make a window topmost using a window handle

Is it possible to attach my window to a window of another application?

On Windows we can find the window handle of running process and attach our window onto it as a child window, so the two different processes look like the same one.
I wonder if there is a similar way to implement this requirement in cocoa.
This is possible using code injection. Have a look at mach inject framework and PorcShark Finder.
Or
Find position of another window using CGWindow methods and display your window over it.
Have a look at Son of Grab sample project.
Son of Grab shows how to use the new CGWindow API to get images of arbitrary sets
of windows, including images of the current contents of the screen.

Get live screenshot of window in objective-c

I'm trying to find a way to get a live view of a specific window. In the same way that Mission Control and Exposé will show you live views of windows that are currently obscured by other windows (this is also done by Hyperdock, so I'm pretty certain that its not a private API).
What is the functionality called? And so where is the documentation on it?
You want the Quartz Window Services API. Basically, you want to create a window list with the windows you're interested in and use CGWindowListCreateImage to get a picture of the window's contents.

Silverlight - Lync Application nested in a table

I'm very new in Silverlight and the Lync-SDK. So sorry for the question from a beginner.
Long time ago, i wrote al little web application, based on php for reading out contacts from a sql database.
Now the customer expand his envoirement and place Lync. Now he want the little Lync-Status-Square in the webapplication for click to call features.
I playing a little bit with the SDK of lync.
The following problem comes up. The square of Lync is nested in a td of my table. But the Lync-Silverlight-Applet need dynamical space for hover effects or single clicks. But in my table, i have no space, specially dynamic space.
So i switch off all hover and click functionality and place the follwing buttons in the StackPanel separate.
PresenceIndicator
StartInstanceMessagingButton
StartAudiCallButton
SendEmailButton
Two of them are fine.
Clicking on the IM-Button, The Lync Client opens the right Contact in IM-Mode and i can directly type a message. Perfect!
Clicking on the Mail-Icon, an Mail-Client will open, perfect.
The PresenceIndicator just display the color, not the exactly state, thats a problem, when the color is yellow. I can display the state in a TextBlock, but i prefer a label appears while hovering over the icon.
But my mainproblem is the StartAudioCallButton. This Icon is an dropDown-Icon. And i have no space for dropdowns. I would be so nice if this icon has the same behavoior like the IM-Button. The Lync Client will open in Call Modus and i can select, which callernumber i will use. Is that possible?
Thank you for Your time!
Frank
If you're having trouble with the layout of the standard Lync SilverLight controls, then the best thing to do is implement your own SilverLight controls for the function you're having difficulty with.
User Controls are really simple to create, there are plenty of tutorials on how to get started if you're not familiar with the process.
The Lync SDK has some great walkthroughs to get you up and running with signing in to Lync and placing an audio call
I don't know of any way to get Lync to open in a Call Mode as you suggested, but if you're limited with screen space, maybe you could have your custom StartAudioCallButton open a popup with the phone numbers in?