|
Well, in the normal way, the property can be edited in a textbox, right?
So, we can change its default UITypeEditor to a TextBox which PasswordChar is * or any char you like, by setting some attributes like EditorAttribute on the property you have.
Hope helps to you.
I'm amumu, and you?
|
|
|
|
|
Hello Everybody,
I am trying to import data from Excel sheets through my application.But its not reding the first row of Excel sheet.
Somebody suggested me to set "HDR=No" property in my connection string.
So now my connection string looks as follows,
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source="+fullPath+";" +
"Extended Properties=Excel 8.0;HDR=No;";
but its giving me following exception
"System.Data.OleDb.OleDbException : Could not find
installable ISAM
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32
hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
........"
To overcome this error i tried doing following things
I went to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
location in my windows registery and found following things,
Name Type Data
win32 REG_SZ c:\WINDOWS\System32\msexcl40.dll
then I checked if this "msexcl40.dll" really exist at the path c:\WINDOWS\System32
and it was present there.
Then i uninstalled office2000 from my machine and installed OfficeXP.
Still i am getting the same exception.
Can anybody help me in finding out where i am going wrong or what could be the problem?
Thanks in advance,
Regards,
Saroj
Saroj
|
|
|
|
|
There can be many reasons. Reinstalling Office may not be enough, especially when you know that what you are actually using here is the MDAC run-time which is separately available.
I would suggest to install MDAC 2.7[^]
Other than that, msexcl40.dll has two MDAC child dll dependencies : msjet40.dll, mswstr10.dll
How low can you go ? (MS rant)
|
|
|
|
|
Where can i download the visual soucesafe 6.0c?Thanks.
|
|
|
|
|
i think it only comes with Visual Studio.NET Enterprise Edition, it is the piece that does all the integration work between VS.NET and the VSS database
Soliant | email
"The 'B' in Visual Basic means Beginner" - R. Bischoff
|
|
|
|
|
Someone please tell me if this is supposed to work:
(because it compiles and all I'm getting is a runtime invalid cast exception)
Object obj = someAssembly.CreateInstance("MyClass");
MyAbstractClass x = (MyAbstractClass) obj;
x.doCoolStuff();
More importantly, I don't want to use Invoke() calls. Isn't there a cleaner work-around?
Bilal
|
|
|
|
|
What's the definition of MyClass and MyAbstractClass?
Also, have you tried this without using CreateInstance to see if that works?
Cheers,
Simon
"VB.NET ... the STD of choice", Me, interal company memo
|
|
|
|
|
MyClass is derived from MyAbstractClass (sorry, should have mentioned that) and implements parent's abstract functions.
What alternatives are there for creating objects at runtime from definitions available only in other .NET DLLs or EXEs?
I'm just a .NET newbie
Bilal
|
|
|
|
|
You might want to look at the Activator class.
Note that if you want to cast to an abstract class you own, the class will have to refer to the same abstract class (ie same assembly and same version)
|
|
|
|
|
As Eric allueded to, you've got to watch out when using objects from other assemblies. Unless you're using an interface or class type shared from the same .dll, you'll run into problems. In other words, the assembly creating the object and the assembly trying to downcast the object must both reference a separate assembly that describes the interface or class to which you are downcasting. (Does that make sense?)
John
|
|
|
|
|
It does and you two clinched it. Thanx guys!
Bilal
|
|
|
|
|
Can't imagine why this wouldn't work. Try this:
MyAbstractClass x = obj as MyAbstractClass; as is a lot more flexible than direct casting and if it can't cast then rather than throwing an exception it will set x to null , giving you some room to debug.
Paul
I think there're pieces of me you've never seen - Tori Amos, Tear in Your Hand
|
|
|
|
|
The following is more safer:
Object obj = someAssembly.CreateInstance("MyClass");<br />
if( obj is MyAbstractClass )<br />
{<br />
MyAbstractClass x = (MyAbstractClass) obj;
x.doCoolStuff();
}
and the precondition is you have added reference library, which has a definition of MyAbstractClass.
I'm amumu, and you?
|
|
|
|
|
I'm doing the MD5withRSA signature verification with C#.net.
Pls kindly tell me How can I have this job done?
I tested the following code, but can not work.
Thanks in advance.
FileStream fs = File.OpenRead(@"c:\pk"); //pk is the public key file.
RSAParameters RSAKeyInfo = new RSAParameters();
RSAKeyInfo.Exponent = new Byte[3]{1,0,1};
RSAKeyInfo.Modulus = new byte[fs.Length-5];
fs.Seek(5, System.IO.SeekOrigin.Begin);
fs.Read(RSAKeyInfo.Modulus, 0, (int)(fs.Length-5));
fs.Close();
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
RSA.ImportParameters(RSAKeyInfo);
RSAPKCS1SignatureDeformatter RSADeformatter = new RSAPKCS1SignatureDeformatter(RSA);
If RSA.VerifyData(bData, "MD5", bSig)
{
Console.WriteLine("Verification Ok!");
}
else
{
Console.WriteLine("Verification Failed!");
}
|
|
|
|
|
I have to make a CryptoCom, who:
* Use CAPICOM (Microsoft product)
* Crypting Algorithm: Tryple DES (3DES)
* NOT SINGNED TIME.
* Language: VB ó C#
How can I do???
Ps: The last one option is only a setting, but I don't know set this in my CryptoCOM.
Language: VB ó C#
|
|
|
|
|
|
Hi I have written an windows app with C# witch is supposed to syncronize 2 folders e.g
FROM: C:\Project\Project
TO: \\server\d$\my.project.com
I have made the entire source witch delete files/folders on TO and copy/create files if they don't exists.
My problem is when it tries to copy/delete files, I get permissions denied, I am running the program when I am logged in as administrator and I have administrations access on target machines.
I can open explorer and edit/delete the files witch it complains about.
What can I do to allow my app to copy/overwrite/delete files on the TO machine ?
Somehow as far as I can see, I can overwrite *.dll and *.pdb, but not *.aspx and *.cs
I have tried almost everything:
System.Security.Permissions.FileIOPermission
int token1;
WindowsIdentity mWI1 = WindowsIdentity.GetCurrent();
token1 = mWI1.Token.ToInt32();
IntPtr token2 = new IntPtr(token1);
ImpersonateLoggedOnUser(token2);
And many more, can it maybe be because the IIS is blocking those aspx files, in that case what can I do to overrule?
Because I have one similiar program with the name "InSync" with does overwrite the files when I run it with.
|
|
|
|
|
I'm attempting to retrieve an Active Directory attribute that is stored as as type OctetString. I want to convert this value to a string, but the Convert class doesn't seem to be able to do this. Can someone help?
|
|
|
|
|
Marc Merritt wrote:
is stored as as type OctetString
Hmmm, ok I had to do a little searching here but if you read MSDN's page on ADS_OCTET_STRING[^] you will see that it is a struct containing a byte array. To convert this you might want to look into the BitConverter.ToString(..) method as it may handle this. You may also need to refer to the Marshal class under System.Runtime.InteropServices . Hope this helps.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
.Net Bug:
Myself and 4 other developers using .Net (C#) in the development of new
software applications have the same problem with .Net. We are all working
on different products seperately and have all seen the same bug.
Bug:
The user develops user controls (UserControl) and stores them in a common project.
User adds this project to his main application project. User adds these
controls to his forms in his project. User goes a few weeks to months designing
his GUI. One day user opens his project to find controls and/or code
missing from his forms. The damn generated code just disappears along with
the controls on the form. This first happended to me 3 months ago and just
reappeared again.
I am one of these users. I use Source Safe, other people have used StarTeam
with the same results. Retrieving previously saved versions from SourceSafe
doesn't help because the .Net IDE has a mind of it's own and removes these
controls once again.
If anyone has any idea of what can be causing this or have experienced the
same, please let me know. This is my first post here so if this has been a
common topic before please excuse me.
Thanks,
TonyJ
|
|
|
|
|
Yes, that's known and easy to reproduce. To avoid it, read this[^].
How low can you go ? (MS rant)
|
|
|
|
|
.S.Rod.,
I am using fully qualified names for my controls. For example,
private [namespace name].ControlName m_Control
After I did this my code was actually stable for about 3
months and it just reappeared again last week. It reappeared
after the library failed to build. I fixed the library bug that
I introduced and now .Net has a mind of it's own. On my
simplest form I readded my controls, closed and saved them,
then reopened them to find the controls missing again.
.Net IDE even removed some event handling code.
|
|
|
|
|
Yes, I know. Make sure to use fully qualified using xxx; statement as well.
How low can you go ? (MS rant)
|
|
|
|
|
Hi,
I am using SDI window application in which I create multiple child windows.
I create child windows in this way
Form3 obj2 = new Form3();
obj2.TopLevel = false;
obj2.Parent = this;
obj2.Show();
But the child window's title bar always stays greyed out giving an impression that it is not in focus.
I do not want to go for MDI APP.
Could any one give any ideas on this
Thanks in Advance
Kiran
|
|
|
|
|
The only way I know of is to override WndProc and handle the various commands related to WM_ACTIVATE and WM_ACTIVATEAPP. If you haven't done it before, a search here and on Google might help you find someone who has implemented it in .NET. (I know there is one, I just can't remember where.)
John
|
|
|
|