I'm trying to be able to get the caption of the currently active window. I've figured out that I should be using GetForegroundWindow, but when I use it I'm just getting a long string of numbers, which I think is the handle. How do I go from that to the actual caption?
give me a working example of "GetWindowRect" or something similar that would give me coordinates of a window by caption?The bold and underline won't come off so I'll just keep typing. I have googled and tried over 10 pieces of codes now. All of them are old and do not work. I found 1 tht works but thaat is for the topmost window only and I cannot make it work with caption.
All 3 labels are named the same. The one i am most interested in is a progress % counter (1%, 2%, 3%, etc..)How can i get the value (using a timer of course) from that label without knowing the caption of it at any given time?
I cannot get a tool-tip to appear over a DataGridView object, although checking Microsoft's advice, it should do so, as I assume I have a DatSource property NOT set to 'Nothing' for the said DGV. ( I believe this is right, as the columns sort alphabetically, when I click the column headers ! As normal ) If I can get this to work, is there a way to get the underlying data from a Mouse Hover ( Cell Enter ) event, from the cell in question to modify the Tool-Tip's caption ?
From a macro I am accessing a command that is on the toolbar:
Dim name As String = "Macros.MyMacros.MyMacros.ToggleExceptions" Dim cmd As EnvDTE.Command = DTE.Commands.Item(name)
How do I now change the caption of the command on the toolbar? It does not seem to have the necessary properties. Do I need to cast it to something else?
im using vb.net to open IE and go to a website... i can figure out how to size the window, but not change the windows location on the screen... how can i make the IE window position always 0,0
Dim oIE As Object Dim hWnd As Long oIE = CreateObject("InternetExplorer.Application")[code].....
I've been using the FindWindow API for some time now, and it seems as if the function opts for an Windows Explorer window before any other window with the same window title.
For example, if you have a folder named Calulator open, along with the Calculator application built into Windows, FindWindow will return the handle to the folder every time.
I just thought this was an interesting occurrence, and I was wondering whether anyone knew if this is the case every time (an Explorer window over any other window) when using the FindWindow API.
I've been trying to use the FindWindowA api and also the FindWindowEx api in a little VB.NET 3.5 app and it doesn't appear to work. I get a positive long value returned whether I have an open window with the correct title or not. Anyone else noticed this?
Am trying to detect if a window is running, the result always returns a rather large number instead of 0 and I'm not sure why. All documentation I've read states this is right.
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim ClassName As String = vbNullString Dim WindowName As String = "some fake window"
[code]....
but is there a way to search for a single process without using a For statement?
I just can't seem to get this right, what I'm trying to do is use FindWindow to find the windows of more than one window. Here is the code:
app_hwnd = FindWindow(vbNullString, CheckedListBox.CheckedItems)The thing is, if I use .SelectedItem, it only finds one window and if i use CheckedItems/SelectedItems it gives me an error: "Value of type 'System.Windows.Forms.ListBox.SelectedObjectCollection' cannot be converted to 'String'."
So right now, I'm confined to using FindWindow for only one window--when I want to do it for more than one window.
Does anybody know what is the equivalent of findwindow or findwindex in vb.net. Here is what I am trying to do. I am reading a Real Time Adherence window that is dynamic(assumption) and is constantly refreshing. I have tried Findwindow and Findwindowex although I am able to get to the MDIclient and then to the window there is no "edit" field for me to read off. I have tried Spy++ and it also sees it but it does not have an available control for me to read the information.
I am developing an application that reads an MDI applications child window and grabs the information from a control such as a textbox or listbox. I have tried to use Findwindow in order to accomplish this. I have gotten all the way to the control, but once I get there it returns blank. Can anyone point me in the right direction to accomplish this.I am able to read the window title and get the control title but when I send a message to the window it returns 0. Now I am just experimenting so I have no concrete code, but here is a snippet.
I need to send two keys (" " and {Enter}) to a security warning in an Acrobat Window from a VB.NET application. Here is the function I use :
Private Sub SendAcroKey() Dim HWND As IntPtr HWND = FindWindow("Adobe Acrobat", vbNullString)
[Code]....
But I can't get FindWindow() to work properly, it always returns "0". I guess I'm not giving the good parameters, lpClassName and lpWindowName, but I dont now how to get the right ones. So here is the question : How can I know the lpClassName and lpWindowName of a security warning in Adobe Acrobat 7 professional ???
I really have to work this out but theres not much information on the web about those function, even on MSDN.
Public Class Form1 Private Shared Function FindWindow( _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As IntPtr End Function '.... End Class
My question, what value should be passed into Function FindWindow(lpClassName, vbnullstring)? Can I use "Form1"?
I have spent the last 3 hours trying to figure this out with no success:The WIndows XP phone dialer has a "Hide Calls" available from the context menu, can someone run Spy++ (or similar) over it and let me know what message i should be looking out for to fire the "hide calls" option. Also, do i send it to the child ("Preview") or the parent ("Phone Dialer")
This same (Identical ) code works well in another program but does not in windows service... Returns 0 for window handle ...?
Public WindowStr As String = "ImagSrvWindow" Protected Overrides Sub OnStart(ByVal args() As String) 'necessary to get control to paint Pic&Txt boxes in stream of Browser navs
I have an application (chat) that I am developing for our company (special requirements). We are mostly using WinXP computers. I want it to be topmost and docked to the right, the problem is, I don't want it to overlap other windows that people are working on.
Is there a way to change the default area that other programs can maximize to? Basically, I want it to look something like this: Is something like this possible? I'm using VB.net so all .net answers are accepted.