I have a strange problem and I can't realize what's going on.I have a UserControl that's inherited from another UserControl.Every time I want to open its designer,a clear surface is shown (actually its base class designer is showing) I have tried cleaning and rebuilding the project,reopening the VS and even I shut down my computer but the problem still exists.
Please help me if you know what's going on
Thank you for your help
modified on Wednesday, January 02, 2008 12:10:04 AM
Does anyone has any experience working with the System.ComponentModel.LicenseProviderAttribute framework?
More specifically, I am in the process of reviewing our licensing model, and came across this framework. Does anyone has any experience with this?
We are looking for the ability to keep track of flags and number of uses of certain features.
We would also like to allow our users to generate their own license keys, so some kind of web interface would be needed....
I'm looking into these options:
1. Writing our own custom framework
2. Using the LicenseProviderAttribute framework (if it will be feasible)
3. DeployLX (by XHEO)
4. Any idea you might have...
i need some articles or hints about getting all the text in a word document using csharp, the text to get includes the text in all kinds of shapes, header footer, controls and all the complications of the word document
I don't know if it helps or not but in MS Word 2003 you can get the content of a word document as a xml document.
you can do it using doc.Content.get_Xml();
doc is a DocumentClass.
Later you can set the xml to another doc.
It seems that you want to get the value of some fields/properties of an object that is contained in a container object (an ArrayList for example)
If I'm right you can do it using one of the following methods:
1.whenever you want to access a member of an item of an array list cast it to its type:
2.(.net 2.0 only)You can use generic container classes to define a type for you container object.This way all the member of the container class will be changed according to its type.For example when you write MyGenericList it returns an object of the type you have defined for it
List<myclass> myList=new List<myclass>(); //MyClass is deifned as the type of generic list.<br />
myList.MyProperty=some value;//no casting is needed<br />
in order to use a generic collection you should use System.Collection.Generics namespace
If you want to have some global variables that you can access from all of your forms you can implement them as static variables.
If you want to pass some info from some form to another here is my suggestion:
Have a constructor that accepts the variables as its arguments or you can have some properties for your form and pass the variables using them.Here's a better way that I suggest .Implement a context object that has the variables that you'd like to pass in it.then you can pass the context object between you form using one of the ways I mentioned.
I am using print preview control on a windows form and use a print document to print. I check for the installed printers in the network and by selecting the printer, i set the printername and print the document. Bu this works fine if the printer is installed in the same system where the application is installed. When the printer is on another system i get a blank page after printing. I dont know how the print document become empty at this time.
I m facing problem in writing contents of BLOB field from database
I used BinaryWriter for writing to the file. it works fine but when I
open the file in append mode and try to append the contents it do not works.
I'm afraid that appending information to a word document is not that easy to just open the file and append the contents to it.I think that you should use MS Word COM dlls to do such things.Using an Interop to MS Word dll you can almost do anything that you can do with word to a Doc file.For example you can save your information as a file and then insert it to the word document.
There most be a lot of articles about working MS Word using C# on the Net.
I'm using Npgsql to connect to postgresql in my dot net app. I create a new connection every time I need to perform a database operation. I store the username and password and if the user goes to another windows form, I pass the username and password to the constructor and then create another connection. This seems wrong to me. Is there a better way to do this?
Here's my suggestion
Have a DataHelper(or DataManager) class that is responsible to do DB management and other stuffs (like opening connections) make it singleton.
It can have a OpenConnection method that opens a new connection and returns it every time you want an open connection.For example
using(SqlDBConnection cnn=DataManager.Instance.OpenConnection())<br />
//do something with connection.<br />
}//Since SqlDBConnection is IDisposable it will dispose automatically<br />
It doesn't seem to bad to me. This is (in effect) the way that you would be working with the connections if you were working in a technology like ASP.NET. If the connection is pulled from the Connection Pool then you shouldn't have too many problems.
Deja View - the feeling that you've seen this post before.
I'm using visual C# 2005 to develop software, and I was wondering if certain drag commands could be used to drag a picture box from one window to another and the picture in the picture box onto the other window.
If you need it describing in more detail, then I will.
If this is possible, could someone tell me how to do it?
I've written a c# application that uses Access 2003 as the backend database. Does anyone know of any potential complications I should be aware of if the the databasse is upgraded to Access 2007? I personally don't think there should be any issues, but wanted to poll the audience to see if anyone's tried it and ran into problems. Thanks!