|
This approach was obviously flawed from day one. You need to read your word docs to search them, your database is an extra overhead, and not the tool it should be. You need to store keywords with your word doc if you want efficient searching.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I set the TypeConverter attribute of a class named MyFilter to typeof MyFilterConverter derived from TypeConverter.
[TypeConverter(typeof(MyFilterConverter))]
public class MyFilter
{
}
public class MyFilterConverter : TypeConverter
{
}
My executing assembly gets access to it by dynamically loading an assembly containing these 2 classes.
Eveything works fine as long as the executing and the dynamically loaded assembly are in the same directory. If this is not true the TypeConverter attribute will be ignored - easily proved by setting MyFilter as selected object in a property grid.
string fp = FILEPATH_FOR_DynamicLoad;
Assembly assembly = Assembly.LoadFrom(fp);
I would really appreciate if someone could help me out.
Robert
|
|
|
|
|
I have seen something similar happen in the past with attributes disappearing, but I cant recall the details now. And no, I never did find a solution
Maybe a security issue?
|
|
|
|
|
Hello leppie!
Doesn't really comfort me
Anyway, thank you for replying.
Robert
|
|
|
|
|
hello,
does anyone know a way to access all the Forms that are available in an application at design-time in Visual Studio? I need to get access even to Forms that are currently not opened in Visual Studio, getting the class names of these forms would be enough, then I could instantiate them by myself.
Thank you
|
|
|
|
|
Have you tried to click on a project, then go to the project menu at top of screen and select Show all files. This will display all files currently inside that project, even those that have not yet been added to visual studio.
He who laughs last is a bit on the slow side
|
|
|
|
|
thanks for the help....but I want to get all the forms programmatically at design-time...I need this for a custom control I develop.
|
|
|
|
|
Hi all,
iam developing a project in C#.net 2.0.
Here i need to connect to the HP9000 database and open two connections one after the other. Till here i have done it well. After opening two seperate connections in two seperate windows i should be able work independently. But by the time i open the second connection it is closing the first one and returning the results of program run using second connection.
I need to use asynchronous programming here............
Can any one help me out................
pranu
|
|
|
|
|
I wonder if BackgroundWorkerProcess is what you need ?
|
|
|
|
|
Anyone know if it is possible to have multiple bootstrappers on one installer, currently I have one for the .net framework to check if installed, if not it must be installed fisrt, now I want to add one for the msde, any ideas??
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
I have created a class library and want to pass value into a unction that is inside the class library.its public and static type. i want to pass the value from the main windows application i created after this class library.
|
|
|
|
|
Namespace.Class.function(type value);
He who laughs last is a bit on the slow side
|
|
|
|
|
is there concept of handles in C#, if yes can u please tell me links of articles on handles or can u atleast give me an idea of how it works.
thanks
----------------------------------------------------------------
where there is a will there is a way
|
|
|
|
|
There are handles in the Windows.Forms namespace but they are used primarily for COM/Interop where they have to communicate with Win32 APIs etc.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
How I will convert the 20 to 0010 0000 format and I want retrieve the third bit (in this case 1)
from 0010 0000
|
|
|
|
|
I use this to retrieve a bit:
public bool GetBit(int bitOrder)
{
return Convert.ToBoolean(errorNumber & (0x1 << bitOrder));
}
|
|
|
|
|
What is errorNumber and bitOrder
|
|
|
|
|
Ooo.. sorry, I didn't change the variable name of my code.
int number = 20;
int bitOrder = 2;
bool bit = Convert.ToBoolean(number & (0x1 << bitOrder));
// 00010100 -> Bit 2 is true, bit 3 is false
// 76543210
Console.WriteLine(bit.ToString());
|
|
|
|
|
That's a nice code. By using that u can make ur own function
Like...
public bool GetBit(int No,int bitPos)
{
return Convert.ToBoolean(No & (0x1 << bitPos));
}
But be carefull (MSB->LSB) BitPos = 0 = LSB
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
I wanted to draw the lines with higher precision for one of my project. So instead of using point structure, I thought to make a use of pointF strucuture. I made one sample application to test how precision differs in case I use pointF strucutre then point. Following is the sample code which i written to draw a lines on my form :
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
e.Graphics.DrawLine(new Pen(System.Drawing.Color.Red),new PointF(20.0F, 100.0F), new PointF(100.0F, 100.0F));
e.Graphics.DrawLine(new Pen(System.Drawing.Color.Green),new PointF(20.0F, 100.51F), new PointF(40.0F, 100.51F));
}
As per above code, I tried to draw 2 lines with very minimal difference in y co ordinates. I was shocked to find out that pointF rounds the co ordinate value while drawing the line. As per above example, if I keep Y co ordinates for 2nd line between 100.00 to 100.50, I can see only one line drawn as lines are drawn with the same co ordinates. But if I keep the Y co ordinates for 2nd line even 100.51 then I can see two seperates lines. This means pointF strucutre rounded the y co ordinate value to 101 and that is why i could see two different line. I tried to check the things by increasing and decreasing the resolution of my screen but it didn't help. If such is the behaviour then there is no difference between the point and pointf and we can not get the better precision then 1 pixel while plotting a drawing.
Can any one pls explain me above behaviour? I want to draw the lines with higher resolution so can anyone give me the idea of how to achieve it? I hope I'm clear with my question and expectation?
|
|
|
|
|
It is impossible to get higher resolution than 1 pixel. That's the smallest point the hardware can draw, regardless of what the software asks for. The impact of rounding will vary (appear to take effect) differently on screens with a different pixel density (dpi), but pixel density can't be changed without changing the hardware.
|
|
|
|
|
Graham,
Thanks for your reply.
Rob Graham wrote: It is impossible to get higher resolution than 1 pixel
If we can not get resolution higher than 1 pixel then what is the need of having two seperates structures i.e. point and pointF. Merely passing the values in float doesn't make sense if internally it is going to get rounded off.
|
|
|
|
|
If you for an example use a transform that scales the graphics by 1000%, you can make use of the higher precision. The rounding will take place after the scaling but before the actual drawing, so if you specify a rectangle with the size 0.53 x 0.78, it will draw a rectangle with the size 5 x 8 pixels.
Have you tried to change the InterpolationMode and SmoothingMode of the Graphics object? That might change how the coordinates are rounded.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your reply Guffa.
I see a ray of hope from your reply. I have not worked extensively on GDI. So I'm not getting exactly what you are trying to say. Can you elaborate on your reply or send me some links or material which I can refer?
|
|
|
|
|
KrunalC wrote: So I'm not getting exactly what you are trying to say.
What about it didn't you get?
---
b { font-weight: normal; }
|
|
|
|