function scope

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

    #1

    function scope

    I have a c# application with windows form for updating and retrieving some
    database table records. lets call it form1. I also have another application
    in vb that extracts data from the web but used the same database table as
    input to direct its operation. the data in the table is not useable directly
    but need a bit of transformation as done in the form1.


    how can I make retrieval functions in forml to the vb application? use the
    same package name but in different project?

    I want the vb app to control the form in terms of selecting the record but
    only if the form1 is instantiated by the vb application.

    if I just use the instantiation of application method, I don't know how to
    make available the required functions and the called internal function
    without the public

    thank you for your time and expertise.


  • xtekneek@gmail.com

    #2
    Re: function scope

    On Aug 14, 9:01 pm, "GS" <gsmsnews.micro soft.co...@msne ws.Nomail.com>
    wrote:
    I have a c# application with windows form for updating and retrieving some
    database table records. lets call it form1. I also have another application
    in vb that extracts data from the web but used the same database table as
    input to direct its operation. the data in the table is not useable directly
    but need a bit of transformation as done in the form1.
    >
    how can I make retrieval functions in forml to the vb application? use the
    same package name but in different project?
    >
    I want the vb app to control the form in terms of selecting the record but
    only if the form1 is instantiated by the vb application.
    >
    if I just use the instantiation of application method, I don't know how to
    make available the required functions and the called internal function
    without the public
    >
    thank you for your time and expertise.
    Explaining what you need to do all in one reply is a bit much but I
    will do my best to point you in the right direction. One approach to
    this is to make a 3rd assembly which has in Interface in it and you
    need to have your VB or C# app implement this interface that way one
    or the other app can instantiate/launch the other app and get the
    object tnat is implementing the interface and it can call methods/
    properties on that object.

    Good luck!

    Comment

    • GS

      #3
      Re: function scope

      I will search on the subject for interface to implement instantiation by the
      vb app of the c# app.

      just curious, is it possible in vb to create a class inherited from the cs
      class application?
      if so, can I not use some sort scope equivalent to friend or protected?

      <xtekneek@gmail .comwrote in message
      news:1187147791 .416561.207490@ x40g2000prg.goo glegroups.com.. .
      On Aug 14, 9:01 pm, "GS" <gsmsnews.micro soft.co...@msne ws.Nomail.com>
      wrote:
      I have a c# application with windows form for updating and retrieving
      some
      database table records. lets call it form1. I also have another
      application
      in vb that extracts data from the web but used the same database table
      as
      input to direct its operation. the data in the table is not useable
      directly
      but need a bit of transformation as done in the form1.

      how can I make retrieval functions in forml to the vb application? use
      the
      same package name but in different project?

      I want the vb app to control the form in terms of selecting the record
      but
      only if the form1 is instantiated by the vb application.

      if I just use the instantiation of application method, I don't know how
      to
      make available the required functions and the called internal function
      without the public

      thank you for your time and expertise.
      >
      Explaining what you need to do all in one reply is a bit much but I
      will do my best to point you in the right direction. One approach to
      this is to make a 3rd assembly which has in Interface in it and you
      need to have your VB or C# app implement this interface that way one
      or the other app can instantiate/launch the other app and get the
      object tnat is implementing the interface and it can call methods/
      properties on that object.
      >
      Good luck!
      >

      Comment

      • Kevin Spencer

        #4
        Re: function scope

        VB.Net and C# compile to the same managed intermediate language code, so you
        can certainly work with assemblies written in either language from either
        language. This means that, yes, you can inherit a class in a C# project by a
        class in a VB.Net project.

        --
        HTH,

        Kevin Spencer
        Microsoft MVP

        DSI PrintManager, Miradyne Component Libraries:


        "GS" <gsmsnews.micro soft.comGS@msne ws.Nomail.comwr ote in message
        news:eCHdJDv3HH A.5852@TK2MSFTN GP02.phx.gbl...
        >I will search on the subject for interface to implement instantiation by
        >the
        vb app of the c# app.
        >
        just curious, is it possible in vb to create a class inherited from the cs
        class application?
        if so, can I not use some sort scope equivalent to friend or protected?
        >
        <xtekneek@gmail .comwrote in message
        news:1187147791 .416561.207490@ x40g2000prg.goo glegroups.com.. .
        >On Aug 14, 9:01 pm, "GS" <gsmsnews.micro soft.co...@msne ws.Nomail.com>
        >wrote:
        I have a c# application with windows form for updating and retrieving
        some
        database table records. lets call it form1. I also have another
        application
        in vb that extracts data from the web but used the same database table
        as
        input to direct its operation. the data in the table is not useable
        directly
        but need a bit of transformation as done in the form1.
        >
        how can I make retrieval functions in forml to the vb application? use
        the
        same package name but in different project?
        >
        I want the vb app to control the form in terms of selecting the record
        but
        only if the form1 is instantiated by the vb application.
        >
        if I just use the instantiation of application method, I don't know how
        to
        make available the required functions and the called internal function
        without the public
        >
        thank you for your time and expertise.
        >>
        >Explaining what you need to do all in one reply is a bit much but I
        >will do my best to point you in the right direction. One approach to
        >this is to make a 3rd assembly which has in Interface in it and you
        >need to have your VB or C# app implement this interface that way one
        >or the other app can instantiate/launch the other app and get the
        >object tnat is implementing the interface and it can call methods/
        >properties on that object.
        >>
        >Good luck!
        >>
        >
        >

        Comment

        Working...