473,721 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I use C# GUI component in my MFC application.

Hi Guys,

Would you be able to help me using C# GUI (with user interface component) in
my MFC application. I have used managed extension, COM-interops, etc but
problem is this C# component has user interface. how should have get window
handle from managed windows?

Thanks in advance.
Sushil
Nov 17 '05 #1
3 9832
Hello Sushil,

Here's some stuff I had written on this topic for my book (Extending MFC
Applications with the .NET Framework co-authored with Tom Archer) - but it
never made it to the book as we found that COM techniques were available
that were better suited to doing it. But personally, I've always felt that
the technique I used (crude subclassing) was actually simpler to implement.
Of course with VC 8, you won't need to do all this as MFC has classes to
interact with Windows Forms smoothly.

[*****snip*****]

Using a .NET control in an MFC dialog

Well, we have seen how Windows Forms makes GUI development slightly easier
for us, and how we can easily develop custom Forms controls. But obviously
if we cannot use them in our existing MFC based applications, it's not going
to be very useful for us. Let's see how we can use a .NET Windows Forms
control in an MFC application. In fact let's use the same
Centigrade-Fahrenheit conversion control that we developed in the previous
section.

First create a MFC dialog based application and add Managed Extensions
support to it by setting the required project properties. Now add
System.Windows. Forms , System.Drawing and FirstComposite (this is our custom
C-F-C control) to the Project Reference list. Basically what we do is to
write a wrapper class for the custom .NET control we developed. The wrapper
class will have a CWnd member variable and we use the CWnd::Attach function
to attach the control to the CWnd object, and we get the HWND of the user
control using the Handle property. Things will be clearer when you examine
the code :-

//Header file
#pragma once

using namespace FirstComposite;

class CControlWrapper
{
public:
CControlWrapper (void);
~CControlWrappe r(void);
BOOL Create(CWnd* pWnd, int x, int y, int cx, int cy);
private:
CWnd m_wnd;
gcroot<FirstCom positeControl*> m_control;
};

//Implementation file
#include "StdAfx.h"
#include ".\controlwrapp er.h"
#using <mscorlib.dll >
#using <system.dll>

CControlWrapper ::CControlWrapp er(void)
{

}

CControlWrapper ::~CControlWrap per(void)
{
m_wnd.Detach();
}

BOOL CControlWrapper ::Create(CWnd *pWnd, int x,
int y, int cx, int cy)
{
BOOL suc = FALSE;

m_control = new FirstComposite: :FirstComposite Control();
m_control->Location = System::Drawing ::Point(x, y);
m_control->Name = S"WrappedUserCo ntrol";
m_control->Size = System::Drawing ::Size(cx, cy);

if( m_wnd.Attach((H WND)m_control->Handle.ToPoint er()) )
suc = TRUE;

m_wnd.SetParent (pWnd);

return suc;
}

As you can see, all the action is in the Create method, where we instantiate
and create our .NET custom Forms control. We get the HWND of the control
using the Handle property and attach it to the CWnd member object using the
CWnd::Attach method. And then we call the SetParent method to associate the
control with our dialog window. As you can see, we have called Detach on the
CWnd object in the class destructor, else when the CWnd object's destructor
gets called, the call to DestroyWindow will fail.

Add a CControlWrapper member variable to the dialog class, and add the
Create call in the OnInitDialog :-

m_control.Creat e(this,20,20,20 0,200);

Compile and run the program, and you'll see the .NET control we created
earlier looking nice and snappy inside our MFC dialog. In fact, you can
embed any .NET Forms controls in your MFC program, including the native .NET
controls like TextBox, ListBox etc. In the above control we don't need to
access any methods or properties of the wrapped control, but sometimes we
might need to make calls to the control methods, as in the case of our
colored list box which we created earlier. For such controls we need to
write wrapper methods and properties for all functions and properties that
we need to expose to the calling program. Let's now write a similar program
as above to use the colored list box control in an MFC dialog program. Just
follow similar steps as above, make sure you reference the colored list box
DLL, and create the wrapper class as follows :-

//Header file
#pragma once

class CControlWrapper
{
public:
CControlWrapper (void);
~CControlWrappe r(void);
BOOL Create(CWnd* pWnd, int x, int y, int cx, int cy);
void Clear();
void Add(CString str);
void GenerateWinner( );
private:
CWnd m_wnd;
gcroot<ColorLis tBox::ColorList BoxControl*> m_control;
};

