|
MDAC 2.6 or higher is required to use ADO.NET. MDAC 2.7 or higher is recommended, though I think most of the features that require 2.7 is for the SqlClient. You can download this and include it as a Custom Action in your installer project from http://www.microsoft.com/data[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Salam, you can also download the MDAC merge module from, as I remember, Installshield web site[^]. Then include it in your project.
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Thanks Maysam.
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
I am used to Java programming for quiet some time now, and I was used to be able to add whatever component I could come up with within my popup menues (A ComboBox or a TreeView for example). But somehow I cant figure out how to do that in C#!
Does anybody know how to do this?
|
|
|
|
|
In .NET, almost every control (and many other classes) actually encapsulate native resources (like HMENU s in this case, and the related APIs) unlike in Java (although frames and othe controls are still tied to HWND s, which is accessible via JNI).
Since this is possible using the Win32 APIs, it is also possible - though not always easy - in .NET (on that note, .NET 2.0 will apparently have a new WinBar class and derivative classes that will make this MUCH easier, but it's still pretty raw when I tried it from the PDC build).
I tried a quick search on CodeGuru[^] (has lots of custom controls like this) but couldn't pinpoint something specific. I'm sure you'll find some information there, though I'm betting it'll be in VC++/MFC. The same practices can be applied to your derivative ContextMenu through the Handle property (gets the HMENU you can use in native function calls).
Also, I did manage to find one example that is free for non-profit applications at http://www.divil.co.uk/net/controls/sandbar/[^]. There are several other commercial implementations that would do much the same thing (or that just define their own ContenxtMenu -like components from scratch without using native resources) such as http://www.infragistics.com[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I am using VisualStudio.NET 2002 with .NET Framework 1.0 Actually i am developing a program in which i have to use Browser Control. I have used it on a control which facilitate me in providing wizard. Actually it is a wizard control on which i have used WebBrowser Control. Now i have start it both bu using Debug and without debu it is alright. Now i have created a form in which i call this wizard. Now if i run this program without using debug it will run alright but if i run it with start using debug it will give me error that cannot instantiate Active X control. What can be the problem please guide me
ThanX in advance
Regards
INAM
Inam
|
|
|
|
|
The browser control, while incorporated as a .NET control, is just a wrapper for the COM-intense MSHTML object. You should check the properties of your project to ensure you have the following properties set:
Under Debugging: Enable Unmanaged Debugging
You may still have problems if you do not have the symbols installed for the OS....just a heads up.
_____________________________________________
Of all the senses I could possibly lose, It is most often the one called 'common' that gets lost.
|
|
|
|
|
Sir
Thanks for ur reply Sir but i want to know that from where i can change my properties of Debugging to Enable Managed Debugging and How can i check that if i have the symbols installed or not. and if they are not how can i installed them. I will be thankful to u for giving me time
Regards
minamkhan
Inam
|
|
|
|
|
Inam wrote:
where i can change my properties of Debugging to Enable Managed Debugging
Inam wrote:
This falls under the topic of 'basic things you should know before you begin to think about writing code'.
Pull up the properties for each project in your solution that is using unmanaged code.
Go to Configuration Properties Tab, Debugging.
Set Enable Unmanaged Debugging to true.
How can i check that if i have the symbols installed
Well, for the OS it is really dependant on whether you build your machine or if you have a managed desktop. For the former - you used to be able to select install symbols during the install process. For the latter -- you probably do not have symbols installed. Also, you need to reinstall symbols for the OS with each service pack and hot fix. Check MSDN or the main Windows website for installing the symbols. You should also be able to get the symbols from the Win32 SDK.\
The obvious tell tale sign that you do not have symbols installed is if the unmanaged code craps out, and VS says 'An exception occured within unmanaged code, but no symbols were installed....'
_____________________________________________
|
|
|
|
|
I have set the Enable unmanaged debugging to true but the same error comes .
Actuallt the error when catch through exception is
"
System.Threading.ThreadStateException could not instantiate ActiveX control 'GUID of Control ' because the current thread is not in a single threded appartment at System.windows.Forms.AxHost ctor(String clsId,Int32 flags).
"
Thanx in advance
Regards
minamkhan
Inam
|
|
|
|
|
Make certain that you are using the .NET wrapper that is in the design toolbox and not doing your own ActiveX control.
You have a Win32 form which (as the exception states) is apartment threaded. Unless you use specific thread types that are apartment-aware, then you will get that exception. It sounds like the control on your form is trying to start a thread of its' own which is a no-no in a Winform.
This really goes beyond COM, unmanaged debugging, etc. as it is the implementation of the control, not the actual execution of the unmanaged code.
_____________________________________________
Of all the senses I could possibly lose, It is most often the one called 'common' that gets lost.
|
|
|
|
|
I will explain the scenario
I am updating database with dataadapter method at the same time if some person is attempting for the same thing...How do i will get to know abt this?
Praveen
|
|
|
|
|
If you need more sophisticated algorithm for updating database change you application architecture.
And/or u can use SELECT FOR UPDATE SQL construct. But with this method selected rows will be locked for other users to update or delete.
Tomas Rampas
------------------------------
Systems analyst, MCSD
|
|
|
|
|
If you need more sophisticated algorithm for updating database consider changes in application architecture.
And/or u can use SELECT FOR UPDATE SQL construct. But with this method selected rows will be locked for other users to update or delete.
Tomas Rampas
------------------------------
Systems analyst, MCSD
|
|
|
|
|
How exactly the cookie will work with the form authentication. Is it possible to have form authentication without cookies.
One more
What "?","*" means in authorization tag of webconfig
Regards
Praveen Chintamani.
|
|
|
|
|
|
The cookie contains the encrypted FormsAuthenticationTicket that is sent with every request. The FormsAuthenticationModule decrypts this ticket (using the private key configured in the <machineKey> section of the machine.config or the application's root Web.config file) and creates a FormsIdentity from it that is used to authorize your requests against a protected resource (i.e., directory).
As for the rest of your question, the link the previous post mentioned contains a lot of information. Be sure to read it over.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hiya how do I return all items and subitems in a listview so I can write these values into an SQL database.
Thanks.
|
|
|
|
|
Get the value of ListView.Item[index] and its subitems through a loop. (foreach ), it also contain a property name SubItems which you can get sub items from it.
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
Hiya yeah I figured out how to do that but how do I actually do it??
Any samples available??
Thanks.
|
|
|
|
|
foreach(ListViewItem item in listView1.Items)
{
foreach(ListViewItem.ListViewSubItem sub in item.SubItems)
MessageBox.Show(sub.Text);
}
Mazy
"Improvisation is the touchstone of wit." - Molière
|
|
|
|
|
|
Hey
I got a Class that contains a ArrayList, this Array list is containing objects from another class(also Serilized). How do i Serilize class that contains tha Array list so i can send it over the socket and on the client side use the ArrayLists Objects?
//Jimmy
|
|
|
|
|
I think(not an expert):
You need to take every item in your ArrayList, find out what object type it is. Serielize every items value in those objects that you need to recreate those objects. Send the file to the client. The client opens the file, creats objects and adds them to an ArrayList.
I don't think there are any standard methods for serializing an ArrayList
Hope it helps
|
|
|
|
|
The ArrayList class is already attributed with the SerializationAttribute , meaning that is is serializable. When you use the classes from the System.Runtime.Serialization namespace, any such attributed class (and this attribute is not inherited by derivative classes, so to speak) has its private and public fields (not properties) serialized if they are attributed with the SerializationAttribute .
So, all you need to do is attribute your class (if you haven't done so already) and serialize it. The ArrayList will be serialized, too.
Now, in the case of XML serialization (using the System.Xml.Serialization namespace), only public properties and fields are serialized. This can be controlled using the attributes from this namespace. This type of serialization is not as good as the runtime serialization, though, because the latter takes much more into account and can also serialize into about any form you like (SOAP and binary formatters are provided with the .NET Framework base class library).
For more information on serialization in .NET, see Serializing Objects[^] in the .NET Framework SDK for more information and lots of examples for both types of serialization.
Microsoft MVP, Visual C#
My Articles
|
|
|
|