|
Thanks for the reply!
I have attached a zip with a sample project which (I think) illustrates my problem.
If you have some time to spare, could you take a look at it?
Thanks and sorry for my pretty rookie problems...
http://www.djnokturnal.com/downloads/TextBoxes.zip[^]
|
|
|
|
|
Hello dear all
i have very big problem
i have a exe that exe will generate from C# windows application i want to use these exe method to another project of C# windows application
when i want to use this exe method from "Add reference" then it will give on error Message that is
"Converting the type library to .NEt Assembly failed type library was export from a CLR assembly and can not be re-imported as a CLR Assembly"
but i have used this type library in VB6.0 project
so how we can use this type library in .NET project Application
Please Help ME
|
|
|
|
|
The only way to think is to make that exe dll as you will move your code to a control library project and add a reference to it from your exe and in youe exe make an instance of the class that is in the dll ,,so..
as this you can use it in any number of exe ,by just instantiating this class that you want to be in the exe ,from the dll.
|
|
|
|
|
thanks for reply
but i am not getting your point basically you wnat to say that we create exe as Dll but my question is how we can use exe as Dll please give the sussion how we can use exe as a dll in other C# project
|
|
|
|
|
You can go into the Project --> Properties of the application that you want to use as a reference and change the type to Class Library (from Windows Application). This will cause a dll to be generated from the Build process. You can then include this in your other projects......
|
|
|
|
|
yeah ,do as he said and then youe exe code will be in the dll as (for example-MyForm-) then you can create another new windows application and add your dll as a reference to it from the solution explorer and then,
in this new windows apllication do :
MyForm form1 = new MyForm();<br />
form1.Show();<br />
Application.Run(new MyForm());
and you can do this in any other windows application ,Hope this helps .
|
|
|
|
|
Ok.. here's my problem.. I need to send allot of data from my client to the server and viceversa..
My aproach is to use xml tags in a way that the data set can understand and load..
I worked for a while.. but whenever I get a transmision I need to save the data and load the dataset from the file..
The problem is that the datagrid closes down and I can't do anything more ...
My question :
1.Is there a way of sending files ( .xml, .rar, .exe, etc..) over the network using Sockets or TcpClients?
2. What's the best way to manage huge amounts of data ?
3. How to get the dataset not to crash ?
If the answer should contain a project it would be much aprecieted ...
Lazar Mihai
Highschool student
|
|
|
|
|
Hi Lazar, when you are sending large amounts of data over a network, your best bet is to use the most compact form available, xml would be a good choice for a smaller load, but if there is truely a lot of data, then you might consider sending it in binary form and yes, you can and probably should use .NET sockets. These are pretty easy to use with a little practice but might give you a little frustration at first. Don't give up on them though because they are the very best way to move large pieces of data across the network. For #2, I would probably spool the data into and out of an xml DataTable so the grid can see them directly. Look at the DataTable object in .NET! Create one and play around with the Grid connected to it, it's pretty easy once you get the hang of it. As far as #3 is concerned, not enough detail for me to say, sorry, but I will say it is most likely not a bug in the grid as I've used it extensively for some time without problems unless I was doing something wrong.
Good luck on your project.
|
|
|
|
|
I know how to use the sockets and I know how to use a datagrid and datatables ... I'm going to try the binary sending .. and see what happens.. as for the datagrid the reason it's crashing is that I save the xml data into a file that I read it whith the dataset's ReadXml(..) method and it has to load the entire dataTable at once ...
My best quess for the crashing is that .. there can't be any other explanasion more plausable..
Thanks.. if you have any other suggestion fell free to send them ...
P.S : I'm using TcpClient and a network class made by me.. which has some events that tell me when I recieve a message or when I'm cur off from the server !
Lazar Mihai
Highschool student
|
|
|
|
|
How would I go about creating an add-in for vs.net that adds to the context menus of server explorer?
E.G. An new option when you right click on a table in a mssql db in the server explorer.
Any suggestions / useful links?
|
|
|
|
|
Hi everyone! As I'm new here I'd like to say hello!
I have this problem - I created a control, and added properties there. When I use the DefaultValue attribute everything goes nice and smooth when I provide strings, int null, enums and so on. But when I want to give a default color:
<br />
[Category("Appearance"), DefaultValue(Color.Black)]<br />
the compiler says: An attribute argument must be a constant expression, typeof expression or array creation expression. But there are default colors for standard controls. What should I do with it?
Another thing: when I write:
<br />
public static const string STH = "Something";<br />
I got an error.
Pls help me with those!
|
|
|
|
|
The static modifier is not allowed in a constant declaration and also not needed, cause constants automatically belong to the type where they are declared.
www.troschuetz.de
|
|
|
|
|
For the first problem, use DefaultValueAttributes overloaded constructor as follows.
[DefaultValue(typeof(Color),"Black")]
For the second one, you can declare a variable as static and const both. it should be either static or const.
You can use public static readonly string STH = "Something"; instead
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Hello,
I am developing an application for a stock control system. I am using a datagrid and the customer wants a combo box in one of the columns, to make selection easier.
I my database l have 2 tables, customer and parts. Relationship a customer can order many parts. So the grid will display all the different parts. and the user will click on the customer column and select the customer who wants this part.
example. PartID, Name, price, quantity, customer are the column headers in the datagrid.
Thanks very much for your help in advance,
Steve
|
|
|
|
|
That is quite not easy just inherit from DataGridColumnStyle and just make on it combobox and make it's bounds as this control and override all these methods: Commet(),Edit(),Abort().
|
|
|
|
|
Brief: Iam working on an enhancement for our product. This requires integration with Document Management System. The DMS(Document Managemen System) works on Citrix environment, which has Server and Client components, which our product needs to use for communication between citrix server(where our application is published) and client (where we run our application from, using seamless citrix connection).
We are supposed to encryt some data on the citrix server and pass it to citrix client, for which we have developed an encryption component. This component uses RSACrytoServiceProvider's encryption using certificates.
The following is the code for encryption:
//Convert the data that we wish to encrypt into a byte array
byte bytDataToEncrypt[] = ASCIIEncoding.ASCII.GetBytes(strDataToEncrypt);
// Get the RSA parameters from the certificate - since this we
// are encrypting using the public keys in the certificate
// we pass the false parameter so that the private keys are not exported
RSAParameters objPublicKey = bjCertificate.PublicKey.ExportParameters(false);
// create the crypto service to use for the encryption
RSACryptoServiceProvider objRSA = new RSACryptoServiceProvider();
// Use the previously obtained RSA parameters
objRSA.ImportParameters (objPublicKey); (where objPublicKey is the encrypting certificate object)
// perform the encryption
byte bytEncryptedData [] = objRSA.Encrypt(bytDataToEncrypt, false);
//If Encrypted Data is not null
string strEncryptedData;
if(bytEncryptedData != null)
//Convert the encrypted byte data to hex
strEncryptedData = ConvertByteToHex(bytEncryptedData);
else
strEncryptedData = string.Empty;
return strEncryptedData;
The Encryption component successfully finds the encryption certificate. But while creating a RSACryptoServiceProvider object I get the following error.
"Crypto API cryptographic service provider (CSP) for this implementation could not be acquired".
After finding an article for the above error in web, I have made the following changes in the above code as follows:
// Create the crypto service to use for the encryption
CspParameters CSPParam = new CspParameters();
CSPParam.Flags = CspProviderFlags.UseMachineKeyStore;
objRSA = new RSACryptoServiceProvider(CSPParam);
Also gave “Full Control” permissions to the following path for “ANONYMOUS LOGON” user on Citrix server machine:
“C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys”
I then got the following error:
“Access Denied”
Later I gave “full control” permissions to “EVERYONE” user, to the above path.
Then the encryption part worked fine. But when this encrypted data is passed from the Citrix server by the DMS server component to Citrix client. the DMS client component on Citrix client is not able to decrypt the data. It gives the following error:
"Error decrypting: The total input data is not a multiple of block size. The block size is: 128"
I guess that there might be some problem with access rights for “ANONYMOUS LOGON” user or usage of CspParameters. I also tried to know more about the error by using the File and Registry Monitoring tools available at www.sysinternals.com. But I am not able to find out where the exact problem lies.
Please HELP !
Thanx in advance
|
|
|
|
|
hi,
i want to add checkboxes to combobox what shoud i do?
thanks
|
|
|
|
|
inherit from combobox and in it's listbox add control of checkbox kind.
|
|
|
|
|
Can Any one Help me Abt Dynamic(Runtime) Dll, how to implement it in C#.Net. When ever i am compiling my project all the dll should not be compiled. It means that a particular dll has to be loaded when ever i had called, else it should not.
Shashidhar.
|
|
|
|
|
Sorry I'm not completely understanding, do you want to compile the dll conditionally, only when you want, or do you mean that the application should only load the DLL when it is needed (which is the decault behavior in .NET anyway) ?
|
|
|
|
|
My requirement is to have multiple .Net dlls, which has similar functionalities exposed (so that I can expose functions of same signature). One of these dlls should be loaded at runtime based on user's selection of dll file name. In effect I need to support my application in such a way that, even after initial deployment, I will be able to deploy additional dlls (additional dlls alone will be separately deployed), which user can select at runtime.
Shashidhar
|
|
|
|
|
Is any way i can get a refference to a allready running Excel/Word application from c# and use that ref to work on the open document ?
|
|
|
|
|
I want to disable some on the context menu buttons when the user selects soem specific tree node.How to disable or hide context menu buttons.Any help will b appreciated
|
|
|
|
|
Subscribe to the Popup event of the context menu. There, you can selectively enable/disable menu items based on the currently selected TreeNode.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I have a MDI application where there is a login mdi child form from which the main form(another mdi child) opens up if the login is successful. The main form has some functions which take time, in the meanwhile when the main form is opening if the user switches over to another window from the taskbar(i.e., my application loses focus), the main form opens in a separate window outside the MDI parent form and prevents the user from navigating to any window in the taskbar and the main remains on top of all other windows in the taskbar. If the application is in focus then it opens inside the MDI parent form.
Thanks
|
|
|
|