473,325 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

function scope

GS
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.
Aug 15 '07 #1
3 1621
On Aug 14, 9:01 pm, "GS" <gsmsnews.microsoft.co...@msnews.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!

Aug 15 '07 #2
GS
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?

<xt******@gmail.comwrote in message
news:11**********************@x40g2000prg.googlegr oups.com...
On Aug 14, 9:01 pm, "GS" <gsmsnews.microsoft.co...@msnews.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!

Aug 15 '07 #3
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:
http://www.miradyne.net

"GS" <gs**********************@msnews.Nomail.comwrote in message
news:eC**************@TK2MSFTNGP02.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?

<xt******@gmail.comwrote in message
news:11**********************@x40g2000prg.googlegr oups.com...
>On Aug 14, 9:01 pm, "GS" <gsmsnews.microsoft.co...@msnews.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!


Aug 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
2
by: FAN | last post by:
I want to define some function in python script dynamicly and call them later, but I get some problem. I have tried the following: ################################## # code...
7
by: Csaba Gabor | last post by:
I feel like it's the twilight zone here as several seemingly trivial questions are bugging me. The first of the following three lines is a syntax error, while the last one is the only one that...
5
by: Andrew Poulos | last post by:
I tested the JSON parse/to code from json.org and it works but I don't understand how. Could someone explain how something in this format works: (function() {...})(); Andrew Poulos
78
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only...
26
by: Patient Guy | last post by:
The code below shows the familiar way of restricting a function to be a method of a constructed object: function aConstructor(arg) { if (typeof(arg) == "undefined") return (null);...
2
by: Jeff | last post by:
Hello, I assigned a new object to a local variable ("req") in a function (see below). The local variable "req" is obviously destroyed when the function exits, but should the object referenced by...
9
by: tai | last post by:
Hi. I'm looking for a way to define a function that's only effective inside specified function. Featurewise, here's what I want to do: bar_plugin_func = function() { ...; setTimeout(...);...
4
by: alex | last post by:
I am so confused with these three concept,who can explained it?thanks so much? e.g. var f= new Function("x", "y", "return x * y"); function f(x,y){ return x*y } var f=function(x,y){
2
by: DanYan | last post by:
So I was doing some stuff in Javascript, and I want to get access to a function's scope chain. As a simplified example of what I actually am trying to do, suppose I have this: function add(b)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.