//Implementation file
#include "StdAfx.h"
#include ".\controlwrapp er.h"
#using <mscorlib.dll >

CControlWrapper ::CControlWrapp er(void)
{
}

CControlWrapper ::~CControlWrap per(void)
{
m_wnd.Detach();
}

BOOL CControlWrapper ::Create(CWnd* pWnd, int x, int y, int cx, int cy)
{
BOOL suc = FALSE;

m_control = new ColorListBox::C olorListBoxCont rol();
m_control->Location = System::Drawing ::Point(x, y);
m_control->Name = S"WrappedUserCo ntrol";
m_control->Size = System::Drawing ::Size(cx, cy);

if( m_wnd.Attach((H WND)m_control->Handle.ToPoint er()) )
suc = TRUE;

m_wnd.SetParent (pWnd);

return suc;
}

void CControlWrapper ::Clear()
{
m_control->Items->Clear();
}

void CControlWrapper ::Add(CString str)
{
m_control->Items->Add((System::S tring*)str);
}

void CControlWrapper ::GenerateWinne r()
{
m_control->GenerateWinner ();
}

As you can see, we have written methods in the wrapper class that internally
call the corresponding methods in the inner class. Notice how we have used a
CString as the argument, but in the method we convert it to a String*. This
makes it easier for MFC code to call this function. And now calling those
methods for a calling program would be as easy as the code snippet below :-

void CMFCListBoxTest Dlg::OnBnClicke dButton1()
{
m_control.Clear ();
m_control.Add(S "Goran Ivanisevic");
m_control.Add(S "Andre Agassi");
m_control.Add(S "Pete Sampras");
m_control.Add(S "Gabriela Sabatini");
m_control.Add(S "Mary Joe Fernandez");
m_control.Add(S "Venus Williams");
m_control.Add(S "Boris Becker");
m_control.Add(S "Leander Paes");

m_control.Gener ateWinner();
}

The only disadvantage is that for every function that you need to expose,
you will have to write a corresponding wrapper function. But usually you'll
find that you only need to expose a few functions, and thus you need to
write wrapper functions only for those methods.

