|
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
|
|
|
|
|
Why is your login form an MDI Child? I haven't seen a single application where this is done, nor appropriate. A login form has always been a modal dialog box, preventing further access to the application until the required credentials are filled in.
If your main form opens in a seperate window, outside the MDI Parent, it sounds like your main child form didn't have its Parent property properly set to your MDI Parent form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for reply, the menu options of the application are disabled till the user successfully logs in, so the user doesnt have access to any feature of the application. The main form opens properly if the application doesnt lose focus i.e., if the user doesnt switch to any other window from the taskbar. Here is the code from the login page:
private void button1_Click(object sender, System.EventArgs e)
{
//rest of the code omitted
this.Close();
frmDoNext objfrmDoNext = new frmDoNext();
objfrmDoNext.MdiParent = frmMainForm.ActiveForm;
objfrmDoNext.Show();
}
frmDoNext is the main child form and frmMainForm is the parent form.
Thanks
|
|
|
|
|
One potential problem I see is that you're using .ActiveForm to set the parent of the child form. Don't. Use a known reference, that you're sure is the correct form, to set the parent. Since child forms can't have child forms of their own, there's no reason to use .ActiveForm to set the parent of a child.
frmDoNext objfrmDoNext = new frmDoNext();
objfrmDoNext.MdiParent = this;
objfrmDoNext.MdiParent = this.MdiParent;
objfrmDoNext.Show();
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks a lot Dave. Problem's solved!!!
|
|
|
|
|
I'm going to develop an application whcih send sms to their clients on the bassis of changes in Stock Exchange Rates after regular intervals. I also want to know about free web serives for sending sms.
Din
|
|
|
|
|
Hi all,
Ineed your help translating this bit of code having no idea how to translate the "Handles" statement.
Any help will be appreciated
---------
Private Sub Application_SelectionChanged(ByVal Window As Office.Interop.Visio.Window) Handles visioApplication.SelectionChanged
Dim mywindow As Office.Interop.Visio.Window = Window
NumOfShapes = mywindow.Selection.Count()
MyShape = mywindow.Selection(1)
ReadANamedCustomProperty(MyShape, "HoursPerWeek", )
End Sub
|
|
|
|
|
I *think* (from very limited VB experience) the Handles statement implies that the Application_SelectionChanged method will get called when the visioApplication.SelectionChanged event is fired.
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|
|
My thoughts exactly but how can I hook this event from my application (COM Add-in) in the same way that the "Handles" statement does it?
thanx anyhow
|
|
|
|
|
Having no experience whatsoever with a COM add-in, if I had to have a guess it would probably be the same as hooking up a normal event with C#:
visioApplication.SelectionChanged += new EventHandler(Application_SelectionChanged);<br />
<br />
private void Application_SelectionChanged(Office.Interop.Visio.Window window)<br />
{<br />
NumOfShapes = window.Selection.Count;<br />
MyShape = mywindow.Selection[1];<br />
ReadANamedCustomProperty(MyShape, "HoursPerWeek");<br />
}
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|
|
thanx, you're the man.
almost exactly what I needed
Roy
|
|
|
|
|
i designed a program to generate a dataset and pull into a ReportDocument, then i set the ReportSource of CrystalReportViewer to this ReportDocument, then i created the installer and installed in my computer, it works perfectly on my computer becoz my computer has .Net framework 1.1 and Crystal Report Enterprise v10 installed.
then i install my program on user's computer which has only has .Net framework 1.1 installed, there is a error occur when loading the crystal report, plz click the following link to view the screen shot
http://img.photobucket.com/albums/v608/mjay83/Error.jpg[^]
i had check the coding, this error occured when the dataset is being pull into the ReportDocument, wat could cause this problem??all the DLL inside user program files folder is exactly the same with mine one! it is impossible to install Crystal Report Enterprise v10 in all user's computer!!
|
|
|
|
|
|
In the code below I created a class(Listings) to hold three stings.
I Also have a ArrayList of the class.
I can add items, can see the data in the watch window and I can use a foreach and see all elements of the arraylist, but I cant figure out how to read the data in the first element of the arraylist.
Thanks for your help.
Mitchell
public class TestArrayList
{
public TestArrayList()
{}
private ArrayList arrListings = new ArrayList();
public void ClearList()
{
arrListings.Clear();
}
public void AddListing(string Name, string Address, string Phone)
{
arrListings.Add(new Listings(Name,Address,Phone));
}
public string getFirstListing()
{
return "?"; //What here to return Name for First item in ArrLst?
}
public class Listings
{
private string x_name;
private string x_address;
private string x_phone;
public Listings()
{}
public Listings(string Name, string Address, string Phone)
{
x_name=Name;
x_address=Address;
x_phone=Phone;
}
public string Name
{
get {return x_name;}
set {x_name = value;}
}
public string Address
{
get {return x_address;}
set {x_address = value;}
}
public string Phone
{
get {return x_phone;}
set {x_phone = value;}
}
}//end listings structure
}
}
|
|
|
|
|
You can use the ArrayLists Item property (see MSDN[^])
public string getFirstListing()<br />
{<br />
if (arrListings.Count == 0)<br />
{<br />
return null;<br />
}<br />
<br />
Listings list = (Listings) arrListings[0];<br />
return list.Name;<br />
<br />
return ((Listings) arrListings[0]).Name;<br />
}
"I think I speak on behalf of everyone here when I say huh?" - Buffy
|
|
|
|