Adding A Window Listener To A WPF-Window?
Jan 15, 2010How can I add an window/event listener/handler to a wpf-window? I want to know, if the user wants to close the window.
View 2 RepliesHow can I add an window/event listener/handler to a wpf-window? I want to know, if the user wants to close the window.
View 2 RepliesHow can I add a little Toolbox Window to my app. I've tried using a normal Form, as soon as it appears I have access to its buttons, but the Main Form is then unresponsive until I close the Toolbox.change this behavior so I can have access to both the buttons on the Toolbox as well as the Main Form controls.[URL]
View 4 RepliesI am trying to find the handle of the child window for the Yes button in the User Account Control window so i can click it. This window has a structure with a few child windows with the same name.
Dim hwnd As IntPtr = FindWindow(Nothing, "User Account Control")
Dim hwnd2 As IntPtr = FindWindowEx(hwnd, 0, "DirectUIHWND", vbNullString)
Dim hwnd3 As IntPtr = FindWindowEx(hwnd2, 0, "CtrlNotifySink", vbNullString)
Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, 0, "Button", "&Yes")
There are multiple CtrNotifySink with its own Button child window or other child windows. How do i search thru the different CtrNotifySink window to find the one that contain the Yes button so i can send a click to it? I do need to find it before i can send a click, right? because i try just sending it to the main window with sendmessage and nothing happen.I even try sending it directly to the handle found by spy++ of the yes button with bm click but nothing happen?
I am trying to pass query string from one page to popup window as follow:
Dim popupScript As String = "window.open('cFinder.aspx?cName=" & c_TextBox.Text & "','', 'width=420,height=200,menubar=no,scrollbars=yes');"
If (Not Page.ClientScript.IsStartupScriptRegistered("popup")) Then
[code].....
Excuse me for posting this, but I have searched both Google along with this forum before asking this question, maybe I'm not using the right keywords but I apologize if it's easy to find.I would like to know how one could close a third-party window (application) if a specified string was found in the window title.
View 2 RepliesI have a VB.NET application that uses Managed DirectSound to capture audio.Everything works just fine until (a) the application is minimized or (b) the application is completey obstructed (covered) by another window.
The thing is that the CaptureBufferDescription structure does not include a GlobalFocus property so I don't know what to do to let my application continue capturing when the main window is hidden.
Here's the basic initialization code I'm using:
' Create a buffer description object
bufCapDesc = New CaptureBufferDescription()
With bufCapDesc
[code]....
border of that said window so the only place the mouse can't click the titlebar and the minimize,restore, and maximize button. The height of the titlebar depends on what OS the user is using so I'm having trouble because I can't give a definite value for this. How do I detect the height. and also for border i'm not sure if the borders have different widths with different operating systems. I'm using windows XP on classic mode, when I change to the themed mode, the height of the title bar changes so it won't work.
View 3 RepliesI would like to know how one could close a third-party window (application) if a specified string was found in the window title.
View 4 RepliesI am looking to close the application when I click a cancel button in a login page, but I don't want to do it in such a way that Window 2 closes itself, but by sending some notification to Main Window, and Main Window closes the application. Here's the code that I have so far:
(in loginPage)
Public Event CloseApp As EventHandler
Private Sub CancelButton_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CancelButton.Click
[Code]....
I have create a project with one main form window and also i have to use a number of other forms as well. now i want to open these other forms inside the main window and not outside. I'm using Visual Studio .NET 2010 as developing environment.
View 1 Repliesim 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].....
If you have ever noticed in the Task Manager, when you right-click on the running task, you have many options which include 'Minimize' and 'Maximize'. Is there anyway to do achieve this in vb?
View 1 RepliesIf I show a new non-modal child window using .Show(frmParent), and then the parent window is minimized, the child will get minimized automatically as well.
View 2 RepliesI am creating a window that is a generic keypad for editing numerical values on a touchscreen. I would like to press an 'edit' button to create a copy of the keypad window/bring up a reusable version of the same window (I don't care), but pass in parameters: the old value I'm manipulating, and a title to be displayed above the number pad. I would like the user to be able to type in the new value, then press the 'done' key to submit this value and have it sent back to the main application window into my custom control that contains a text box.(I have the number pad's layout sorted out already; I'm already using a variation on it to set a global password 'access level'. It's getting the information in and out that has me scratching my head.) [code]
View 1 RepliesWhen I run project splashscreen is popup and then Logon window is run. But unfortunately when Logon window is run the splashscreen still open like maximized window and I cannot see Logon window. How to fix that problem?
View 1 RepliesSo I'm adding a tab panel to a child window. A lot of our controls here are user defined but this looks like an ExtJS issue. When I add a tab panel, and then try and add controls and stuff to that panel, everything is cut off on that panel.
Here is the code I am using:
Using ViewDetailsWin As New Pages.ChildWindow
With ViewDetailsWin
.IconCls = Model.WorkflowStepDefinition.SmallIcon
.Ref = "viewDetailsWin"
[code].....
I can't even see the dropdown at all unless I scroll on the tiny little scroll bar it creates. It gives like a quarter inch on the screen to see anything inside the tab panel. There is no size property on the tab panel from what I can see.
how to retrieve microsoft access filenames from a particular folder on my computer? Within my project the user can create a database, and i want to be able to display all of these databases in a combo box?
View 8 RepliesI have application with 2 forms (Form1, Form2), when i click in a button in form1, form2 open.when form2 opened & I switch to other window and try to switch back to my application (By clicking in its icon in taskbar), it switch to form1.I need when form2 open & click in taskbar, it switch to form2 & also when form2 open I can't edit or type anything in form1.Exactly the same as the below scenario in windows:when I open any new window from "Windows Properties" (Right click my computer), and switch back to windows properties, it will switch to the new window not to the main Windows properties window
View 2 RepliesMdiChild window Snaps to edge of MdiParent window
View 7 RepliesI am trying to pop up a window on clicking of the link within datagrid and passing textbox id with it. And on closing the popup window i want to set the value of the textbox control within datagrid need to be updated.
My code is:
<A onclick="window.open('webform5.aspx?textbox=rated_kw','cal','width=250,height=225,left=270,top=180')"
href="javascript:;"><IMG src="images/exclamation1.jpg" border="0"></A>
and on popup window page:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim strScript As String
strScript = "<script>window.opener.document.forms(0)." + control.Value + ".value = '"
strScript += "35"
[code]....
It works fine when the link is not within datagrid.
I have the following function that should make the window always on top of other applications.
Private Declare Function SetWindowPos Lib "user32" _
(ByVal handle As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
[Code]....
The problem is that it reduces the window size so that you can only see the title bar and min/max/close buttons. Also, even that does not stay on top of other windows.
I have used this function before on a windows 7 machine (instead of xp which this one is on) and it worked fine.
I want add Glossy Button in my VB.net Window Application. How can I do it?
View 1 RepliesI am trying to add a checkbox column to a DataGridView in a simple window forms application.
I am pulling back some data from a database using ADO.NET, putting into a datatable, and then setting the datagridview datasource to the datatable. I then want to add a checkbox column as the second column. So far I have this code that seems to work:
' Code here to connect to database
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable
[Code].....
This code 'works' and I get MyDataGridView to show the data with the checkbox column in the correct position in the table.
However, for some reason, I cannot check any of the check boxes in the DataGridView? I have tried lots of things (e.g.altering the readonly state of the column) but cannot get it to work.
I have a vb.net application that, when a short cut is pressed, a window pops up. I also would like to make it completely invisible, unless the short cut is pressed. In the default class that houses my code for noticing the short cut and coordinating the events of the short cut, I have placed the following code:
Me.ShowInTaskbar = False
I have isolated this code as the issue. The issue is that my application does not work when it is not shown in the taskbar. This is only the default form - for the pop up window I have a separate class. How can I create a workaround for hiding the window in the taskbar and hiding it in general?
Btw, this is my hotkey code:
Public Const MOD_ALT As Integer = &H1
Public Const WM_HOTKEY As Integer = &H312
Public Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer
[Code]....
I want to take a snapshot of the foreground window without using print screen key. So far the only think i can do with the foreground window is get its title but If i can get the size and location then I can get cordinates on where to set capture with graphics.copyfromscreen.
View 3 RepliesWhen using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window?
how to get the popup to appear in the same browser window.
I have the following function that should make the window always on top of other applications.
Code:
Private Declare Function SetWindowPos Lib "user32" _
(ByVal handle As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
[code].....
The problem is that it reduces the window size so that you can only see the title bar and min/max/close buttons. Also, even that does not stay on top of other windows.I have used this function before on a windows 7 machine (instead of xp which this one is on) and it worked fine.
How can I get the handle of the window that is below (or behind, whatever you call it) the foreground window?
View 2 RepliesI have A Wpf window with a Public Sub function(Window1). I need to execute that function from another window. Something like this:
Private Sub Window2_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Window1.Loaded
Dim Window1 As New Window 1
[Code]....
I deal with a lot of com class code. So, my code generally doesn't have a UI.I can't count on the calling code UI to handle the progress nor would they know the progress of my routines. I'm used to a language that allows you to call a progress window from any code. I've been banging my head up against a wall trying to find a way to create a simple Custom Control that I can simply call from my code that opens a modal window to report the progress.No matter what, I see a need for the backgroundworker in my code. But if the backgroundworker is declared in my code, I can't expose the doWork in the doworker sub.
View 1 Replies