Click to See Complete Forum and Search --> : change MDI caption at runtime


priyas1
October 22nd, 2001, 03:41 AM
Hi,
I have 1 form which needs to be called from 2 different forms. The caption of the MDI form needs to be changed depending on from which form its called.
Can i do that and how ??
Regards,
Priya

jaimelopez
October 22nd, 2001, 04:11 AM
In a .Bas module define, where frmMain is your MDIForm.


public fMainForm as frmMain
public Sub InitMain()
set fMainForm = new frmMain
End Sub




In your Main() sub, call InitMain.
Then, along the programm you can call all the properties of the fMainForm MDIForm (f.e. Caption).
I hope it helps.
Jaime.

Cakkie
October 22nd, 2001, 04:25 AM
This code can be called from anywhere (like in the load event of one of the two other forms), assuming the MDI form is called frmMain.

frmMain.Caption = "new caption"




Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook