|
Hi,
I have create a deployment project in Visual Studio 2005. How do I set icon that displays in the Add/Remove program for my application?
Thanks
|
|
|
|
|
Select your Deployment Project > properties > AddRemoveProgramsIcon "the first item in the list"
Then browse for your icon "should be imported first"
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
i made 3 form . form1,form2,form3.
form2 is mdiContainer . when i open the form1 and form3 from form2..........
it opens , i want that when i click to open a new form it should check that wheather any form is opened
or not. if a form is already opened ,new form should not been opened.....
Maifs
|
|
|
|
|
If you want one and only one instance of a class then you need to hide the constructor and use a static method or property to return the single instance:
class foo
{
private static foo bar;
private foo()
{
}
public static foo barHandle()
{
if (bar == null)
{
bar = new foo();
}
return bar;
}
}
cake, piece of.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
If form1 and form3 are child forms, you can iterate through form2's MdiChildren to check before opening.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi friends,
How can we do off/disable/suspend to the undo of the system
So that action and data would not go to undo stack.
e.i
If undo is off and user write some text in a notepad or delete any file.
Than user could not do undo,since it is not in undo stack.
Any type of help will be appreciated.
Thanks in advance.
Regards,
Khaleek Ahmad
|
|
|
|
|
how to change system time using c# code.please help
|
|
|
|
|
|
Hi all,
i have athe following Crc16 method. I want to use it in my C# application but am not sure how to go about it. Can anyone please put some light on this issue.
short int crc16(char *pBuf, short int Len, short int InitialCrc){
short unsigned int crc=0, i=0;
crc = 0;
for (i = 0; i < Len; i++ ) {
crc = (crc >> 8) | (crc << 8);
crc = crc ^ *pBuf;
crc = crc ^ ((crc & 0xff) >> 4);
crc = crc ^ (crc << 12);
crc = crc ^ ((crc & 0xff) << 5);
pBuf++;
}
return(crc);
}
Many thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
First you have to decide how you want to handle the characters. A character in C++ is 8 bits, while a character in C# is 16 bits.
After that, the translation is pretty straight forward.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Programm3r wrote: The other problem is how can I convert string to char*
string foo = "Hello World";
fixed (char* fp = foo)
{
var i = crc16(fp, (ushort) foo.Length, 0);
}
|
|
|
|
|
|
Programm3r wrote: Would you say that the Crc method look good after my C# interpretation?
I am not sure that it is correct, as the result (which should fit in a 16 bit number) overflowed. I have modified it slighty, best would be to test the output with the output of the native function.
static unsafe ushort crc16(char* pBuf, int Len, ushort InitialCrc)
{
ushort crc = InitialCrc;
for (int i = 0; i < Len; i++)
{
crc = (ushort)((crc >> 8) | (crc << 8));
crc = (ushort)(crc ^ *pBuf);
crc = (ushort)(crc ^ ((crc & 0xff) >> 4));
crc = (ushort)(crc ^ (crc << 12));
crc = (ushort)(crc ^ ((crc & 0xff) << 5));
pBuf++;
}
return crc;
}
|
|
|
|
|
leppie, thank you very much. It looks perfect according to my previous results done in C++ ... five from me :
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
You have changed the type from ushort to uint, I'm not sure that works properly.
Do you really want to use unsafe code and pointers? Why not just use a string?
The InitialCrc value isn't used in the method at all, so you should remove it.
ushort crc16(string buffer) {
ushort crc = 0;
foreach (char c in buffer) {
crc = (crc >> 8) | (crc << 8);
crc ^= (ushort)c;
crc ^= (crc & 0xff) >> 4;
crc ^= crc << 12;
crc ^= (crc & 0xff) << 5;
}
return crc;
}
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
kindly let me know that, how may I correct the following problem?
* this connection string works good :
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\BT.XLS;Extended Properties=""Excel 8.0;HDR=YES;""";
* but this does not work by using textBox1.text :
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ textBox1.Text +";Extended Properties=""Excel 8.0;HDR=YES;""";
error is : "; expected"
Thank you in advance
(Riaz)
|
|
|
|
|
Did you try debugging to see what is the actual value of ConnectionString after assignment?
|
|
|
|
|
He can't debug it as it doesn't compile.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Oh, I see. I thought he was getting error when he was trying to open excel workbook.
|
|
|
|
|
|
You have forgotten the @ before the second literal string.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
kindly fix the problem of my mentioned connection string that where should be place @
|
|
|
|
|
You don't understand your own code?
You have a @ delimited string which you have split into two strings, but you have forgitten to put the @ delimiter before the second string.
Example:
string s = @"A ""string"" with some ""quotes"".";
Split into two strings:
string s = @"A ""string"" with " + @"some ""quotes"".";
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|