|
|
Dave, so even if a .NET dll is exposed to COM by the runtime (thus making it a kind of ActiveX control), this still isn't possible? After doing some research, it looks like an .ocx differs very little from a standard COM/ActiveX control. Since one can build ActiveX control by exposing your type to COM, isn't it then possible to have an OCX built from managed code? My understanding is that the ComVisible attribute causes the assembly to be exposed to COM, thus allowing for things like ActiveX objects.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Judah Himango wrote: Since one can build ActiveX control by exposing your type to COM
An ActiveX control is, for all intensive purposes, an OLE object that supports, at a minimum, the IUnknown interface.
You can exposed a .NET component to COM, but that doesn't make it an ActiveX control. You're actually just registering a COM Callable Wrapper for a .NET Assembly. By default, the standard wrapper automatically generates the interfaces for IUnknown, IDispatch, and INew, among others. Any of which can be overridden with a custom implementation, or removed entirely.
If his other app that needs these controls can work with a COM-exposed .NET component, great! Obviously, his clients will still have to have the .NET Framework installed for this thing to work. So knowing that, it kind of makes it a pain to write an "ActiveX" component in .NET, drop into a web page, and expect it to work on all clients. A normal ActiveX control doesn't really need any other support for it to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yep, I understood all that. So if his client can work with COM object with a .NET backend (that is, a .NET assembly exposed to COM), could he build a .NET library with an .ocx extension?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Ya know, I've never tried to rename a .NET assembly to .OCX and register the thing. Might work, might not...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I am new to c# and I want to know how to or anyone can suggest to me a code to prevent my textbox from accepting any assigned character or number???
Help me please!!!!!
|
|
|
|
|
In .NET 2.0 there is a MaskedTextBox control that might help you. Otherwise, you can do manual prevention of character entering by overriding the TextBox's Validating event.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
The following connectionString is present in App.Config
<configuration>
<appsettings>
<add key="ConnectionString" value="Data Source=machine1;Initial Catalog=database1;User Id=user1;Password=password1;">
Now I would like to retrieve it using the following code
public static string GetConnectionString
{
get
{
return ConfigurationManager.AppSettings["ConnectionString"];
}
}
Is this correct?
Thanks
|
|
|
|
|
|
Depending on what text was left out at the top, it looks OK.
Here's an example from one of my projects:
<appSettings>
<add key="connectionstring" value="my normal sql connection string was here . . . " />
</appSettings>
And the calling code:
string configFileConnString= ConfigurationSettings.AppSettings["connectionstring"];
Cheers,
Simon
> blog:: brokenkeyboards
> what I think of the OPTIONAL keyword in VB.NET? :: here
> CV :: PDF
> skype :: SimonMStewart
-- modified at 12:14 Friday 10th February, 2006
|
|
|
|
|
DataSet allow me to add a new column to the end of DataSet . But , I want to add a new column to the first (or anywhere) of DataSet . How to insert a new column in anywhere of DataSet?
Thanks a lots if you help me .
imagic
|
|
|
|
|
Hello,
First of all you can not add column in a DataSet . You can do it in a DataTable . Can you explain why do you want to insert column at a specified index?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Becase those columns aren't in database . But , I want them appear in DataGrid (in specified position) .
Is DataTable allow me to insert a new column in anywhere ?
Or you want me to add column sequently ?
imagic
-- modified at 5:19 Saturday 11th February, 2006
|
|
|
|
|
Hello,
You can add columns sequentially. You can use DataGridTableStyles for displaying column in whatever sequence you want.
HTH. Cheers.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Thanks a lot . I do it successfully .
imagic
imagic
|
|
|
|
|
Hi there.
I'm pretty new in using C# and VS2005. I've made a little program that opens a calender in a windows form. Here's the trouble:
How can I read the mouse buttons so that I can know if the program is startet by a click (then the left button will still be pressed down when my program starts) or by key press on the keyboard? I can not get the information before the program startes, so I can not open it with this information as a parameter.
I need it to set the position to either the pointers position (when started by mouseclick) or center on the screen (when started by keyboard).
I know that a windows form contains the possibility to call a method upon mouseclick. But in this case, the left mousebutton is pressed down before the program executes and the form opens. But of course, in the beginning of the program, the left button will still be pressed down. So I think that it will be possible to detect, I just don't know how
I hope that somebody can help me, thanks in advance.
__________________
John Reinhold - DK
|
|
|
|
|
This came up on Raymond Chen's blog[^], I seem to recall that it isn't very feasible to get such a thing to work. I could be wrong; you'd have to search that blog to be sure, or if someone more knowledgeable than I knows better...
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
Does anybody have any code that will check to see if Visaul Studio 2005 is installed on the host machine? I have written a utility that requires that is is on the machine for it to function property but I havn't be able to figure out how to check if VS 2005 is actually installed.
thanks,
-dk
|
|
|
|
|
|
Sorry, I know that this isn't the right place for this type of Questionl, but i realy need help.
Please help me... I have a real brain boggler of a problem. This is the code i'm using...
<xsl:template match="TableEndOfDay">
<table border="1" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="1" cellspacing="0" cellpadding="1" width="100%">
<xsl:for-each select="StaffID">
<tr>
<th><font face="Tahoma">hallo</font></th>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</table>
</xsl:template>
As Soon as i take out the xsl:for-each statement, the "hallo" displays once in the tables.
BUT as soon as i use the code as it is, the only thing showing is the outer tables' border. I need to be able to display the "hallo" once each time for each StaffID. It is quite urgant to me. Please help..... Any advice is welcome. At this point, i'll try anything.
|
|
|
|
|
JJDPPROG wrote: Sorry, I know that this isn't the right place for this type of Questionl
Totally correct that this does not belong here but we are all tolerant people here. This sounds alot like homework, so try looking futher on the web and let us know what the solution is.
|
|
|
|
|
It is not homework. I only put that example of the code to make it easier to explain it to me. The "hello" is actually Data that has to be displayed from the database and i thouht it to be easier to just explain this easy example...
|
|
|
|
|
I appologise. Sounded bit like a grade 2 question, never used that little xsl. Lets see the xml and I'll see if I can help.
|
|
|
|
|
paste some of xml you are trying to transform.
|
|
|
|