Forms :: Access Variable Of Child Form?

Jan 3, 2012

I have about 60 Child forms

Each have a variable with same name.

In Main form I want to set the value of the variable of the active child.

One way of doing that is like

Select Case Me.ActiveMdiChild.Name
Case "formName"
frmformName.Variable=0

I donot want to do that as it involves writing many cases and I may miss some.

Is there some other way of doing it .

I tried

Dim O as Object = Me.ActiveMdiChil
O.VariableName= 0

and its various variants but its not working

View 3 Replies


ADVERTISEMENT

MS ACCESS/ Save And Load Database From Main Form To Child Forms' Datagridview

Jun 10, 2010

I build my project and i got some problems. First i want to print barcode for books(toolstripmenu item). but i cant. here's the code that i found:

[code..]

second problem is printing again. i want to print my MS ACCESS .mdb from child datagridview's records.

third one i want to save and load(with dialogs) my database from main form to child forms' datagridview.and the last one is help provider. i prepare my own .htm help file, when press F1 it opens. but i dont know how to call provider to toolstripmenuitem and help provider keep my computer's path so when i call provider another computer, the programme cant find the path.

View 10 Replies

Forms - Pass Variable From Child To Parent Like A Function

May 23, 2012

I have created 2 forms (Parent & Child), i want to store the unique textbox value to a variable into the parent form.

[Code]...

View 2 Replies

Access Arrays From Many Child Forms?

Oct 26, 2010

I want to access my arrays from many child forms. Where should my arrays and declarations be? and what is the code to access them?

View 12 Replies

Pass A Variable To Another Form Or Else Make The Variable Visible To Both Forms?

Sep 5, 2010

Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.

View 4 Replies

Forms :: Open A Child Form - Main Form Is Unresponsive?

Apr 20, 2011

When I open my child form,

frm_Analogs.ShowDialog()

It opens up the new form, but now I can not interact with my main form. It will not accept focus or allow me to interact with it.

Do I need to change the form type?

View 4 Replies

C# - Access A Value That Is Entered Into A Child Form From A Parent Form?

Jan 10, 2011

Communication between form can be done in many ways using constructor using delegates etc in .net but my question is how can i access a value that is entered into a child form from a parent form or can a two way communication is possible between windows forms.

View 1 Replies

Forms :: Bring Newest Child Form To Top?

Oct 16, 2009

I try codes and search around but still can't find it.

That when I click to add new child form, the newest child form always appear after the old one[code]....

View 2 Replies

Forms :: Get All The Active MDI Child Form In An Application?

May 28, 2011

how to get all the active mdi child in an application..it is possible to work? me.ActiveMdiChild.Name

View 1 Replies

Detect And Set The Form Size In The Child And MDIParent Forms?

Feb 5, 2012

Anybody know a way to detect and set the form size in the child and MDIParent forms?

I'm having all kinds of problems from scroll bars popping up, to can't get the form to fill the parent. Pretty sure I have tried every possible combination in the forms properties 10 times.

I'm really getting tired of beating myself against this. Anybody seen a good tutorial on the finer points of MDIparent / MDI Child page size, etc.

View 1 Replies

Display Child Forms Using Menustip In MDI Parent Form?

Apr 7, 2011

When I click on Borrow Book(s) from Transaction menu it should open frmborrow.vb

Also to it should do the same to rest of the menu(s)......

What should i write in the click event for Borrow Books from Menustrip menu

View 7 Replies

Forms :: Close And Reopen Child Form Within Parent?

Dec 22, 2010

When my application first loads the parent opens and I select my child form from toolstrip:

'In parent open the form when option is clicked
Public Sub Showfrmitemreview(ByVal sender As Object, ByVal e As EventArgs) Handles itemreivewStripMenuItemA.Click, itemreviewStripMenuItemB.Click

[Code]....

Nothing happens I don't even get an error message. I've played around with the code numerous times and the only thing that worked was to have it open outside of the parent which I do not want to happen.

View 1 Replies

Forms :: Mdi Call Active Child Form Method?

Aug 20, 2009

I'm trying to call a method defined within a child form from the menu strip of the parent form when the child form is active.

View 1 Replies

MDI Parent Forms Button Becomes Transparent In Child Form?

Feb 15, 2011

I have a MDI Parent Form and some Child forms.I have some controls on MDI Parent form but as i open child form all the controls of MDI Parent form display in child forms...I m stuck with my application

View 1 Replies

VS 2008 Mdi Form Controls Are Visible In Child Forms

Feb 12, 2010

i use a picture control in mdi form .. but when i load child froms then mdi form picture are also show in front of child form...

View 7 Replies

All Of Mdi Child Forms Dont Open When Start From Login Form?

Dec 15, 2011

wen i open mdi through the login form, the forms inside the mdi child forms dont seem to execute.

View 2 Replies

Forms :: Enable/Disable MDI Parent Menu From Child Form?

Jan 5, 2012

I'm writing an MDI app in vb.net vs2010. The MDI form has the default MDIMenustrip menu with several menu items. Each has some subitems. None of the child forms have a menustrip defined. I thought it would be easy to call a public subroutine in the MDI that would disable or enable the MDIMenustrip items. If I execute the routine from the MDI form, the menu items disable/enable just fine. THe problem I have is when I call the routine from a child form. How can I control the MDI menu from a child form?

View 3 Replies

Menu Strip Appears On The Parent Form But Not On The Child Forms?

Feb 13, 2009

I have created a parent form and 2 child forms. Each of the forms have menustrips. When i run the application the menu strip appears on the parent form but not on the child forms. I have the menu strip set to visable.

