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

How to use VB.net forms in CS.net project

Hi

I have a difficulty using already existant VB.net forms in the CS.net project.
Is it possible at all to work with both types of forms in the same cs project
If yes, please tell me how to do i

Thanks
Nov 15 '05 #1
3 1852
Hi Peter,

It depends on what you are trying to accomplish.
If you compile your VB.NET form in an separate assembly (dll) and make your
form classes public you can use the form in the C# project as any other
class (reference that assembly in you project and go)

If you want to add VB.NET source files to your C# project then that is not
possible. Project has to be homogenous in terms of language.

--
B\rgds
100

"Peter Krikelis" <pk*******@hotmail.com> wrote in message
news:46**********************************@microsof t.com...
Hi,

I have a difficulty using already existant VB.net forms in the CS.net project. Is it possible at all to work with both types of forms in the same cs project? If yes, please tell me how to do it

Thanks

Nov 15 '05 #2

Hi pkrikelis,

Thank you for posting in the community!

Based on my understanding, you have an existent VB.net class, you want to
use it in a C# project.

======================================
Just as Stoitcho said, you should compile the VB.net class into a dll, then
you can add the dll into the C# project as a reference and use it.

What I want to add is that: You can add a VB.net project into the same
solution with a C# project. Then in the C# project, you can add the VB.net
project as a reference.
Then in C# project, you also can use VB.net class.

But actually, this is almost the same as compile the VB.net class into a
dll, because everytime compile, the VS.net IDE will first compile the
VB.net project into a dll, then refer the dll into the C# project.

Hope the information helps you.

====================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

Hi pkrikelis,

Does our reply make sense to you?

If you still have anything unclear, please feel free to tell me, I will
help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4

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

Similar topics

6
by: Bob | last post by:
Declaring a module level form object in multiple froms within a project to show another project form causes a stack overflow and other assorted errors. Can anyone help?
6
by: ALthePal | last post by:
Hi, I'm not sure if we are able to or even how to loop through the web forms in a VB.NET project during design time. In MSAccess we are able to go through the database -> forms collection and...
3
by: 20041210.20.eclipse | last post by:
Hi, I'm using MS Visual Studio .NET 2003 Standard on WinXP Home on a DELL Notebook. It is not possible to create a project that contains windows forms. When trying to create a Windows Forms...
3
by: Gustavo L. Fabro | last post by:
Greetings! I'm a newbie in Visual C++ .NET (have programmed in Borland C++ and Builder for long) and I am trying to do a very simple thing, but I'm stuck. I created an (unmanaged) DLL project...
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
2
by: Rob | last post by:
I was working on a project and everything was going fine, then all of a sudden the form set as my startup object stopped loading. I tried setting some others as the startup object, and some of my...
0
by: Tony Johansson | last post by:
Hello! I have a very specific question and that is about how to inherit a visual control for example the control System.Windows.Forms.TextBox without causing the environment to delete the...
5
by: Siv | last post by:
Hi, I have a form in my project called "Uploader" and I want to access it from a menu within the main form using the following: Uploader frm = new Uploader(); frm.ShowDialog(); Where...
4
by: Per Bolmstedt | last post by:
(This question has been asked previously in this group, but I don't think it was ever really properly answered.) I want to use reflection - preferably - to find all Web Forms in my web site that...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.