How to make form appear in all desktops of Windows 10 in VB.Net? - vb.net

I need to make a form visible even when I switch desktop on Windows 10 (by pressing Ctrl-Windows-Arrow) if possible, without any 2nd party lib
You can create multiple desktops by pressing Windows-Tab and clicking the + on the bottom-right corner.
Normally, a form only appears in the original desktop it was shown, and can be dragged to another desktop, but won't appear in multiples at the same time.
I know it's possible, because the splash forms of some applications do this. (Ex: Word, Excel)
I searched all over the web, but couldn't find a solution.
EDIT: Another app that I know that does this is the Task Manager, when you mark the "Always Show" checkbox.

This may be of some help. You have to dive into the world of AutoHotKey but this will solve your issues I'm pretty sure:
https://superuser.com/questions/950960/pin-applications-to-multiple-desktops-in-windows-10

Set your form's topmost property to true? Have you tried that?

Related

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

Show Networks Flyout (the "connect-to-network" thingie) without explorer.exe running

Requirements:
Our application replaces the usual windows shell (explorer.exe). This is a product requirement for a closed system that we're supplying.
We oughtta let the user select a wi-fi network and connect to it.
The problem: The wi-fi networks dialog only shows up when explorer.exe is running
What we tried:
Write our own wi-fi manager that uses wlan API. It lists connectible networks and allows the user to connect/disconnect. Problem: too many network types/configuratons that have to be tested, especially when the wheel has already been invented and reinvented all over.
Try and check how is the networks dialog implemented. It appears that it's and undocumented COM interface (IUIRAdioManager). Problem: it's undocumented, so no API
Use an existing network manager, for instance the one that comes with the driver. Problems: it's ugly, not to the product's taste; and it opens too many options for the user, like creating and loading profiles, browsing for files on a file system - these things are unacceptable.
Running explorer.exe just for the purpose of showing the networks dialog and then killing it. Problem: once we run explorer.exe - it pops up metro view and hides our fullscreen application or shows the taskbar.
The latter seems like the preferred solution: no need to reinvent the wheel, it does what's needed. Just gotta make explorer.exe not pop out, keep it quiet in the background.
So, we're down to two options:
How to show the networks flyout dialog without explorer.exe?
How to run explorer.exe without it popping out metro or taskbar above our application?
Your first solution would be incredibly difficult to implement. I am almost certain that the Networks window is dependent on explorer.
However, your second is entirely possible.
To hide the taskbar, you will need to find a window (using FindWindowEx) to find the taskbar (name is Shell_traywnd). This will hide the taskbar and start button. EDIT: Unless you are implementing your own taskbar, you might want to set the taskbar to autohide.
Next you will need to hide all of the metro programs. In a similar fashion as above, find the class named EdgeUiInputWndClass and close it. You should be able to get the process name of it and then kill the process.
Windows key. This is a little more difficult. You will probably need to use a program and delete the key or a keyboard hook (a low level keyboard hook) and just ignore key presses with the same scancode as the windows key. Left Windows is 0x5b and Right is 0x5c (source). Note that this will not block Ctrl+Alt+Del.
Finally, to show the Flyout, you can run %windir%\explorer.exe shell:::{38A98528-6CBF-4CA9-8DC0-B1E1D10F7B1B}
(source).
EDIT2:
You should also be able to hide toast notifications via this
Of course, I don't see why you cannot just use Windows 8/8.1 and put the app in kiosk mode.

IntelliJ IDEA back/forward with mouse