View 4 Replies

VS 2008 Resize Of Parent Form Keeps Relative Size/Loc Of Child Forms?

Sep 17, 2010

I want a set of child forms to keep their relative sizes and locations to their parent form when parent form is resized. So if one child form is opened and covers the lower right quadrant.. it will remain a quadrant for whatever resize is done on parent form.

View 3 Replies

Forms :: Can't Pass Variable From One Form To Another?

Jun 8, 2011

I have one form, which the user enters upto 5 websites then clicks go - I have on the second form, the one with the webbrowser. A timer which checks if the web browser is busy then either a green light or black image will be shown along side the assocaited input box on the first form.I am finding it impossible to feed variables into the clock through ByVal, like I would a subroutine or function.

Private Sub ActiveMe_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActiveMe.Tick
If ((WebBrowser1.IsBusy)) Then
Hey.BackColor = Color.Black[code]....

'Error message says Hey is not declared, as i can't pass it through to timer

The variable Hey is determined by the first form - Which picturebox.I have an if statement which simply says if inputbox one has url enter then Hey = Picturebox1, If input box2 has url entered then Hey= Picturebox2 etc.What I want is the timer to check the page has completed loading or is still loading or refresing and the appropriate green or black to be shown aside url input box on first form.I considered using a sub or procedure to act as a clock (a large for loop with another for loop within it, acting as a delay). But found this slowed down theapp to the point of crashing it.

View 1 Replies

Forms :: Carrying A Variable To Another Form?

Sep 3, 2010

I have the following form: Imports System.Data.SqlClient Public Class Form1 Dim ReturnValue As Object = Nothing

[Code]...

View 12 Replies

Forms :: How To Pass Variable From One Form To Another

Jul 17, 2010

I want to pass variables from one form to an other. The variables i I need in the second form( called" Hulsview") are :" hulsbreedte" and" hulslengte". To check if the varibles are passed I added a textbox in the second form,called" hulsview" to check the variable" hulsbreedte". The value selected in the combobox on on form1" hulsbreedte = HulsBreedte1.SelectedValue" returns always 0 in the textbox on de second form.

Here is the code form1:
Imports System.Drawing.Drawing2D
Public Class Form1
Inherits System.Windows.Forms.Form
Public hlb As Point 'not used
[Code] .....
I am using vb express 2010.

View 1 Replies

Forms :: Reference Form Using Variable

Aug 18, 2010

I have an application consisting of 2 forms (Form1 and Form2).There is a text box on each form and they are both named Text1.From a sub routine in a module, I want to alter a text box on one of the forms. The sub determines which form to write to and attempts to refer to the form using a variable.But in the example below, gForm never gets declared when it's nested within the If statement.[code]The actual application is not so simple and I need to use this or a similar approach throughout the application in order to reduce code redundancy.To recap, I want to alter a control on a form by replacing the form name with a variable name. [code]

View 4 Replies

Access A Button Through Code There Is On A Panel There Is A Child On Several Other Child-panels?

Aug 18, 2011

I'm from denmark and hope I can explain my question for you. This is just a example: I have a panel, let's say panel1 and another panel on that panel (panel2) and so on until for example panel5 - on panel5 I have a button (button1). Now I would like to change button1's backcolor property through code how do I then get access to button1, now it's a child-control on panel5 that is a child control on panel4 etc. ??

View 3 Replies

Unable To Place A Label Box In The MDI Parent Form And Then Open A Child Form The Label Box Highlighted In Child Form?

Dec 15, 2011

I have an issue when I place a label box in the MDI Parent form and then open a child form the label box highlighted in child form?

View 6 Replies

How To Access Variable In A Different Form Using A Module

Dec 15, 2011

I tried to access a variable using a module with this code:

Module DataModule
Public x As Integer = form1.trackbar.value
nd Module

View 11 Replies

Forms :: Call Mdi Form Toolstripmenuitem Name Using The String Variable?

Jul 8, 2009

i need to call mdi form toolstripmenuitem name using the string variable. for ex, mdi form is Form1. toolstripmenuitem is customer master if i do like that "Form1.customer master.Enabled=True" its working

but my issue is i stored customer master in a string variable like mystring="customer master" i need to enabled using the string variable like Form1.mystring.enabled=True

View 11 Replies

How To Access Variable Located In Private Sub On Same Form

Jul 25, 2009

How to access a variable that is located in a private sub and then display that variable in another private sub located on the same form.

My actual code is:
Public Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim strFileName As String
strFileName = OpenFD.FileName
OpenFD.InitialDirectory = _
[Code] .....

Obviously, the sub in blue has nothing in it currently and so this is the one I would like to access the variable in. The variable I want to use again is 'FILE_NAME'.

View 27 Replies

File To Open As Mdi Child Form / Save From Child Form

Nov 17, 2011

I have a MenuStrip with File > New, Open, Save, Exit located in a parent form, and a RichTextBox located in a child form.The problem I'm running into is concerned with the destination of the file elected from "Open" and the save.When a user selects their file from "Open", I need it to open the child form and put the text into the RichTextBox.I also need the program to be able to "Save" from a child form, whether it's been brought up via "New" or "Open".

View 3 Replies

Forms :: How To Bind Form Label Or Text Box To Class Variable

Mar 11, 2009

I have a problem to solve and not quite sure if the way I think is correct.

I have a main form class MainForm the class has got: a variable call Value and a label called LabelValue

Now I would like to automatically update LabelValue every time the Value changes his value

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved