Use Window Like A Function / Pass In Parameters / Use Window / Get Data Out When It Closes?
Dec 13, 2011
I 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]
I have a web app which has a listbox of all the available reports for a particular user. I want to open a new page 'ReportViewerPane' when a row is clicked and pass the report name and some parameters through to the reportviewer.aspx I then need to set the ReportViewer controls .reportpath to the correct (passed through) value and set the parameters values (also passed through).
I the moment I have this in the parent page. 'PassParmString' is a textbox on the main form:
function open_win() { var Parms = document.getElementById('<%=PassParmString.ClientID %>');
I 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
I need to make a program for school that closes the active window. My application does now SendKeys.Send("%{F4}"). It works but, it also does it when there are no active windows. I want it to close only the active windows.
Within my Visual Studio 2008 VB.Net project I am opening multiple forms after setting the form (that is opening) to be an mdichild of the main form. This works in really well in most of my forms except one. I am doing the exact same thing for all of them.
Basically I declare the new form:
Using frm As New frmName() With {.variableName = currentVariable} frm.MdiParent = Me.MdiParent frm.openForm() End Using
Within the openForm subroutine in the form code I have:
Public Sub openForm() InitializeDataSources() ... ... Me.Show() End Sub
I know this works because if I remove frm.MdiParent = Me.MdiParent in the main form and change Me.Show() to Me.ShowDialog() in the child form then it works perfectly. Right now (for only one form) it shows the form for only a second (looks like a flicker when staring at the program) and then closes it.
What I want is to open a new popup from the server side, this pop up has a form with three fields, and then return this three fields to the parent page. But I want this fields in the server side, in the VB.NET code. Is this possible?
Can we pass parameters to a function using delegates
Private Sub UpdateLabel(byval text as string) If Me.Label1.InvokeRequired Then Me.Label1.Invoke(New MethodInvoker(AddressOf UpdateLabel)) Else Label1.Text = text
I need to pass all rows at once created in a gridview to another. With the following script i can only pass one line at a time when i click the button.
Private Sub btn_add_equip_ext_guardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add_equip_ext_guardar.Click Dim rowext As Integer = win_Comp_orc.grd_NoOrc_Exterior.Rows.Count
I have a repeater control that contains a hyperlink which the user will click to launch a custom aspx modal window. The hyperlink contains the "record id" value.
The user clicks the hyperlink, the code passes from code behind to javascript, which launches the custom aspx window.
How do I pass the record id parameter from javascript function so that the aspx modal window being launched can retreieve it, and run a sql query with that value.
I 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
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.
I 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
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.
I 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
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.
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].....
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?
If 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.
When 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?
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?
I 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
I 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.
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.