I want to move back/forward between editor tabs, using the two additional ("virtual") mouse buttons I have (RAZER DEATHADDER BLACK).
In Eclipse it's possible by default.
In IDEA I go to File->Settings->Keymap->Main menu->Window->Editor Tabs.
There I have Select Next Tab with the deault Alt+Right shortcut.
Then I open the Add Mouse Shortcut.
In that dialog I try to assign the back button of my mouse but without success. It doesn't react at all.
Anyway, googling a bit I've found this thread. I quote Alexey Gopachenko which seems to be an employee of IntelliJ:
As stated above - we can't support buttons if JDK on your platform
does not support them - and obviously it does not.
Anyway, that is totally wrong. My platform does support these keys - I actually work with them, on the same platform, on Eclipse and any other app, so it's IDEA who ignores them.
I'd appriciate a solution - how do I assign these back/forward mouse buttons?
UPDATE #1
I've found out that IDEA uses its own JAVA distribution (C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.4\jre on Windows 7), instead of the system's one - WHY?!
I'm almost SURE that is the reason I cannot use extended mouse buttons.
I've tried to trick IDEA by creating a custom Windows shortcut. Didn't work. I've also tried to create a SYMLINK in windows to my other, system-wide JRE distribution. Didn't work as well.
If someone come up with an idea on how to make it work with the system's JRE instead of its own - I think that'd solve the issue.
UPDATE #2
The above update #1 is not the issue.
I also had the same problem under OS X El Capitan. I just tried to add a new Keyboard-Shortcut and pressed than the Button 4 on the mouse and this worked.
Back/Forward mouse shortcuts work fine for me with Razer Mamba mouse, for example Back action is assigned to Button4 Click and I can confirm that it is recognized in this dialog when I click on the Click Pad area:
If it doesn't work with your mouse for some reason, you can try to workaround the problem using the Razer Configurator macro or key assignments:
Use the assigned key in IDEA keymap settings instead of the mouse shortcut.
Note that Eclipse is SWT based while IDEA is Swing based, so mouse event management is completely different. If JDK cannot recognize your device button clicks, it will not work in any Java Swing applications (NetBeans, JEdit, etc). In some cases running IDEA under a more recent JDK version may help (if support for your device was added in the newer JDK release).
I'm experiencing the exact same thing suddenly.
I realized my most recent change was to start using idea64.exe rather than idea.exe.
I switched back, and my mouse buttons are working fine again.
So, while this is not a complete answer, it seems as if it has something to do with the 64-bit version.
If the Razer driver's button mapping feature doesn't allow different mappings for a particular program, you can just assign the buttons to the mouse button number choices (mouse button 4 / mouse button 5) and then install a third party app that does support mappings for particular programs, e.g. https://superuser.com/questions/562972/how-to-map-bind-mouse-button-as-keyboard-button-in-windows-7
This question helped me although I have a Logitech Marathon Mouse M705, so I thought that I would share the solution in case other Logitech owners was in search for this.
I have a similar problem with a Logitech mouse and idea64.exe
Fortunately their SetPoint software allows for program specific settings.
This setting will have to be deleted and then reconfigured whenever you update IntelliJ and get a new idea64.exe :-)
I am experiencing a very similar problem and wanted to share my findings. I just bought a new Logitech M705 mouse. Within intelli-j the scroll right and scroll left buttons do not work. The forward and backward buttons also do not work.
I typically run intelli-j as administrator because I need higher privileges to run various tomcat services. When logging in as that user (rather than right clicking and selecting run as admin) all the buttons work! Also, when running as my normal user all the buttons work.
Also very curious is that I have an older generation Logitech mouse (same model, M705). This mouse has no problems with the scroll buttons and forward-back.
My solution for now is to use intelli-j as the user I am logged in as.
Check out this little tutorial from BetterTouchTool here. Basically for some mice (like Logitech ones) using the settings application they come with you can map default button actions to clicks and in doing so set a button number and use it as normal.
This works for my Logitech Performance MX mouse.
You can add mouse shortcuts, just click on an action in keymap and add mouse shortcut.
Alternatively Ctrl+Tab brings up switcher, which may be less clicks to navigate.

How to simulate mouse clicks?

I was wondering how to create a sort of auto clicker using VB.NET.
I would basicly have the click coordinates pre-defined and the clicks, which would have to be separated by delays I guess since I want more than one to happen periodically, would happen outside of the application window (I read this envolves extra system hooks?).
The only code I have been able to find is related to clicks on the application window, which is not what I am looking for.
In short: I want to click a button on the app window, which would initiate a number of clicks on certain pre-defined screen coordinates.
Thanks in advance :)
See this discussion on social.msdn: Simulate a mouse click in a program.
Uses winapi: SetCursorPos, GetCursorPos and mouse_event.
I believe you need to P/Invoke into Windows to accomplish this.
Have a look at the SendInput function.
If you are using automate the program,that program have some tabindex in order to relevant control.then you can use;
SendKeys.Send("{TAB}");
SendKeys.Send("{ENTER}");
it is more accurate on desktop application

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?