473,405 Members | 2,154 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,405 software developers and data experts.

how do u call a vb.net form in c#

hi
im having trouble wondering can anyone help
i have created a vb.net form in visual studio 2003
i would like to create a driver class to call this form in csharp
im having trouble finding the right code
to do this..
does any one have any idea if this is possible and point me in the right
direction

if any one has an idea feel free to pass on ur wisdom

thanks
newbie - shaggy
Nov 16 '05 #1
7 3293
Bob

On 29-Nov-2004, "Shaggyh" <sh***********@ntlworld.ie> wrote:
hi
im having trouble wondering can anyone help
i have created a vb.net form in visual studio 2003
i would like to create a driver class to call this form in csharp
im having trouble finding the right code
to do this..
does any one have any idea if this is possible and point me in the right
direction

if any one has an idea feel free to pass on ur wisdom


I'm not being nasty here, but why not just make the form
in C#?
Nov 16 '05 #2
Newbie - add the .dll reference, and then just make sure you fully qualify
the Namespace and class- there's nothing special other than that.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Shaggyh" <sh***********@ntlworld.ie> wrote in message
news:YV****************@newsfe3-win.ntli.net...
hi
im having trouble wondering can anyone help
i have created a vb.net form in visual studio 2003
i would like to create a driver class to call this form in csharp
im having trouble finding the right code
to do this..
does any one have any idea if this is possible and point me in the right
direction

if any one has an idea feel free to pass on ur wisdom

thanks
newbie - shaggy

Nov 16 '05 #3
Bob - probably because it's already written in VB.NET and as much as I don't
like VB.NET - there's no need to rewrite it. Wouldn't you agree?

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Bob" <bo*@bob.net> wrote in message
news:nX*****************@newssvr31.news.prodigy.co m...

On 29-Nov-2004, "Shaggyh" <sh***********@ntlworld.ie> wrote:
hi
im having trouble wondering can anyone help
i have created a vb.net form in visual studio 2003
i would like to create a driver class to call this form in csharp
im having trouble finding the right code
to do this..
does any one have any idea if this is possible and point me in the right
direction

if any one has an idea feel free to pass on ur wisdom


I'm not being nasty here, but why not just make the form
in C#?

Nov 16 '05 #4
so im callin for example code like this
below ??
using System;
public class driver
{
private static void Main()
{
smsfrm n = new smsfrm();
n.intialize();

}
}

where smsfrm is my vb.net form....
im not sure that n.intialize() is right?
and then making the vb form appear on screen..
i hope im making some scence here..
now i can do all the csc /target:library stuff with c# programs
but i dont no how to cross call them.. or bundle them properly.
the vb.net file is referencing another dll file for a webservice i made.
so the vb form calls that dll.. but i need a c# file to call the vb form..
as a driver class to run it...

well i hope im making scense

what way do i reference it? r what should i do next..

thanks 4 replys

regards

newbie-shaggy
"W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> wrote in message
news:%2***************@TK2MSFTNGP14.phx.gbl...
Newbie - add the .dll reference, and then just make sure you fully qualify
the Namespace and class- there's nothing special other than that.

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Shaggyh" <sh***********@ntlworld.ie> wrote in message
news:YV****************@newsfe3-win.ntli.net...
hi
im having trouble wondering can anyone help
i have created a vb.net form in visual studio 2003
i would like to create a driver class to call this form in csharp
im having trouble finding the right code
to do this..
does any one have any idea if this is possible and point me in the right
direction

if any one has an idea feel free to pass on ur wisdom

thanks
newbie - shaggy


Nov 16 '05 #5
Bob

On 29-Nov-2004, "W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> wrote:
Bob - probably because it's already written in VB.NET and as much as I
don't
like VB.NET - there's no need to rewrite it. Wouldn't you agree?


Wellllll - no. I don't like having mixed stuff in my code. When I did VB6 I
did VB6. When I did Delphi I did Delphi. When I went to C#, I do C#.
Just my opinion - sorry.
Nov 16 '05 #6
Essentially, you can mix and matc C# and VB.net code, but there is a trick.
All the VB.net code must be in a separate project from the C# code. Then
you can simply add both projects to one solution and access the VB.NET code
as you would a normal C# class.

I had a recent need to use optional arguments for a project, and this was
the only way to achieve what I needed to do.
Nov 16 '05 #7
You could have used the params feature of C#, but this isn't type-safe if
you have different types of parameters to pass.

--Liam.

"Desiado" <De*****@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
Essentially, you can mix and matc C# and VB.net code, but there is a trick. All the VB.net code must be in a separate project from the C# code. Then
you can simply add both projects to one solution and access the VB.NET code as you would a normal C# class.

I had a recent need to use optional arguments for a project, and this was
the only way to achieve what I needed to do.

Nov 16 '05 #8

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

Similar topics

5
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one...
3
by: JoeK | last post by:
Hey all, I am automating a web page from Visual Foxpro. I can control all the textboxes, radio buttons, and command buttons using syntax such as: ...
3
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a...
4
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage...
3
by: John A. Prejean | last post by:
This one has me stumped. I have a base form I am trying to wrap up, but I have one problem. In two functions I am opening a "record detail" form. I would like to keep the code in the base form...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
7
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am trying to see if I can call a Library remotely. The library contains a Form that I want to display then pass back some data to user that called this form remotely. I have it working...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.