Call A Public Sub Procedure From A "ParentForm" If We Have Dim ParentForm As Form = CurrentTextBox.Parent?
Sep 20, 2009
I have a Visual Basic form with a public sub procedure called xecute_Public_User_Defined_Sub_Procedure.I tried to call the sub procedure from the "ParentForm" below but could not.
Dim ParentForm As Form = CurrentTextBox.Parent
If ParentForm IsNot Nothing Then
ParentForm.Execute_Public_User_Defined_Sub_Procedure()
[code].....
View 1 Replies
ADVERTISEMENT
Apr 20, 2010
When internet explorer open and have it maximized on the screen, and if then goback to my application and then click on menuitem. Which popups a child form. Upon closing child form, parent form loosing its focus and IE show uop on Top of my application. How i can i activate my Application when any child form closed.
View 1 Replies
Nov 26, 2010
i have a MDI application with parent and childforms.
i have a global timer in a module that makes a com search and writes the result to a parentform status strip label.
the problem is that the label do not change.
i have tried the following:
1) on timer.elapsed
parentForm.statusstriplabel.text =...
2) to create a delegate and invoke a parent form function
3) to create and raise an event
although all 3 seened to run the label didn't changed.
the timer was created in a different module than the parentform class for many reasons.
one of them is because i want to access the timer.start , timer.stop from all the childforms
when i tried a local timer to paretform worked perfect but i couidnt start and stop it from the childs
View 2 Replies
Sep 5, 2010
I'm developing this Usercontrol and I want it to capture theParentForm 's WM-Messages.I know how to just Subclass a Form, from the Forms code. Like:[code]But how do I do this from the Usercontrol? In VB6 I would have used code like:[code]All I want is to capture messages from the ParentForm's Window.
View 5 Replies
Dec 31, 2011
I am in the process of upgrading a VB6 Project to Vb.net. My problem is that when I open a child form in my project from within the Parent form a new instance of the Parent form is created. The code is fairly simple:
frmnewContract.MdiParent = Me
frmnewContract.Show()
View 3 Replies
Jan 31, 2009
my problem is that i have an MDI Parent form. it has lots of child forms. on my MDI Form i have the toolbar buttons Add, Delete and Save.all or most of the child forms, i created a custom public procedure Sub AddNew, Sub Delete and Sub Save.what i'm trying to do is when i click the AddNew in the MDI Form, it will run the custom public Sub AddNew of the currently ActiveMDIForm. i have tried...
DirectCast(Me.ActiveMdiChild, Form2.AddNew()
but i'm getting an error "Unable to cast object of type 'Form1' to type 'Form2'" if the currently ActiveMDIChild is not Form2.
[code].....
View 5 Replies
May 18, 2010
Just had a small doubt.Say i use something like this
vb Dim ownr as New Form1Dim Dlg as New Form2ownr.Showdlg.showdialog(ownr)
how should i call an public function of form1 in the form2 if form1 is owner of form2, and also if form1 is not the owner of form2 should i use FormName.FunctionName in both the cases.
View 3 Replies
Jun 3, 2011
I have two forms. Form A and Form B. Form A has a datagrid that is populated from a SQL Database Table query. When a button is pressed Form B is launched that allows you to add a record to the database table. I need for the datagrid to be refreshed and show the newly added record when I close form B and go back to the parent.
[Code]...
View 2 Replies
Aug 4, 2009
I need to know the proper way, or maybe I should say, the different ways to call another form from a parent or preceding form. I am currently using ex: formname.showdialog() to call my next form, but I am uncertain if I should be using that in every situation. [code] Whats the difference between these different methods? (ex: .showdialog() , .show() )I tried both of these to open a temporary form to retrieve a persons name from a database, so as the users progresses through my training program they can keep track of their scores.But, I also call other forms as I branch through my program, from the main page, to a secondary page, to a testing page, to a results page and then back to the secondary page
View 5 Replies
May 14, 2010
How can I disable the parent form when I call a child form?This code doesn't disable the parent form like I thought it would:
frmChild.ShowDialog()
View 2 Replies
Sep 25, 2011
I have a class inhert ToolStripButton. it builds a new toolstrip button. the button will be added to the toolstrip which is on main form.
I will need call function in the main form. what's the right way to do this?
now, I pass the main form when create the class. but I guess the right way is to raise the event in main form.
but, how about the properties in main form?
if I raise the event, will it run the event first, then go to the next line of the class? or, just raise event, then go to the next line in the class immediately?
View 3 Replies
Feb 8, 2012
I am trying to create a project in VB 2010 like I have in VB6. In VB6 I have a parent form which opens a child form. The child form displays calls (customers) on a spread sheet control that are on hold. The user selects the call in the child form, it calls a sub in the parent form passing a record number to identify the customer. The parent form then "pulls" up the call and and connects the user to the caller with all of the customers information.So, I haven't done this in VB NET and I have searched to see if this would be done the same way in .NET as it was in VB6, but I haven't found much decisive information. Is a parent/child form the way to do this?
View 10 Replies
Oct 20, 2009
Could i call the child form events like (closing ,load, activate,closed) .
View 6 Replies
Dec 7, 2009
I have two form :
class form1 'parent form dim number as integer
public sub create ()
dim f2 as new form2
f2.MdiParent = me[code]....
In form2.vb how to use variable number and method test
View 3 Replies
Feb 8, 2009
main Form1 has button1. What code do I need in button_click event to call and run Form2(or dialog1) which has been added to the project.
View 2 Replies
Feb 21, 2011
main Form1 has button1. What code do I need in button_click event to call and run Form2(or dialog1) which has been added to the project.
View 3 Replies
Jun 26, 2011
I am having a toolstrip in the mdi form which contains save, update delete and clear buttons. The child form is having save, update, delete and clear as public sub routines , and client form will not have any standard buttons, I will click the respective button in the parent tool window which should call the child forms function.
View 1 Replies
Nov 17, 2009
I'm trying to make an MDI parent form to call other forms. I have put this code which I found in a post here into the main form which I added to my project as an MDI parent form:
[Code]...
I get an error message which say FrmEmbed is not defined. How can I correct this?
View 4 Replies
Mar 6, 2012
My main form is a tabbed control with 2 tabs. The first tab is has two listview controls which display information about the current machine. The second tab contains a treeview control and two listview controls. This tab recreates the device manager in windows. I created a Machine class to gather the information about the machine that I want to display to the user. When I call the Display() Method from my form's load event everything appears to be fine the first tab's information is displayed in the listview controls.
Here's the kicker, when I click to the device manager tab there's nothing there. The LoadTree() procedure never fires. This code works, I've seen my device tree display a thousand times in the past. When I comment out the call to Machine.Display() my device tree reappears no problem. The code compiles fine no errors. I know the problem has to be in my Machine class but I have no idea what could cause this kind of response. I've never seen a program compile clean and then refuse to fire a procedure call but not produce some kind of runtime error.
View 16 Replies
Aug 3, 2011
This is a challenging one that got me stumped while I was coding today. Suppose I am running the Sub Test1() and Test2() and would like to print out the value of the Shadows method of the instance of the object I am passing in to TestCall() (see below - it is clearer) using the following restrictions:
Can't change the contents of Class A, B, and C
Can't change Sub Test1() and Sub Test2()
TestCall() can't have an if, select case etc. statement that tries to figure out the type
[code].....
View 2 Replies
Dec 1, 2011
The instructions are as follows:
1. Write a Visual Basic Console Application.Inside the main procedure call a function procedure to input and return a value for a double variable called x, the width of a right triangle.Inside the main procedure call the same function procedure a second time to get a value for a double variable called y, the height of a right triangle.
2. From the main procedure call a function procedure which calculates and returns a value for the hypotenuse equal to the square root of (x squared + y squared).You will have to pass the values of x and y to this function procedure.The procedure should calculate and return a double type value.The value that is returned by this function procedure should be equal to the square root of (x squared + y squared).
3. Also from the main procedure call a sub procedure to display the values of x, y, and the hypotenuse.
View 4 Replies
May 17, 2011
I connected to the Informix server using RazorSQL, created a stored procedure and tested it, getting the expected answer, so the procedure exists in the database in some form.
I then run the following code:
If ConnectToInformix() Then
Dim cmd As New IfxCommand("dc_routeHasOutstandingQuantity", conn)
cmd.CommandType = CommandType.StoredProcedure
[Code]....
This error does not occur when calling the stored procedure from a live SQL connection.
View 1 Replies
Nov 29, 2011
Is there a way to terminate calling procedure from the callep up procedure? I tried 'Stop' from a called up procedure in an executable; it has gone stuck; I am not able to remove it(the form) from the screen!
View 18 Replies
Feb 27, 2009
I am trying have a data grid selection populate a form. I am new to this.Basically I have a connection persistance object and I would like to call that and call a stored procedure with the value of the selection. The datagrid is bound to an object.
[Code]...
View 1 Replies
Feb 4, 2010
'I am trying to create a public class for handling stored procedures
'Class declarations
'1) Mode (delete, insert, edit)
'2) Stored procedure Name (sp_insert_MyTable, sp_delete_MyTable)
'3) Stored Procedure Parameter Count ( 10 or 5 depends) (need to avoid this)
'4) Stored Procedure Parameters (Here I need to declare as Structure, use dynamic array)
'5) How I can call this in Form
'My Study Code, Please correct it...
Public Class clsTest
Public Structure spParameters
Public varPara As String
Public varDataType As String
Public varDatatypeSize As Integer
[Code] .....
View 1 Replies
Oct 30, 2009
Public Sub SToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SToolStripMenuItem1.Click
Lots of code
[code].....
View 10 Replies
Sep 11, 2009
The store procedure which give me the information I need is:
USE [UCSMIS]
GO
SET ANSI_NULLS ON
[Code].....
When I try to add it to my report it gives an error, is it because of the temp table and how should I go about it?
View 2 Replies
Nov 22, 2011
I have a public function to call default email client.Public Function OpenEmail(ByVal EmailAddress As String, Optional ByVal Subject As String = "", Optional ByVal Body As String = "") As Boolean
[Code]...
View 1 Replies
Nov 27, 2011
i am trying to call a public sub within a class that resides within my form1 code:
[Code]...
View 1 Replies
Oct 18, 2011
I create three public sub in Module and I create Public Sub and insert these sub in it, and try to call them all from this sub, but failed. How to do this way
View 3 Replies