[/*****snip*****]

And here's some more stuff :-

[*****snip*****]
Getting Event notifications for the .NET control

One issue you'll soon realize when you use .NET controls in your MFC dialogs
or form views is that there is no direct way for you to get event
notifications for the control. Let's say you have a list box control (the
..NET version) on an MFC dialog and that you want to update a text box (the
MFC version) with the current selected item's text every time the list box
selection changes. Well, it can be done, as we'll demonstrate in this
section.

Let's create a MFC dialog based application and add support for Managed
Extensions to it. Now add a text box using the dialog editor. Now we'll add
a .NET Windows Forms list box to the dialog just as we had done in the
previous sections with our custom user controls. Here is the header file for
the class :-

#pragma once

#define WM_LISTBOXCHANG ED WM_APP + 100

class MyListBox
{
public:
MyListBox(void) ;
~MyListBox(void );
BOOL Create(CWnd *pWnd, int x, int y, int cx, int cy);
private:
CWnd m_hWnd;
gcroot <System::Window s::Forms::ListB ox*> m_listbox;
HWND m_parent;
};

__gc class EventHandlerCla ss
{
public:
static System::IntPtr m_hwnd;
static System::Void SelectedValChan gedHandler(Syst em::Object * sender,
System::EventAr gs * e)
{
System::Windows ::Forms::ListBo x* listbox =
static_cast<Sys tem::Windows::F orms::ListBox*> ( sender );
CString s = (CString)listbo x->Text;
SendMessage((HW ND)m_hwnd.ToPoi nter(),WM_LISTB OXCHANGED,
(WPARAM)(LPCTST R)s,0);
}
};

Most of it is similar to what we did in the previous sections, but you'll
notice that I have added an __gc class called EventHandlerCla ss. This class
is used as a proxy for the events generated by the .NET control. Basically
we have a static event handler in the __gc class which we register as an
event handler for the .NET control; and thus whenever the event occurs, we
have an access point to the event. Now the next difficulty would be in
passing on this event information to the dialog window where it should be
handled. That's where we use the age old trusted windows message technique.
We have a user-defined message called WM_LISTBOXCHANG ED and we simply post
this message to the handle of the parent window (which in this case will be
the dialog window) and pass the currently selected string in the list box as
the WPARAM parameter. And here is the implementation file for the class :-

#include "StdAfx.h"
#include ".\mylistbo x.h"
#using <mscorlib.dll >

MyListBox::MyLi stBox(void)
{
m_parent = NULL;
}

MyListBox::~MyL istBox(void)
{
m_hWnd.Detach() ;
}

BOOL MyListBox::Crea te(CWnd* pWnd, int x, int y, int cx, int cy)
{
BOOL suc = FALSE;

m_listbox = new System::Windows ::Forms::ListBo x();
m_listbox->Location = System::Drawing ::Point(x, y);
m_listbox->Name = S"WrappedUserCo ntrol";
m_listbox->Size = System::Drawing ::Size(cx, cy);

m_listbox->Items->Add(S"Apples") ;
m_listbox->Items->Add(S"Bananas" );
m_listbox->Items->Add(S"Oranges" );

m_listbox->SelectedIndexC hanged += new System::EventHa ndler(NULL,
EventHandlerCla ss::SelectedVal ChangedHandler) ;

if( m_hWnd.Attach(( HWND)m_listbox->Handle.ToPoint er()) )
suc = TRUE;

m_hWnd.SetParen t(pWnd);
m_parent = pWnd->m_hWnd;
EventHandlerCla ss::m_hwnd = m_parent;

return suc;
}

Well, there isn't much new here compared with what we did in the previous
sections, except that we have registered the event handler from the __gc
class and also saved the parent window's HWND so that we can send the user
defined message to the parent window. In the MFC dialog all we need to do is
add an entry to the message map as follows, and then write the message
handler function :-

BEGIN_MESSAGE_M AP(CGetEventsTe stDlg, CDialog)
. . .
ON_MESSAGE( WM_LISTBOXCHANG ED, OnListBoxChange d )
//}}AFX_MSG_MAP
END_MESSAGE_MAP ()

.. . .

LRESULT CGetEventsTestD lg::OnListBoxCh anged( WPARAM wParam, LPARAM )
{
LPCTSTR str = (LPCTSTR) wParam;
m_edit.SetWindo wText(str);
return 0;
}

Okay, so that is fine now. The MFC program can now get notifications from
the user control. Of course the only issue is that you will have to write
user defined messages and handlers for every event that you want to get
notified for. But this can be solved by having virtual functions in the
control wrapper class, where each virtual function represents an on_event
sort of handler method. So all the MFC caller program has to do is to derive
a class from our wrapper class and override these virtual functions to put
their own code. But then that might be even more contrived a method when
there are only a few events that the caller is interested in, and thus as is
always the case in programming, it's up to the user to decide which
technique he or she chooses.

[/*****snip*****]

--
Regards,
Nish [VC++ MVP]
http://www.voidnish.com
http://blog.voidnish.com
"Sushil Srivastava" <Su************ **@discussions. microsoft.com> wrote in
message news:B5******** *************** ***********@mic rosoft.com...
Hi Guys,

Would you be able to help me using C# GUI (with user interface component)
in
my MFC application. I have used managed extension, COM-interops, etc but
problem is this C# component has user interface. how should have get
window
handle from managed windows?

Thanks in advance.
Sushil

Nov 17 '05 #2
Hi Nishant,

Thanks for your help and I really appreciate your time. I will use it and
let you know how it turned out in my application.

Again Thanks
Sushi Srivastava

"Nishant Sivakumar" wrote:
Hello Sushil,

Here's some stuff I had written on this topic for my book (Extending MFC
Applications with the .NET Framework co-authored with Tom Archer) - but it
never made it to the book as we found that COM techniques were available
that were better suited to doing it. But personally, I've always felt that
the technique I used (crude subclassing) was actually simpler to implement.
Of course with VC 8, you won't need to do all this as MFC has classes to
interact with Windows Forms smoothly.

[*****snip*****]

Using a .NET control in an MFC dialog

Well, we have seen how Windows Forms makes GUI development slightly easier
for us, and how we can easily develop custom Forms controls. But obviously
if we cannot use them in our existing MFC based applications, it's not going
to be very useful for us. Let's see how we can use a .NET Windows Forms
control in an MFC application. In fact let's use the same
Centigrade-Fahrenheit conversion control that we developed in the previous
section.

First create a MFC dialog based application and add Managed Extensions
support to it by setting the required project properties. Now add
System.Windows. Forms , System.Drawing and FirstComposite (this is our custom
C-F-C control) to the Project Reference list. Basically what we do is to
write a wrapper class for the custom .NET control we developed. The wrapper
class will have a CWnd member variable and we use the CWnd::Attach function
to attach the control to the CWnd object, and we get the HWND of the user
control using the Handle property. Things will be clearer when you examine
the code :-

//Header file
#pragma once

using namespace FirstComposite;

class CControlWrapper
{
public:
CControlWrapper (void);
~CControlWrappe r(void);
BOOL Create(CWnd* pWnd, int x, int y, int cx, int cy);
private:
CWnd m_wnd;
gcroot<FirstCom positeControl*> m_control;
};

//Implementation file
#include "StdAfx.h"
#include ".\controlwrapp er.h"
#using <mscorlib.dll >
#using <system.dll>

CControlWrapper ::CControlWrapp er(void)
{

}

CControlWrapper ::~CControlWrap per(void)
{
m_wnd.Detach();
}

BOOL CControlWrapper ::Create(CWnd *pWnd, int x,
int y, int cx, int cy)
{
BOOL suc = FALSE;

m_control = new FirstComposite: :FirstComposite Control();
m_control->Location = System::Drawing ::Point(x, y);
m_control->Name = S"WrappedUserCo ntrol";
m_control->Size = System::Drawing ::Size(cx, cy);

if( m_wnd.Attach((H WND)m_control->Handle.ToPoint er()) )
suc = TRUE;

m_wnd.SetParent (pWnd);

return suc;
}

As you can see, all the action is in the Create method, where we instantiate
and create our .NET custom Forms control. We get the HWND of the control
using the Handle property and attach it to the CWnd member object using the
CWnd::Attach method. And then we call the SetParent method to associate the
control with our dialog window. As you can see, we have called Detach on the
CWnd object in the class destructor, else when the CWnd object's destructor
gets called, the call to DestroyWindow will fail.

Add a CControlWrapper member variable to the dialog class, and add the
Create call in the OnInitDialog :-

m_control.Creat e(this,20,20,20 0,200);

Compile and run the program, and you'll see the .NET control we created
earlier looking nice and snappy inside our MFC dialog. In fact, you can
embed any .NET Forms controls in your MFC program, including the native .NET
controls like TextBox, ListBox etc. In the above control we don't need to
access any methods or properties of the wrapped control, but sometimes we
might need to make calls to the control methods, as in the case of our
colored list box which we created earlier. For such controls we need to
write wrapper methods and properties for all functions and properties that
we need to expose to the calling program. Let's now write a similar program
as above to use the colored list box control in an MFC dialog program. Just
follow similar steps as above, make sure you reference the colored list box
DLL, and create the wrapper class as follows :-

//Header file
#pragma once

class CControlWrapper
{
public:
CControlWrapper (void);
~CControlWrappe r(void);
BOOL Create(CWnd* pWnd, int x, int y, int cx, int cy);
void Clear();
void Add(CString str);
void GenerateWinner( );
private:
CWnd m_wnd;
gcroot<ColorLis tBox::ColorList BoxControl*> m_control;
};

//Implementation file
#include "StdAfx.h"
#include ".\controlwrapp er.h"
#using <mscorlib.dll >

CControlWrapper ::CControlWrapp er(void)
{
}

CControlWrapper ::~CControlWrap per(void)
{
m_wnd.Detach();
}

BOOL CControlWrapper ::Create(CWnd* pWnd, int x, int y, int cx, int cy)
{
BOOL suc = FALSE;

m_control = new ColorListBox::C olorListBoxCont rol();
m_control->Location = System::Drawing ::Point(x, y);
m_control->Name = S"WrappedUserCo ntrol";
m_control->Size = System::Drawing ::Size(cx, cy);

if( m_wnd.Attach((H WND)m_control->Handle.ToPoint er()) )
suc = TRUE;

m_wnd.SetParent (pWnd);

return suc;
}

void CControlWrapper ::Clear()
{
m_control->Items->Clear();
}

void CControlWrapper ::Add(CString str)
{
m_control->Items->Add((System::S tring*)str);
}

void CControlWrapper ::GenerateWinne r()
{
m_control->GenerateWinner ();
}

As you can see, we have written methods in the wrapper class that internally
call the corresponding methods in the inner class. Notice how we have used a
CString as the argument, but in the method we convert it to a String*. This
makes it easier for MFC code to call this function. And now calling those
methods for a calling program would be as easy as the code snippet below :-

void CMFCListBoxTest Dlg::OnBnClicke dButton1()
{
m_control.Clear ();
m_control.Add(S "Goran Ivanisevic");
m_control.Add(S "Andre Agassi");
m_control.Add(S "Pete Sampras");
m_control.Add(S "Gabriela Sabatini");
m_control.Add(S "Mary Joe Fernandez");
m_control.Add(S "Venus Williams");
m_control.Add(S "Boris Becker");
m_control.Add(S "Leander Paes");

m_control.Gener ateWinner();
}

The only disadvantage is that for every function that you need to expose,
you will have to write a corresponding wrapper function. But usually you'll
find that you only need to expose a few functions, and thus you need to
write wrapper functions only for those methods.

[/*****snip*****]

And here's some more stuff :-

[*****snip*****]
Getting Event notifications for the .NET control

One issue you'll soon realize when you use .NET controls in your MFC dialogs
or form views is that there is no direct way for you to get event
notifications for the control. Let's say you have a list box control (the
..NET version) on an MFC dialog and that you want to update a text box (the
MFC version) with the current selected item's text every time the list box
selection changes. Well, it can be done, as we'll demonstrate in this
section.

Let's create a MFC dialog based application and add support for Managed
Extensions to it. Now add a text box using the dialog editor. Now we'll add
a .NET Windows Forms list box to the dialog just as we had done in the
previous sections with our custom user controls. Here is the header file for
the class :-

#pragma once

#define WM_LISTBOXCHANG ED WM_APP + 100

class MyListBox
{
public:
MyListBox(void) ;
~MyListBox(void );
BOOL Create(CWnd *pWnd, int x, int y, int cx, int cy);
private:
CWnd m_hWnd;
gcroot <System::Window s::Forms::ListB ox*> m_listbox;
HWND m_parent;
};

__gc class EventHandlerCla ss
{
public:
static System::IntPtr m_hwnd;
static System::Void SelectedValChan gedHandler(Syst em::Object * sender,
System::EventAr gs * e)
{
System::Windows ::Forms::ListBo x* listbox =
static_cast<Sys tem::Windows::F orms::ListBox*> ( sender );
CString s = (CString)listbo x->Text;
SendMessage((HW ND)m_hwnd.ToPoi nter(),WM_LISTB OXCHANGED,
(WPARAM)(LPCTST R)s,0);
}
};

Most of it is similar to what we did in the previous sections, but you'll
notice that I have added an __gc class called EventHandlerCla ss. This class
is used as a proxy for the events generated by the .NET control. Basically
we have a static event handler in the __gc class which we register as an
event handler for the .NET control; and thus whenever the event occurs, we
have an access point to the event. Now the next difficulty would be in
passing on this event information to the dialog window where it should be
handled. That's where we use the age old trusted windows message technique.
We have a user-defined message called WM_LISTBOXCHANG ED and we simply post
this message to the handle of the parent window (which in this case will be
the dialog window) and pass the currently selected string in the list box as
the WPARAM parameter. And here is the implementation file for the class :-

#include "StdAfx.h"
#include ".\mylistbo x.h"
#using <mscorlib.dll >

MyListBox::MyLi stBox(void)
{
m_parent = NULL;
}

MyListBox::~MyL istBox(void)
{
m_hWnd.Detach() ;
}

BOOL MyListBox::Crea te(CWnd* pWnd, int x, int y, int cx, int cy)
{
BOOL suc = FALSE;

m_listbox = new System::Windows ::Forms::ListBo x();
m_listbox->Location = System::Drawing ::Point(x, y);
m_listbox->Name = S"WrappedUserCo ntrol";
m_listbox->Size = System::Drawing ::Size(cx, cy);

m_listbox->Items->Add(S"Apples") ;
m_listbox->Items->Add(S"Bananas" );
m_listbox->Items->Add(S"Oranges" );

m_listbox->SelectedIndexC hanged += new System::EventHa ndler(NULL,
EventHandlerCla ss::SelectedVal ChangedHandler) ;

if( m_hWnd.Attach(( HWND)m_listbox->Handle.ToPoint er()) )
suc = TRUE;

m_hWnd.SetParen t(pWnd);
m_parent = pWnd->m_hWnd;
EventHandlerCla ss::m_hwnd = m_parent;

return suc;

Nov 17 '05 #3
Hi Nishant, Sushil

Thanks for this great technique on a problem i was also facing. I'm using
VC7 and don't want to use COM for this project.

I used your technique and it works perfectly well for my custom c# controls
which inherits from Windows.Forms.C ontrol

If my control inherits from Windows.Forms.U serControl, the control appears
fine, then it often "freezes" the whole dialog on some user input (seems
like an infinite loop on a windows message)

The only difference i see in my code is that the main app and parent dialog
are not compiled with Managed Extentions, but load a dll with Managed
Extentions which holds the wrapper;

Does anybody see a reason or an issue ? (some style or properties to set ?)

Thanks in advance,
Eric
Nov 17 '05 #4

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

Similar topics

0
1385
by: Karuppasamy | last post by:
H I have created a Windows Application using C#. This Windows application makes a call to a Remoting Object which runs as a Windows Service. This Remoting Component makes a call to a Com+(Name : MyComPlusComponent) component. All the Windows application, the Remoting component and the Com+ run in the same Windows 2000 Advanced Server machine. When i am running the Windows application and invoking a method I am getting an error like this ...
8
775
by: Carel Lotz | last post by:
H We have ported our VB 6 application into VB .NET but are still integrating with a few COM + applications written in VB6 running on our application server (Win 2000 Server). We have the proxies to link to the application server installed but we every now and then get a error when we try to make a call to a component running on the app server. The error message is something like Object reference not set to an instance of an objec at...
0
2821
by: acharyaks | last post by:
Hi life saver, I am using excel component for the development. The purpose is to connect to excel through the odbc connection string. Then through the connection extract data into a dataset and then save the data into a client machine (Intranet) as excel page using the excel component (using Excel = Microsoft.Office.Interop.Excel;) in the code. Please help me. I have wasted so many days on this.
2
1889
by: talam | last post by:
We had an old application developed using Visual Basic Language. We are trying to replace that application with .net 2005, C# Language. In the old application, we had a file attachment component. Purpose of this component was to attach a file to a ticket and store the file in the database (Sybase). I don't have access to the old application but have the following information about how this component worked:
0
1182
by: Sudharsan | last post by:
Hello, Out team is developing a GUI Application. This application will display multiple images at a time. These images must be rotated, zoomed and do various post processing tools. One of the requirement is to play back multiple images at a time. I have few queries here, I developed a Windows control library Component in VC.NET. This component is used in C# application to display images and play back. Multiple instance
122
7390
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection outside of that class. This structured way allows visual tools to host components, and allows programmers to build applications and libraries visually in a RAD environment. The Java language has JavaBeans as its component model which allows Java...
7
2225
by: Joe | last post by:
Is it possible to have a component which is global to the entire application? I need to have a single component act sort of like a server which components in any of the forms can access. For example if I drop a component on Form1 & Form2 and that component has a property called Server, at design time I would like to be able to assign the global component to the Server property. I'm sure I'm asking for way too much...
0
1815
by: Pieter | last post by:
Hi, When using clickOnce for a VB.NET 2.0 application it installs fine on every computer, except one (a new one...). Every is isstalled, Framework, Mdac, .... The error in the log file is: "External component has thrown an exception" Does anybody knows what could have caused this problem?
0
5349
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
1
3423
by: =?Utf-8?B?VmVua2F0ZXNhbiBT?= | last post by:
Hi, I have a requirement of consuming a connection object returned from a COM component deployed in COM+ application. I have given the need for this requirement end of my query. My component returns a Connection objec to ASP page and then I am trying to use the same Connection object to Command/Recordset object to execute a SP I am getting the error given below ************************************
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9064
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.