|
it's like this:
i want to close all open child forms in my mdi-container form - but not the container form - , when i confirm an openfiledialog.
the child forms show the contents of a database, and when i confirm the openfiledialog a new database is used in my programme. but i don't want the already open child forms to show the contents of the database used before, so all forms should be closed.
i tried it like this, but without success:
<br />
dim c as control<br />
for each c in form1.controls<br />
if type of c is form then<br />
dim f as form = ctype(c, form)<br />
f.close<br />
end if<br />
next<br />
|
|
|
|
|
Every form, if it's an MdiParent, has an MdiChildren property that contains all of the child forms it has eopn.
Dim x As Integer
For x = 0 To (MdiChildren.Length) - 1
Dim childForm As Form = CType(MdiChildren(x), Form)
tempChild.Close()
Next x
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
|
go to hell.... throw ur system away.. its no use for u....
|
|
|
|
|
A Programming Language.
Any other doubt?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Do you really went this? Or you tried to ask any other else?
Regards,
Arun Kumar.A
|
|
|
|
|
VB is short for Visual Basic.
Why do most people from india say "doubt" when they mean "question"? Are they the same word in hindi?
---
single minded; short sighted; long gone;
|
|
|
|
|
Odd thing was, he had VB/SQL Programmer, down on his user profile. He put VB down and not know what it is? Or maybe he was asking a different question and didn't word it well
|
|
|
|
|
I saw that too. Makes me think he's just another troll.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: Makes me think he's just another troll.
I started to think the same with the progressbar thread down below, poda poda
|
|
|
|
|
Actually it's a doubt: a question needs a question mark...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Guffa wrote: Are they the same word in hindi?
No, they are not same..
Regards,
Arun Kumar.A
|
|
|
|
|
Well,
There are morethan 25 languages in India, not only Hindi, and may be its the same in one of these languages
just jocking
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
I want to create crystal report dynamically i.e from connection to data field every thing I want to do through programming.
if it is Possible, please help me.
Reards,
Suman
|
|
|
|
|
suman.. plez, make your qusstion clear..
|
|
|
|
|
I have created a report on D: Drive and Database(MS-Access) is also in D: Drive.But When I have copied the programme in E: Drive, it is not working.
I think I need to make the connection through coding.
Regards,
Suman
|
|
|
|
|
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
|
|
|
|
|
The progress bar you have to set the min and max value and call the increment method when you have made some progress. You can also set the value directly. So your problem is know how far along are you in loading your grid. I am guessing you probably don't know that. So the best you can probably do, is put a timer control which executes every second. When the timer method runs increment the progress bar and refresh the form with Application.DoEvents. So then you users will think some progress is being made.
Ben
|
|
|
|
|
Ben,
where do i get this 'Application.DoEvents'...?? i'm using vb
|
|
|
|
|
Sorry for some reason I thought you were using vb.net It is a .net thing. I am not sure what it is in vb 6
Ben
|
|
|
|
|
First figure out a way to calculate your 'amount of data loaded' into a percentage value.
Then add a progressbar onto your form and use this code in your loading sequence:
ProgressBar1.Value = percent_data_loaded
That's it.
|
|
|
|
|
|
Dileep_Vickey wrote: poda poda
|
|
|
|
|
are you a malayalee, why are you bullying people
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|