|
Hi,
Is there any way to share an assembly between 2 applications with out using GAC
Thanks & Regards
Sabarish
|
|
|
|
|
Sure, if put them all in one directory.
|
|
|
|
|
What i mean is that i need to put all my class libraries in a folder for ex:- c:\Libraries and my executables that use these class libraries in a folder For ex:- d:\Executables.... Is this possible
|
|
|
|
|
Hi all,
i know i am asking a lot today and some of my questions are stupid as i realized later.
any way this question is about progress bar
i want to change that color that display the block inside the progress bar.
it is by default green.
i want to make it red when the value of the progressBar is for example 50.
any help?
|
|
|
|
|
Hello,
I think you should create youre one progress bar.
Like this article shows:
http://www.codeproject.com/cs/miscctrl/ColourProgressBar.asp[^]
quiteSmart wrote: i want to make it red when the value of the progressBar is for example 50.
Based on that example, you should only have to add one more Color (LimitColor) and one more int (LimitValue) property to do the trick.
In the OnPaint method of the ColorProgressBar class you then have to change the first lines from:
Color darkColor = ControlPaint.Dark(_BarColor);
Color bgColor = Color.White;
To:
Color ActColor=_BarColor;
if(_Value>LimitColor)
{
ActColor = LimitColor;
}
Color darkColor = ControlPaint.Dark(ActColor);
Color bgColor = Color.White;
Hope to help you!
All the best,
Martin
|
|
|
|
|
How to convert a decimal type object to an integer type object.
thanks,
|
|
|
|
|
(int)yourdecimal should do the trick
|
|
|
|
|
It is not working
it is saying "cannot implecitly convert type decimal to int. An explicit conversion exists"
|
|
|
|
|
have you tried Convert.ToInt32 ?
|
|
|
|
|
Thanks that worked
but i didn't know why (int)decimal is not working.
I thought it should work.
best regards
|
|
|
|
|
decimal d = 5;
int i = (int)d;
|
|
|
|
|
quiteSmart wrote: but i didn't know why (int)decimal is not working.
Without seeing the actual line of code you are using, watch your brackets. Especially if you are doing a calculation and then putting the result into an int. You might be casting one of the operands rather than the result (which might still be considered a decimal).
Or there might be another implicit cast going on that you are missing.
|
|
|
|
|
Convert.ToInt32(decimal)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
int i = (int)mydecimal;
Be aware that this will truncate (round down) so 1.9999 will become 1 not 2. Use Math.Round for actual rounding.
|
|
|
|
|
When one flash file is played in which one or two colors.
and then if a multi colored file is played some color are not coming properly.
ie when the first file is played, it sets some color pallets, due to which it happens.
how to resolve the issue.
Ravi
|
|
|
|
|
Hi,
I am facing a problem while accessing a C++ dll from C# code.
Following is my C++ structure I am using...
typedef struct
{
LONG lPaBitNr;
UCHAR szPaAbr[8];
} AudioUnit_T_DataType;
and corresponding structure I am using in Dot Net is:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct AudioUnit_T_DataType
{
public int paBitNr;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=8)]
public String paAbr;
}
and following is my declaration of the function of C++ dll.
[DllImport("MyLib.dll", EntryPoint = "MyFunc")]
public static extern int MyFunc(
[MarshalAs(UnmanagedType.AsAny)]
object key,
[MarshalAs(UnmanagedType.AsAny),In, Out]
object data,
int size
);
size is the respective size of the structure (no of bytes to copy in data object)
When I call the MyFunc function with object data as AudioUnit_T_DataType structure,, i got all the data but I always loose the last character (8th) in the String paAbr.
i.e. suppose, the value of szPaAbr[8] was "abcdefgh"
then, after the call of MyFunc function, i got "abcdefg" value.. 'h' is lost (might be it is replaced by null character...)
What should I do to overcome this issue.
I dont want to change the lenght of array from 8 to 9.
Any help is appreciable.
|
|
|
|
|
Even though I'm not at a PC with .NET installed, I can think of 2 possible solutions:
System.Runtime.InteropServices.Marshal.PtrToStringAnsi()
or
CharSet = CharSet.Unicode
|
|
|
|
|
thanks for the quick response.
But both the solutions will not work,, as on C++ side, we donot have null terminated string,, we have array of 8 characters. and on C# side, we want to get that in a string.
Also, the Unicode solution is not working.
|
|
|
|
|
I want to have DateTime in the "YYYY/MM/DD hh:mm:ss:ff" format. Also, it should be of type DateTime only, no string.
Thanks in advance
Praveen Raghuvanshi
Software Engineer
|
|
|
|
|
praveen raghuvanshi wrote: I want to have DateTime in the "YYYY/MM/DD hh:mm:ss:ff" format. Also, it should be of type DateTime only, no string.
OK - this is what you have got with DateTime already. The DateTime class is a wrapper around an internal representation of the date/time. The methods for displaying date and time are there for your convenience.
Yes, when you print it out it will be using the ToString() method, but this is just to cast it into a format for you to use/print out. It does not change the internal representation at all.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks............
There was a problem for MM(Month), MM(minutes). I rectified it.
Praveen Raghuvanshi
Software Engineer,
Wins Infotek Pvt. LTd.
Technopark, Trivandrum
India.
|
|
|
|
|
hi everybody,
i am new to c#.
can anybody tell me how to insert text then image again some text then image and so on in word file.
e.g.
some text
image
some text
image
some text
image
some text
image
thanks in advance
praveen
|
|
|
|
|
|
Insert into a MS word file like test.doc.
|
|
|
|
|
Hello,
You can use Ms word com object to do this...
Try to reach the diamond now
nishu
|
|
|
|