When I try to not set the visible property it will continue to load okay, but then if I try to use any of the functionality of the program it won't work. For example, if i try to open a file it fails saying there is no active window.
Is there anyway that i can do my processing silently?
If PowerPoint requires an active window it requires an active window. Most likely this is due to how the animations work, but I don't know. What is obvious is that PowerPoint requires an active window.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering Microsoft
First of all, your comments - and perhaps your thinking - are wrong in the sense that the serialization constructor is to deserialize data, while ISerializable.GetObjectData is to serialize data. You should read Serializing Objects[^] in the .NET Framework SDK for an overview and examples of serialization.
The easiest way to achieve what you want: don't implement ISerializable. Just attribute your class with the SerializableAttribute as you're currently doing. By default, any private or public members of a class are serialized for types that are serializable. If you implement ISerializable just pass the array to the SerializationInfo.AddValue method:
Hi I am using asp.net and c# to create a web application and I am having trouble deleting records from my sql server database table if anyone has any ideas please help thanks in advance
[code]DataTable concerts = concertDataSet1.Tables["Concert"];
foreach(DataRow myRow in concerts.Rows)
if(ConcertsListBox.SelectedItem.ToString() == myRow.ToString())
//*** put the new DataRow in the DataTable
//*** update the database table using the dataset
I'm building an application partly in C# (which I am learning currently) and the other part in C++.
What I want to do is pass a string or array of char's form my C++ dll to my C# exe. I seem to be able to pass basic data types, but when it comes to pointers or Strings or anything else, it either doest work, or my heap gets messed up or overwritten.
temp ends up being correct weather it’s a String or StringBuiler, but then my heap for my c++ dll gets jacked. I get an int 3 (user defined break) right away upon returning that function;
I also tried just using a char* in my C# project and assigning upon return from the dll function call but that didn’t work at all, the value ended up being all message. The problem is, one project thinks is some datatype and the other thinks its something else, so it never works. Is there some sort of unified data type for strings or pointers to strings that I can use here?
What my problem was was, i was trying to use the string inside the c# project as a pointer to point to the stuff in the dll, but what i needed to do was pass a pointer to memory inside the exe to the dll and have it assign stuff there. No pointers in C# is kinda awkward for me as a (7+ years C++ coder)
I'm so sorry because this is probably one of the most stupid questions I ever asked, but hey, I once was a VB programmer and now started C#, you should be happy hearing that
Now what's happening, I'm creating a databound control in C# which uses an Sql connection in order to fetch it's data. To establish the connection we need a connection string, and so I check for the existance of if. When the connectionstring property was not set, I want to throw an exception telling the user that the connectionstring was not set.
throw new SqlException("Connectionstring not set");
Now when compiling I get the warning
No overload for method 'SqlException' takes '1' arguments
I cannot find what's really meant here, and how to solve it... Any ideas?
It means that the SqlException class provides no constructor that takes 1 argument, in your case the error message.
Taking a quick look at MSDN shows that the SqlException class provides no constructor at all, so you'll have to throw some other exception. Unless, someone knows a workaround.
nikneem2005 wrote: I cannot find what's really meant here
Sorry to state the obvious, but what is really meant is what it really says. The "Method" you are calling is actually a constructor (similar in signiture to a method). As the error states, there is no constructor which takes one parameter (argument).
You can confirm this by opening object browser in VS, navigating to system.data.sqlclient.SqlException - it has NO public constructors at all. The most likely reason for this is that SqlException was not intended to be used by client code. A quick look with .NET reflector confirms there is a serialization constructor on this object only.
Now, to answer your question, create your own exception, inheriting from System.ApplicationException, and throw this instead. Something like "ConfigurationException" would be relevant in this case and could be reused anytime where the app is not configured correctly.
I have one function called getXmlData() in the dll, which reads xml file.
http://localhost/triqweb/config/config.xml. But when I try to access getXmlData function, IE throws up a security error ?? What permission should I need to set to access the xml file. Please help.
I have a doubt regarding using connection pooling in my Windows.net application. Our application has around 30+ simultaneous users connecting to the database(Oracle), but the application is running on individual machines using the that machine resource. Any connection requests are made to the Database from the individual systems.If I pool the connection, is there any performance advantage?
i had one class derived from ServicedComponent,let say ClassA, to return registry key values reside at the server machine. ClassA compile as dll and place in server machine, regsvcs and gacutil done in server.
then i got one client app project, which add reference to the ClassA.dll and call the ClassA's method to get the settings value. But the settings value that i get is not from the server (let say my client also got same settings key which value is different from server).
my question is why the ClassA object that created, although is transparent_proxy, is not at the server side process instead it is client side process? and how to make the ClassA as a server process object?
I need validate the username and the password on the local machine. When I run my application a login screen pops up user enters the Username password. If these credentails are valid for the system I should the user to continue.
Disable Integrated windows authentication...
Disable Anonymous access .. these setting should be done for the virtual directory. In addition to the above modify authorization section in the web.config file have the following element
<deny users="?" />
Create WindowsPrincipal object by using Thread.CurrentPrincipal
From WindowsPrincipal get the WindowsIdentity object
WindowsIdentity have the IsAuthenticated method which say whether the user has authenticated (authentication done twice)
You will get several properties/ methods in windowsindentity object for accessing the user's credentials like username etc.,
Last Visit: 31-Dec-99 19:00 Last Update: 26-Jan-23 16:42