get data from another form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian

    #1

    get data from another form

    I have a problem with a small program. In this program I have two forms
    (FrmMain and FrmFind).

    On my computer with Windows in French there is no problem but with other
    windows versions (Win XP Pro Spanish) the main form doesn't receive the
    datas from FrmFind.

    I've tried several systems:

    ----------------
    The first one was:

    in FrmMain.

    FrmFind.show 1
    result = FrmMain.Tag

    in FrmFind

    on click under the OK button

    FrmMain.Tag = FindResult
    Unload FrmFind

    Was working 1/4 on the spanish windows

    -----------
    2nd Method

    in FrmMain

    FrmFind.Show
    while FrmMain.Tag = ""
    doEvents
    wend

    in FrmFind

    FrmMain.Tag = FindResult
    Unload FrmFind

    Was working 1/2 on the spanish window

    -----------------
    3rd method

    in FrmMain

    Private WithEvents FFind as FrmFind

    Set FFind = New FrmFind
    FFind.Show


    Private Sub FFind_EndFind(R esult as String)
    UnLoad FFind
    Set FFind = Nothing
    ....
    End Sub

    In FrmFind

    Public Event EndFind(Result as String)

    on the OK Button:
    RaiseEvent EndFind(FindRes ult)

    This code work 3/4 in the Spabnish windows.

    So what's the problem ?? CPU Speed ? Windows Language ? Bug in VB ?

    I use VB6 Enterprise SP6.

    Thanks.


Working...