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


ADVERTISEMENT

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

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

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

Collecting Arrays Of Parent And Child Nodes

Jul 17, 2010

Most of my treelist code is working ok, however I would like to produce two arrays of string, one which contains all the parent nodes in a Treeview, and the other with all the child nodes. I'm obviously doing something stupid as I have "Object reference not set to an instance of an object." I'm not declaring something.

This is my attempt:
Private Sub listbuilder(ByVal nodelist As TreeView)
Dim parentlist() As String
Dim childlist() As String
Dim j, n As Integer
[Code] .....

View 2 Replies

Convert Already Designed And Working Forms To MDI Child Forms?

Dec 11, 2009

I build my first Project composed of several forms and it�s working just fine. Id like now to redesign the project as a MDI Application. Once created the parent form, I can create child forms but thats not what I need. What I would need is convert my already designed and working forms to MDI child forms. How can that be done?

View 1 Replies

Forms :: Drag & Drop Between 2 Datagrids Between 2 MDI Child Forms

Feb 11, 2009

Ive been working on this project of mine for some time now... though im not involved in IT in my current company, im just trying to help to at least have their system computerized (they are still doing it manually by paper & calculator)... I have one problem though which made me stick for 2 days (and still counting) without progress...How To Drag & Drop Between 2 Datagrids Between 2 similar MDI Child Forms

View 16 Replies

Set IsMidContainer In Forms For Parent-child Relationship Forms?

Jul 1, 2009

I know I can set IsMidContainer in forms for parent-child relationship forms. I just want to know if the parent form could be a panel. If so, how can i do it?

View 1 Replies

.net - Child Forms Not Getting Minimized Along With The Parent Forms?

Apr 8, 2011

I have made a project on Library management system using Microsoft Visual Studio 2008 and Sql server 2005 .I have used MDiParent form in this project, from where I can click on the menu item to open the desired form.

I am now able to open the child forms in the main window background.Now what happens is When I click on one menu Item it open in the parent form background.I am able to open all child forms corresponding to the click event in the MenuToolStrip ...all in the Parent form Now the problem is that I cannot minimize child forms when I minimize Parent form..I want child forms also to minimize along with the Parent form.. Also are child forms still not attached to the parent Form is also my question here.....

View 2 Replies

Forms :: How To Avoid Child Forms Overlapping In MDI

Mar 26, 2011

i'm a beginner in MDI form. i created a MDI form with buttons and child forms. when i click the forms continuously, many forms will be opened. how to avoid forms overlapping, in other words, duplicate

View 6 Replies

Forms :: Linking Forms And Arrays?

May 29, 2010

I am new to vb.net. I am currently programming Space Invaders. Firstly i have two forms What is code for linking form 1 to form 2?

[Code]...

View 4 Replies

Linking Forms And Arrays?

Nov 1, 2010

I am new to vb.net. I am currently programming Space Invaders. Firstly i have two forms What is code for linking form 1 to form 2?

Secondly i have coded and tried to understand arrays. I currently Have
Private Sub tmrUFO_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrUFO.Tick

[code].....

View 1 Replies

Forms :: Does VB.Net Support Picturebox Arrays

Dec 22, 2009

I am trying to design a basic version of spaceinvaders. I have 6 pictureboxes on my form and the idea is to add a value to the picbox.top property that moves the boxes down at a certain time and speed that i have set in my timer control. The problem i have is i am trying to set properties for all the pictureboxes at the same time by using arrays.

An example would be
dim mypic() as picturebox = {pic1, pic2, pic3, pic4, pic5, pic6}
pic1.top = 10

[code].....

View 14 Replies

Forms :: Moving Arrays Between List Box's

Apr 22, 2010

I'm currently building a program where there are two list box's and a button to copy the selected array item in listBox1 to listBox2 in a separate array.[code]

View 2 Replies

Access Arrays Via For Next Loop?

May 20, 2009

I have 5 arrays, named array1 array2 array3 array4 array5. They are integer arrays each with 5 elements in them. I want to access all the elements in all the arrays using a for next loop,the pseudo code goes something like this:

for i = 1 to 5 'this loop calls each array
for j = 0 to 4 ' this loop calls each element
if array (i,j) then

[Code]....

View 3 Replies

How To Access Variables/arrays

Dec 14, 2011

Public Sub drawChart()
Dim panel As Graphics = picBox.CreateGraphics
Dim myTextBrush As SolidBrush = New SolidBrush(Color.Black)

[code].....

View 1 Replies

Displaying / Reading Data On Forms From Arrays

Feb 25, 2009

I am having some trouble with some data I want to display on a form. The data is in a 2-D array, call it myarray(x,y). My attempts to display it have so far not worked. Similarly, I also need to read this data from the form back into an array for further calculations.

View 3 Replies

Forms :: Find Duplicates In Arrays And Count Them

Dec 23, 2009

This is my problem: I have an array with dates in it and I want a list with the dates and how much that date is sequel to the amount of that dates in the array.

This is my code so far:
arrsVerschillendeDagen(iTellerke) is declared on moduleniveau
arriMaand(iTellerke) is declared on moduleniveau
arriJaar(iTellerke) is declared on moduleniveau

I have a subroutine too that redimension my arrays.
Private Sub FillArray()
For iCounter As Integer = 0 To arriDag.Length - 1
arrsVerschillendeDagen(iCounter) = arriDag(iCounter) & "/" & arriMaand(iCounter) & "/" & arriJaar(iCounter)
Next
'result: 14/10/2009, 20/12/2009, 20/12/2009, 14/12/2009, 14/12/2009, 14/12/2009
[Code] .....

View 1 Replies

Sharing Multi-dimensional Arrays Across Different Forms In VB?

Jul 9, 2011

I have a very simple 2D array, it holds a list of song titles, their genre, and their runtime. frmMain loads the array from a text file and allows me to manipulate it and boil it down to a desired (implicitly sized) playlist. i want to THEN pass that playlist array to a second form, frmPlaylist The problem i'm running into....When frmPLaylist calls the Property from frmMain I receive an error that VB cannot convert the string value to a two dimensional array. Simplified...frmPlaylist is all locked and ready to receive a 2D array, but frmMain seems to only be sending a single string variable. on frmMain

Public ReadOnly Property PlaylistOut() As String
Get
Return mstrTimedPlaylist(,)

[code].....

View 1 Replies

Interface And Graphics :: MDI Parent / Child - Child To Check To See If It Is The Last Child Object Before Closing

Feb 18, 2011

Im working with MDI parent/child objects. when closing the child objects i need the child to check to see if it is the last child object before closing. i couldn't find anything on google, maybe im searching for the wrong thing.

View 2 Replies

Arrays - Access Collection Keys During For Each?

Aug 11, 2009

I have some code like this:

Dim col As Collection = New Collection
col.Add(value1, "key1")
col.Add(value2, "key2")
' later...
For Each item As String In col
' want to get valueX and keyX here; currently, "item" holds the value
Next

How can I get both the value and key within the loop? Maybe there is another class that makes this easier?

View 1 Replies

Declare And Access Arrays In Visual Basic?

Oct 5, 2011

I declared an array of strings and initialized every element to "5". But when I debug with a breakpoint after the For-Each, all my array members have Nothing in them. I'm on Visual Studio 2010.

Dim words(999) As String
For Each word As String In words
word = "5"
Next

View 2 Replies

Forms :: Save From A MDI Child?

Oct 12, 2010

I am re-doing part of a GUI for my project, The Windows Alias Generator, and decided to switch to MDI. The child forms consists only of RichTextBox1. Here's the generate routine called when the save is clicked:

Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SaveAsToolStripMenuItem.Click, SaveToolStripButton.Click
Dim ActiveMDI As Form = Me.ActiveMdiChild[code].....

But because I cannot define richtextbox1.text from the currently active MDI, I cannot use this routine...my question is this: How would I get RichTextBox1.text from the save option in the MDI form?

View 4 Replies

MDI & MDI Child Forms Menu's?

Sep 19, 2011

I have a MDI child form with its own menus. (TestForm)When I call the child form (Testform.show) from the parent form menu, the MDI Child form's menus are appended to the container form..Essentially, the container form steals the menu of the child form..

