Hi all
We are new to coding in VB after many years COBOL (yes i
know!!!). Anyway esentially we are trying to have a
simple .exe program that will call relevant .dll's when
required.
The .dll needs to have a full interface including Menu's
but can't seem to ge this to work. I can create a user
control and call that but of course this can not have a
menu! Is there any way a dll can contain a windows form
and still be called?
Hope someone can help
Martin 9 1017
There are many seemingly conflicting comments in this post.
First of all the newsgroup you have posted to is VB.NET which uses the >NET
framework. If you are coding in classic VB then you need to go to one of
those groups.
If you are coding in .NET, then the .NET provides everything you need to
code up windows forms etc.
Can you be more explicit about what you are trying to acheive , because it
sounds like you are trying to acheive.
OHM
Martin wrote: Hi all
We are new to coding in VB after many years COBOL (yes i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's when required.
The .dll needs to have a full interface including Menu's but can't seem to ge this to work. I can create a user control and call that but of course this can not have a menu! Is there any way a dll can contain a windows form and still be called?
Hope someone can help
Martin
* "Martin" <an*******@discussions.microsoft.com> scripsit: We are new to coding in VB after many years COBOL (yes i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's when required.
The .dll needs to have a full interface including Menu's but can't seem to ge this to work. I can create a user control and call that but of course this can not have a menu! Is there any way a dll can contain a windows form and still be called?
Just create a class library project, add a reference to
"System.Windows.Forms.dll" and some other libraries which are needed for
Windows Forms, then design your forms + menubars in the DLL.
Later you can reference the DLL from within your EXE project and
instantiate the forms defined in the class library.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Yes we are using vb.net, sorry should have been more
explicit!
I am happy coding windows forms without a problem. The
problem arises because i want the forms to be in
individual .dll files (or any other file type) so that
they can be called when needed without having all the
forms in the main .exe program.
hope this makes sense! -----Original Message----- There are many seemingly conflicting comments in this
post. First of all the newsgroup you have posted to is VB.NET
which uses the >NETframework. If you are coding in classic VB then you need
to go to one ofthose groups.
If you are coding in .NET, then the .NET provides
everything you need tocode up windows forms etc.
Can you be more explicit about what you are trying to
acheive , because itsounds like you are trying to acheive.
OHM
Martin wrote: Hi all
We are new to coding in VB after many years COBOL (yes
i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's when required.
The .dll needs to have a full interface including
Menu's but can't seem to ge this to work. I can create a user control and call that but of course this can not have a menu! Is there any way a dll can contain a windows
form and still be called?
Hope someone can help
Martin
. -----Original Message----- * "Martin" <an*******@discussions.microsoft.com>
scripsit: We are new to coding in VB after many years COBOL (yes
i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's
when required.
The .dll needs to have a full interface including
Menu's but can't seem to ge this to work. I can create a
user control and call that but of course this can not have
a menu! Is there any way a dll can contain a windows
form and still be called?
Just create a class library project, add a reference to "System.Windows.Forms.dll" and some other libraries
which are needed forWindows Forms, then design your forms + menubars in the
DLL. Later you can reference the DLL from within your EXE
project andinstantiate the forms defined in the class library.
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet> .
We have created a class library project with a user
control and can reference that fine. Problem is that
does not allow menu bars and when we try to use a normal
form within the .dll it no longer references it.
Are there any examples that i could view? AS i say very
new to this so if we can get an idiots quide to this it
would be very useful!!!!
Sorry if we are thick!!!!
OK Martin, I see what you are trying to do now, sorry if I didnt read you
correctly. This is something I havent had the need to do so I'm not able to
offer any help at this point.
Appologies if I wasted your time with my post, have you tried googling this
query ?
Good Luck and Regards
OHM
mARTIN wrote: Yes we are using vb.net, sorry should have been more explicit!
I am happy coding windows forms without a problem. The problem arises because i want the forms to be in individual .dll files (or any other file type) so that they can be called when needed without having all the forms in the main .exe program.
hope this makes sense! -----Original Message----- There are many seemingly conflicting comments in this post.
First of all the newsgroup you have posted to is VB.NET which uses the >NET framework. If you are coding in classic VB then you need to go to one of those groups.
If you are coding in .NET, then the .NET provides everything you need to code up windows forms etc.
Can you be more explicit about what you are trying to acheive , because it sounds like you are trying to acheive.
OHM
Martin wrote: Hi all
We are new to coding in VB after many years COBOL (yes i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's when required.
The .dll needs to have a full interface including Menu's but can't seem to ge this to work. I can create a user control and call that but of course this can not have a menu! Is there any way a dll can contain a windows form and still be called?
Hope someone can help
Martin
.
OHM,
This is a typical way of MS-cobol (and the sames) of Dos programming.
I made 4 times an answer and 4 times I did stuff it.
I did make an answer, because I think it is not the way it is done in
VB.net, but I can be wrong and there are more who do this, therefore I did
stuff it.
Doing it in this way makes is very efective for memory use, so you can stay
easily under the 1Mb from Dos with a lot of forms (with extended memory).
I think, that is something a VB.net programmer never thinks on anymore,
because he uses the windows deskop and things like the Start menu and memory
there is enough.
I did want to give an answer that using the MDI is something the same, but
that is not true either, althought that is the menu problem.
Just for your information.
Cor
Thanks Cor.
I guess, they beleive that they have a need to do this, and they have as
valid a reason to pose this question as anyone else. It just probably
wouldnt be something I would likely want to do ( as yet anyway ).
Have a good day
OHM
Cor wrote: OHM,
This is a typical way of MS-cobol (and the sames) of Dos programming.
I made 4 times an answer and 4 times I did stuff it.
I did make an answer, because I think it is not the way it is done in VB.net, but I can be wrong and there are more who do this, therefore I did stuff it.
Doing it in this way makes is very efective for memory use, so you can stay easily under the 1Mb from Dos with a lot of forms (with extended memory).
I think, that is something a VB.net programmer never thinks on anymore, because he uses the windows deskop and things like the Start menu and memory there is enough.
I did want to give an answer that using the MDI is something the same, but that is not true either, althought that is the menu problem.
Just for your information.
Cor
* "Martin" <an*******@discussions.microsoft.com> scripsit: We have created a class library project with a user control and can reference that fine. Problem is that does not allow menu bars and when we try to use a normal form within the .dll it no longer references it.
What do you exactly mean with "it no longer references it"? The type of
the project must still be "class library".
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
On 2003-11-20, Martin <an*******@discussions.microsoft.com> wrote: Hi all
We are new to coding in VB after many years COBOL (yes i know!!!). Anyway esentially we are trying to have a simple .exe program that will call relevant .dll's when required.
The .dll needs to have a full interface including Menu's but can't seem to ge this to work. I can create a user control and call that but of course this can not have a menu! Is there any way a dll can contain a windows form and still be called?
Hope someone can help
Martin
As others have said - you simply create the form in a class library.
You need of course make sure that your library references System.Drawing
and System.Windows.Forms so that it can create a form - but other then
that it should be fairly strait forward...
' dll
Imports System.Drawing
Imports System.Windows.Forms
Namespace MyNamespace
Public Class MyForm
Inherits System.Windows.Forms.Form
....
End Class
End Namespace
' exe
Imports System.Drawing
Imports System.Windows.Forms
Imports MyNamespace
Public Class App
Public Shared Sub Main
Application.Run(New MyForm())
End Sub
End Class
--
Tom Shelton
MVP [Visual Basic] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hasho |
last post by:
Why is "call by address" faster than "call by value"?
|
by: Sweety |
last post by:
plz reply,
thanks in advance.
bye
|
by: john |
last post by:
Is there a way in .Net to call a function or web service
under a different security context as the one that the
user is logged into?
For example, if a user calls web service 1 (WS1), WS1 is
now...
|
by: Jazper |
last post by:
hi
i have this problem. i made a class deverted by CRootItem with
implementation of IDisposable-Interface. i made a test-funktion to test my
Dispose-Method.... but when set a breakpoint in my...
|
by: Yostage |
last post by:
I'm calling a function in a DLL from my C# app. The function returns a
int* that it allocates using calloc.
Will this be a memory leak problem for my app?
Is there a way to fix it other than...
|
by: surya |
last post by:
Hi,
I use the Assembly.LoadFrom call in my code to load assemblies dynamically.
This call currently loads both signed and unsigned assemblies.
It now needs to be changed to load only signed...
|
by: Bern McCarty |
last post by:
I have run an experiment to try to learn some things about floating point
performance in managed C++. I am using Visual Studio
2003. I was hoping to get a feel for whether or not it would make...
|
by: Steven T. Hatton |
last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it
says.
http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html
<shrug>
--
NOUN:1. Money or...
|
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...
|
by: George2 |
last post by:
Hello everyone,
Such code segment is used to check whether function call or exception-
handling mechanism runs out of memory first (written by Bjarne),
void perverted()
{
try{
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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,...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| |