|
Did you read the links I gave you? They discuss localization in great length. First, if you are authoring the original forms in Spanish and it is in that locale that all your code is contained, then use the NeutralResourcesLanguageAttribute and specify the appropriate culture. Second, try going back to the "default" culture (actually the neutral culture) in your form designer and compile again. VS.NET might thing that you're trying to compile the English satellite assembly as the primary assembly.
Second, show hidden files in your project. Look at the ResX files. If you use VS.NET's designers, these will be hidden under forms. If your form source file is named MyForm.cs, then you should have a MyForm.resx (the neutral language) and MyForm.en.resx or MyForm.en-US.resx.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I don't understand the "readOnly" parameter to PerformanceCounter constructor:
public PerformanceCounter(
string categoryName,
string counterName,
bool readOnly //QUESTION: If it's only readOnly, what's the use of the counter if you cannot update/increment it??
);
Thanks!
|
|
|
|
|
CillyMe wrote:
what's the use of the counter if you cannot update/increment it??
If u just wanna read it....
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
for(int i=0; i< ; i++)
{
leppie.Delete( );
}
|
|
|
|
|
U certainly cant modify counters like CPU usage etc....
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I want to copy data from one excel workbook to another. I have a range named 'MyRange' in workbook 1 on sheet 1. I want to copy this range to sheet 1 in workbook 2. More: I want to paste values and formats instead of formulas.
The VBA code looks like this:
**********
Application.Goto Reference:="MyRange"
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, .....
..
Application.CutCopyMode = False
**********
Any hints??
PEK
|
|
|
|
|
Hi All,
I am new to component development.
I want to create custom control to show selected objects in form of polygonal shape.
The objects are placed in separate panel on the same form.
Those should be dragged and arranged in required shape.
This is to show user how many euipments are present in factory.
On clicking any of this cirular control details of particular equipement are displayed.
Intially there should be four circular images placed in form of rhombus, and then when one more such object is dragged to the control display area, all 5 objects should be rearranged in form of pentagon.When one more object added they should look like hexagon.
Can you please suggest me any links where I can get infromation about creating such custom control or what steps should be taken to implement above functionality?
Thanks in advance.
Regards
Shailaja
|
|
|
|
|
You should check out GoDiagram. What you're talking about can be done but there's a lot of calculations and drawing. Plus, if you want to use shaped pictures on a canvas to represent different machines, you'll need to create an object model. GoDiagram has all that and at a good price. Just get GoDiagram with the layout model and it can do all this for you and is extensible.
Otherwise, you're going to have to do the math yourself. You can get the controls in a container (like the UserControl , or it if contains other controls you don't want positioned, you can use another Panel or something or filter the Controls collection as you enumerate the controls). For how many there are, you need to calculate the position. There's lots of different equations to help you, but you still have to code them. You also have to decide what the anchor point for each control is (i.e., one of the corners, the center, or other anchor point) and position the controls so that they don't overlap - resizing your virtual polygonal grid. That's not too bad since you can get the Size of each control and calculate the anchor point (probably good to have a separate method to do so and abstract that functionality so you don't have to include it all in one method).
When doing this, you have to take into account the relative position of each control. When calculating the anchor point, for instance, the Size of the control is for the control itself. The Location (a Point ) is relative to its container. Because these two things are used for the Bounds property, you'll need to take that into account.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Let's say you have:
Location: WebService: COM+ component:
___________________________________________
ServerRoot WebServiceRoot COMPlusRoot
ServerA WebServiceA COMPlusA
ServerB WebServiceB COMPlusB
In WebSericeRoot (residing on ServerRoot):
[Transaction(TransactionOption.Required)]
[AutoComplete(true)]
[WebMethod(...)]
public void PlaceOrder(..)
{
WebServiceA service_a = new WebServiceA();
service_a.UpdateInventory(); //This will call COMPlusA residing on ServerA --> This will launch a new transaction!
WebServiceB service_b = new WebServiceB();
service_b.UpdateShipping(); //This will call COMPlusB residing on ServerB --> This too, will not participate in PlaceOrder's transaction and launches its own.
}
Even if UpdateInventory() and UpdateShipping() requires transaction, two new transaction will be started. In other words, COMPlusA and COMPlusB will start their own transaction because COMPlusA/COMPlusB and COMPlusRoot objects all resides in different server.
What are my options to implement distributed transaction across machine boundary. Do I need to roll my own transaction? Thanks.
|
|
|
|
|
I am form Taiwan , English not nice.............^^
I have a question..
How the RichTextBox in writing, transforms the picture?
At present wants to use Graphics, but does not know the writing the attribute
Or has other ways to be allowed to achieve
Thanks.........
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
|
|
|
|
|
http://thecodeproject.com/cs/miscctrl/csexrichtextbox.asp
|
|
|
|
|
But, RichTextBox has not certainly transferred "picture"
|
|
|
|
|
I would like to be able to perform background work in my C# .net Windows Service if no mouse messages or key messages have be received for 10 minutes.
It involves downloading, uploading and processing, I would like to be able to tell if the computer has been idle from the user to a 10 minute period and then I would start these routines/processes.
I see how to do this with Forms with overriding the WinProc method, but I need Windows Messages for a Service, and I think the Forms WinProc method only gets events when the mouse is moved over top of it. I need Messages that occure anywhere within Windows/OS/Desktop.
Is there any Windows API methods to import or any idea how to do this?
Thanks in advance.
|
|
|
|
|
krisp wrote:
I see how to do this with Forms with overriding the WinProc method, but I need Windows Messages for a Service, and I think the Forms WinProc method only gets events when the mouse is moved over top of it. I need Messages that occure anywhere within Windows/OS/Desktop.
You'll need to use a system-wide hook DLL, which cannot be written from C# - you'll probably want to write it in C++. You can then use this from your C# application.
|
|
|
|
|
If you are using Windows 2000 or above, you can use the GetLastInputInfo API call. You get a structure with the tick count when the last input event happened.
|
|
|
|
|
Awesome, thanks alot Jeff, that is exaclty what I needed, i guess I can just call it in a seperate thread every minute or so. Thanks again
The GetLastInputInfo function retrieves the time of the last input event.
Syntax:
BOOL GetLastInputInfo( PLASTINPUTINFO plii );
Parameters:
plii - [out] - Pointer to a LASTINPUTINFO structure that receives the time of the last input event.
Return Value:
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks:
This is useful for input idle detection.
Function Information:
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 2000
See Also:
Keyboard Input, LASTINPUTINFO
|
|
|
|
|
I've a similar question. I'm being with a project which can create shortcuts for windows. Is it possible to get a signal if for example the "P" button is pressed
Jonathan Slenders
|
|
|
|
|
If I have a base class A and class B implments class A, how can I get access to class B from class A.
I want to use reflection to loop through the properties of class B in class A, but I need a reference to the object in order to do this.
Thanks for your help.
|
|
|
|
|
not sure if this is what you want...
within class A if you think it is a type of class B then
// c#
if( this is ClassB )
{
( ( ClassB )this ).ClassBMethodCall();
}
// or
ClassB b = this as ClassB;
if( b != null )
{
b.ClassBMethodCall();
}
Not sure what you mean by using reflection, if all you want to do is call a ClassB method from its parent class, then I dont htink you need reflection. Unless im mistaken by what you mean/want.
|
|
|
|
|
Thanks for your reply.
The problem with this is that the base class (class A) does not know what class B is, as any class can implement class A. Therefore, you cannot explicitly reference ClassB.
This is why I have resorted to sending class B through to the base class (class A) when I need to reference its properties. But of course I don't think this could be the best way.
Any other thoughts?
|
|
|
|
|
So you are not making specific derived classes that your parent class would know about at compile time of the parent class?
Is there a certain propery you want to call of the derived/child class (class B) or you just want to iterate through them all. Because you can make properies virtual or abstract as well so that your child class would have the property you are looking for.
As far as iterating through them, you should be able to use reflection and call the this.GetType().GetProperties(); and then iterate throught the returned PropertyInfo[] which has a Name and PropertyType property.
this.GetType() will return the type of the lowest child class not the type of the class that it is called within.
That help any?
|
|
|
|
|
If all the Class Bs have the same set of properties you could create an interface and inherit from the interface as well as Class A. Then when you are iterating through all the objects via the reference to class A you can cast to the interface.
class B : A, IMyCommonProperties
{
}
foreach(A myObject in myObjectCollection)
{
IMyCommonProperties mcp = (IMyCommonProperties)myObject;
mcp.MyProperty1;
}
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
|
|
|
|
|
in the document on .Net Framework you can find some information about cachedbitmab and its finction drawcahcedbitmap but if you search all the classes of .Net Framework for c# you could not found any thing about it, any body know's about this class ??
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
CachedBitmaps are created from normal bitmaps, to store them optimized for a display device.
The contructor is
CachedBitmap( Bitmap*, Graphics* )
Graphics (GDI+, not System.Drawing!) is associated with a display device. CachedBitmap formats the bitmap for this device.
CachedBitmap belongs to GDI+, is derived from GdiPlusBase and declared in Gdiplusheaders.h, Gdiplus.h.
|
|
|
|
|
Dear Corinna,
I am asking about cached bitmap in c# so if you know how to create an instance of that class could you send me a code smaple for that cuz i could not find the class constructor......
Mhmoud Rawas
------------
Software Eng.
|
|
|
|