How to allow code to run only if a window with specific window title does not exist? - vb.net

I have program that acts as a GUI frontend for a CLI program. I can set custom titles for the CMD windows that open (up to 4), but despite looking at other answers to similar questions, I can't piece together the code to check through the array for the specific window titles. Could someone help me out with an example?
EDIT: Including other questions.
how to get the window title of a process using vb.net
VB.NET Get Process list and kill process

Found a simple answer - you can use AppActivate() and checking the error numbers to check if the window title exists.

Related

AutoIt select item from menubar

i want to build some automation code that will select some item from a menubar of minimized (or non-active) window.
I have tried to do it with ControlSend function by sending some keys like alt and directions, but it's not working...
See my example:
I want to select the item "Select All", for this i wrote this code:
WinWaitActive("")
Send("{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
The code above works good, but i want that it will work when the window is not active, so i wrote this line:
ControlSend("", "", "Term Class1", "{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
This is not working for me, do you have some idea how can i implement it?
I too was trying to work with minimized windows but have since switched from windows so i wont be able to test things out for you. I have been told (and from experience) that you cant use control send (or the mouse click alternative which is called "control click") on applications that do not come stock with windows (applications that dont come with the computer, to put it simply).
However i came upon this (https://www.autoitscript.com/forum/topic/7112-minimized-clicking-great-for-game-bots/) which seems to be a 3rd party add in that lets you do just that, i tried using it but could not make it fit my needs. Perhaps you can, I would try to get it working for you but again, i dumped windows. The above link is the best candidate i have found, and by far the most promising after i searched and tested for about a month a while back, Good Luck.
EDIT: As always, i do not promise anything from the above link, you use it at your own risk.

"Action - Go to report" in VS2008 reportviewer not working

I have an SSRS report which drills through to sub reports via actions. The report functions correctly in the VS environment, and correct once deployed to the server and viewed through a browser.
The report however is also viewed inside our in-house app via a Microsoft.Reporting.WinForms.ReportViewer - and while it renders on screen correctly, clicking the element that would normally take me to a sub-report no longer functions.
I have had a look around and there seemed to be an issue around VS2010 SP1 where this stopped working, however I'm currently stuck with VS2008. This seems to be the majority of results I'm getting.
Anyone have any ideas?
Many thanks.
OK have found issue.
The text box in question had three place holders. A reference No, A date and an age. I wanted to trigger the sub report if someone clicked on the reference no. While this worked fine in VS and IE, it failed to work in the Microsoft Report Viewer control.
I have now set the action against the containing text box, rather than against a single placeholder/expression within that box. While this has solved the immediate issue that I have, it would not work if you wanted multiple actions from different placeholders in a single text box.
But for now, I'm all good, and all solved.

Vb Can You Run Another Program Inside the one you are making.

Hello All I was Wondering if it was possible to run another program in a window inside you're vb program? So here is what I was thinking I want to make a window with like three buttons at the top. Stop, >, >> The too arrows would be the speed. Then I want another window below this to run a program called NCO view which is a Cnc simulator. Is This even Possible? If so can I know where to start and where to find information on this.
Your question is a bit ambiguous and can't figure out what you're expecting really but YES this is totally possible in vb.net.
If you've got several process simultaneously, you can launch them on different threads. (Parallel programming)
And if you need several forms you can proceed by using Modal form: follow link

getting position (x,y) , width and lenght of Lotus Notes window in 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.

UI Designer not in Solution Explorer and unable to get the tool

First of all, I am developing an application in VB.NET, till yesterday it was all good. I saved the project and closed it, now when i started working on that application, i found that there was no way to open the UI area for the application. I am able to see the code behind it i.e. on dashboard.Designer.vb but not the UI. I am able to see the the application after running it using F5. What would be the possible reason for it, and how i can solve it.
Secondly, i tried to find search a lot for this tool but unable to get any, if somebody can tell me what tool is this or any similar tool, it would be of great help.
I was searching for long and found the answer:-
What we need to do is just add the following code in the blank dashboard.vb file
Public Class dashboard
End Class
And this will get the form back.
The second question was answered by #Code Gray
1. Outlook like sidebar and display in Outlook
2. Outlook navigation bar control for .NET application