|
yes Colin Angus Mackay
Yes I mean Factory Pattern... please explain me ?
why we using whats the advantage of its...?
please hepl me ..
-- modified at 7:36 Monday 30th October, 2006
Pavan Pareta
|
|
|
|
|
a good article on Factory Pattern
http://www.ondotnet.com/pub/a/dotnet/2003/08/11/factorypattern.html
|
|
|
|
|
|
Hello ,
can we call VC++.net function in VB.net or vice Verse. If yes then what is the methodology to do so?
Thanks for the support
Kind Regards
Sandy
|
|
|
|
|
Create a class library project in one or the other. Then in the client app. add a reference to it and an import or using statement.
Kevin
|
|
|
|
|
Hi Kevin,
Thank you very much, i think you are right, i can do that. But what if there is a project with a form in VB.net. can i make this form or module as a part of my VC++. net file.
To be very clear, i have one module with a form in VB.net. i want this form to open when i click a button in VC++.net MDI dialog box. Is it possible? i guess not??
What about porting that form into my VC++. net MDI?
Kindly help me, i hope my problem is stated well. if not kindly ask me to be clear.
Thank you.
Kind Regards
Sandy
|
|
|
|
|
Hy Sandy,
I faced a similar problem, and find the solution.
In my case, I created a C++ .NET Class Library with Form class and ported to C+++ Builder as an MDI Child.
I absolutly sure, your problem can be solved too.
Some suggestion:
-Create Class library with Form class
-Write a public Interface with CreateForm() method
-Write a public class which expose the Interface; in the CreateForm() method create a Form and call the form Show() method;
-Create a Type Library and register it with regasm.exe
-Add the assembly to the GAC with gacutil.exe
In the Other DEV Environment:
-import type library
-create an instance of the public class
-Call the CreateForm() method and you'll see a form
To resolve the MDI child problem
-pass the parent handle to the childe + Call SetParent() WinAPI fuction
-set the child window style to MDIShilde with the SetWindowLong() WinAPI fuction
This guideline is bullshit, I know...
You probably dont understand, what I mean... but I tryed.
I guess, there is a simpler solution to your problem, because you stay in the .NET Framework...
If I have some free time, I'll write a tutorial to explain everything...
Till then, don't give up...
-- modified at 5:13 Friday 27th October, 2006
Useful resources:
MSDN .Net Interop articles
Exposing .NET Components to COM By Nick Parker.
http://www.codeproject.com/dotnet/nettocom.asp
Understanding Classic COM Interoperability With .NET Applications By Aravind C.
http://www.codeproject.com/dotnet/cominterop.asp
.NET - COM Interoperability By KRISHNA PRASAD.N.
http://www.codeproject.com/dotnet/COM_DOTNET_INTEROP.asp
|
|
|
|
|
Hi,
Thanks a lot, i think this will help me a lot. I will just try this concept of yours. I am not totally clear about this concept. i may be needing your total support inorder to carry on. i will be in touch with you. hope you dont mind?
Thanks & Regards
Sandy
|
|
|
|
|
Step by step:
In VC++:
1. File > New Project > VC++ > CLR > Class Library
2. Right Click on the project > Add > Class
Select Windows Form
3. Close Solution
In VB:
1. File > New Project > VB > Windows > Windows Application
2. Switch the Form IsMdiContainer property to true
3. Add a MenuStrip to the Form
4. Insert 2 menuitem:
-New VC++ Form
-Window
5. Select the MenuStrip
Set the MdiWindowListItem to WindowToolStripMenuItem
6. In the Solution Explorer right click on the project and Add Referece
Go to the Browse tab and find the VC++ dll
7. In 'New VC++ Form' menuitem click event:
Dim CppForm As Object
CppForm = New VCpp_Form.Form1
CppForm.MdiParent = Me
CppForm.Show()
Other notes:
-It works vice versa. (VB -> VC++)
-It is also possible to port the .NET window to other Dev. Environment,
but if you leave the .NET Framework it is more complicated than the specific example.
Such as I embedded the VC++ Form to the C++ Builder 6, but I'm absolutely sure it works with MFC, VB 6, etc.
|
|
|
|
|
Hi All
I have written an xml web service it works fine. My install program also works fine. The problem is that when I try and "edit" the web.config file I do not have the correct security settings on the web.config file. If I change them manually it the program works fine. Now the question. How do I go about setting security settings programmatically in .Net 2
Thanx
|
|
|
|
|
progamatically call WindowActivate event
how can i call it? thats of word object
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Goal:
Create a .NET Form in Visual Studio 2005 (C++) and use it in Borland C++ Builder 6 as MDI Child form.
I read several article in .NET Interop, and I managed to create the .NET form in Builder, but I have not any idea how to resolve the MDI childe problem.
Present source code avialable here:
http://bmfnik.hu/szokeimre/prog/DotNet_COM_Builder.ZIP
|
|
|
|
|
I resolved the MDI child problem too.
The key is WinAPI
|
|
|
|
|
Hi,
Iam new to the web applications,Can u Plz tell me whats the need of creating virtual directory for the web application
Advanced Thanks
Srilakshmi
|
|
|
|
|
you have required for create Virtual Directory IIS in your Operating System
then go ==> Control Panel ==> Administrative Tools ==> Internet Information Services
then go "web sites" ==> "Default Web Site"
Right Click on the "Default Web Site" and click on NEW => Virtual Directory
then Next gives name for VDs = Alias = Web project path = Read/write OR MORE = NEXT = FINISH
Pavan Pareta
|
|
|
|
|
Could u plz explain me what purpose we are creating the virtual directory,even without having virtual directory we can run asp.net web application in local system
|
|
|
|
|
You're talking about 2 different animals. IIS vs Casini.
|
|
|
|
|
has someone a simple sample in vb.net cf for a today plug-in. have only found a sample in c#: http://www.microsoft.com/downloads/details.aspx?familyid=5a37056b-a2b7-4968-89cb-5f7c3da1edaa&displaylang=en
but this today screen sample is very complicated for me, c# is not my language.
please, i hope someone can help.
mfg.
|
|
|
|
|
The environment is Visual Studio 2005 and my project was created via extensibility -> shared add-in.
How can I debug efficiently?
At present, I have to SETUP the add-in and start outlook manually each time I want to see the differences I have made to the program ...
-- modified at 14:35 Wednesday 25th October, 2006
|
|
|
|
|
imports microsoft.office.core.commandbar
which dll should i import??
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
Hi guys ,,
can u plz help me , i want to pass parameters to a function which is being called by a thread ,, i cannot find any solution to resolve this issue
void show(int a)
{
//process
}
t = new thread(new threadstart(show(90).start));
this code is not valid but u can understand what i want to do , have u any idea plz help me out
thans in advance
hello
|
|
|
|
|
You cannot pass parameters to thread methods in .NET 1.1. There are several workarounds to solve these issues, the one we follow is
<br />
class MyClass<br />
{<br />
private int a;<br />
public int A<br />
{<br />
get{ return a;}<br />
set{a = value;}<br />
} <br />
void show()<br />
{<br />
}<br />
}<br />
<br />
MyClass myObj = new MyClass<br />
myObj.A = 90;<br />
Thread t = new Thread(new ThreadStart(myObj.show));<br />
t.Start();<br />
In .NET 2.0, we have a ParameterizedThreadStart delegate which will allow you to pass parameters to the methods while creating threads.
My small attempt...
|
|
|
|
|
Question - How can the profile provider be specified at runtime?
Explanation:
I have two systems, one for 'Test' and one for 'Live' and each has a Sql Server.
When 'Test' code is published to 'Live' I currently have to edit connection strings in web.config to ensure that the live system does not access the test database and vice versa.
This method is prone to error so for Membership and Roles, I have created providers for Test and Live and select the correct provider at runtime. (This is achieved by recognising the machine name of the Test server).
eg
MembershipProvider myMembershipProvider =
Membership.Providers["CustomAspNetSqlMembershipProvider"];
MembershipUser myMember = myMembershipProvider.GetUser(strUsername, true);
However, the same syntax does not seem to be available for Profile.
I need to select the profile provider at runtime, but the defaultProvider is always used.
Extract from Web.config
<profile enabled="true" defaultprovider="CustomAspNetSqlProfileProvider" automaticsaveenabled="true">
<providers>
<clear>
<add name="CustomAspNetSqlProfileProvider" connectionstringname="LiveSqlServer" applicationname="myApp"
="" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<add name="LocalAspNetSqlProfileProvider" connectionstringname="LocalSqlServer" applicationname="myApp"
="" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<properties>
<add name="Firstname">
<add name="Lastname">
<add name="Comments">
The following code creates a ProfileCommon using the default provider
ProfileCommon mProfile = new ProfileCommon();
mProfile.Initialize("myUsername", true);
I would like to use the LocalAspNetSqlProfileProvider on the 'Test' system, and use the CustomAspNetSqlProfileProvider on the 'Live' system.
The following line fails because the 'Live' SQLServer is unavailable from 'Test'
TextBox1.Text = mProfile.Firstname;
How can the profile provider be specified at runtime?
|
|
|
|
|
Oops - I didn't realise that xml tags would be stripped. Here's the web config again.
Extract from Web.config
<profile enabled="true" defaultProvider="CustomAspNetSqlProfileProvider" automaticSaveEnabled="true">
<providers>
<clear />
<add name="CustomAspNetSqlProfileProvider" connectionStringName="LiveSqlServer" applicationName="myApp"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="LocalAspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="myApp"
type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="Firstname"/>
<add name="Lastname"/>
<add name="Comments"/>
</properties>
</profile>
|
|
|
|
|
Hi
Can we use a dll file of .net in vb project or can we use a vb file in .net project. if yes how can we do that.
Thanks & Regards
Mishra
|
|
|
|