View 2 Replies

MDI Child Forms Not Interacting

May 11, 2012

I have a MDI parent on which i launch a child form

Dim NewMDIChild As New Frm_addOT
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me
'Display the new form.
NewMDIChild.Show()

His child form contains several comboboxes which hold data from a dbase(sql)

When new data is entered in the cmb it checks the database and if it isn't in there it launches another window

FRM_OTlistaddklant.Visible = True
and copy's the newly entered text in a textbox.
FRM_OTlistaddklant.TB_klantnaam.Text = OTaddklant_naam

then i can give in the details etc.

now, when this is done and the users presses a button "Add"

the information is written to sql(which works perfect)

than i have a public sub on the Frm_addOT which should refill the combobox and
also set the backcolor to a specific color.

and the last two things will not work. Actually when i try to change the backcolor on Frm_addot it triggers the event backcolorchanged and says it has changed but it is not visible.

View 5 Replies

MDI Child Forms Resizing

Jan 19, 2011

Has anyone ever had or dealt with resizing issues on MDI Child forms? I am working on a VB.Net Windows applciation project I inherited from another devloper. When I took it over the forms had already been designed. There are one MDI Parent Form and two MDI Child Forms. When the application starts up the parent form and one child form open by default. Both the parent form and the child form will maximize, restore, and minimize. Although I have to move the parent form slightly, when it is not maximized I can resize it with the mouse pointer as expected. The child form will not resize and when I move the cursor to the border of the child form I do not even get the mouse pointer. Also, when both the parent and child form are maximized the vertical scrollbar on the child form is no longer displayed.

One potential problem is that there are lots of controls on the child form, which are inside several group boxes. When I comment out the controls, the blank form displays without the vertical scrollbar but will resize with the mouse pointer as expected. When I uncomment the controls the resizing does not work any more. The AutoSize propery on all of the controls is set to True. I tried commenting out the code setting the Autosize property to True on the group boxes only. The result of that is that the resizing still does not work and I lose the vertical scrollbar.I am trying to avoid having to redesign the form completely, however I am running out of alternatives. The project will not pass UAT if the resizing does not work.

View 9 Replies

MDI Parent And MDI Child Forms?

Feb 11, 2010

I'm just getting started in VBE 2008 porting a VB6 program and have created the MDI Parent form. I've added a form called frmNav and need to designate this and all subsequent forms as MDI child forms. Is there somewhere in each form's properties where I designate this? It used to be in VB6 there was a property called "MDIChild = True." input id="gwProxy" type="hidden"><!-- Session data--></input> <input id="jsProxy" onclick="jsCall();" type="hidden" />

View 1 Replies

[2008] MDI And Child Forms?

Mar 21, 2008

In VB6, MDI applications were possible. You'd create a form and a few Child forms and go with it.

View 7 Replies

Clipboard Shortcuts On MDI Child Forms?

Jun 2, 2010

I have some VB.Net WinForms I imported from VB2005 that are MDI Child forms. In the old project the clipboard shortcuts work (Ctrl-V, etc.) but in the VS2010 project they do not. the ShortCutsEnabled property is true.Any way to get these working again without adding special code to replicate the feature? I have a bunch of forms to convert....The parent does have KeyPreview but I can comment that out and the problem still exists. I also hook the TextChanged event for dirty logic but I can comment that out also to no avail.

View 6 Replies

Close Parent And Child Forms?

Oct 5, 2009

I have been looking around at how I can close my parent form and my child form. This article: [URL] has some information but it either doesn't work for me or I am putting the wrong information it. What I want to happen is when a button is pressed I want to close both parent and child forms and then go to another form (frmResults). Then there will be a button on frmResults that will take me to the beginning form (frmPTCalculator). With this code below when I click the button on frmCalculator it goes to the MDI form and both parent and child forms are there.

my Parent form is called: frmGender
my Child form is call: frmMale & frmFemale

Below is what I have tried from the example in my Child form frmMale:

Private Sub btnResults_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnResults.Click
Dim frm2 As frmMale = New frmMale()
AddHandler frm2.FormClosed, AddressOf frm2_FormClosed

[code]....

View 3 Replies







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