|
You would be best posting a new topic so that everyone sees it. That way you are more likely to get a response from someone.
You might like to look at the MEMENTO pattern. It is a design pattern that helps to hold state so that it can be used elsewhere. Typically it is found in Undo/Redo code, but I think it would lend itself quite well to cut/copy/paste operations also.
emran834 wrote: But i cant get the clue how can i determine who has focus
I'm not an expert on WinForms applications, but if that is the only way to find the control with focus then that's what you have to do.
If you have your own control classes then you might want to consider implementing an interface for the cut/copy/paste operations and having the control also inherit from the interface. Then in your loop you can easily find if the control supports cut/copy/paste as you can check for the interface. e.g.
if (theControl is ICutCopyPaste) {} Where ICutCopyPaste is the name of the interface that you might create.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
How Can they do that who make Screen Controlable NumericUpdowns, Which can be controlled both with or without arrows. LETS take the hour example. U can set the alarm both from arrows at the right hand site, and also from clicking o a simple number. And as far as I saw there is not any other hidden control there. It ought to be some other thing. Can someone tell What it is ?
-- modified at 3:04 Wednesday 1st February, 2006
|
|
|
|
|
Hi All,
Whenever I debug any of my program using F11 it always goes to disassembly window ,which i don't want.can anybody please tell me how to disable this.Thanks in Advance.
Rakesh
|
|
|
|
|
|
Hello rakesh,
Plz Build solution every time whenever you want to debug it. Becoz it is possible that debugger will take old build solution & may give message that original source may change.
Regards,
Divyang Mithaiwala.
Best of luck.
|
|
|
|
|
iam new for c#,i have a problem in pushing the value to the table,from the datagrid,that is selecting the column using the checkbox,and delete from the table as well as datagrid like yahoomail and rediffmail by selecting the checkbox and delete
-- modified at 2:06 Wednesday 1st February, 2006
|
|
|
|
|
Hi,
You can wite code for that in 'oncheckchanged'='some function'.
lucky
|
|
|
|
|
Hi, i'm developing a smartdevice application and i'm trying to read in elements from an XML document that i created? I've looked around and found i'm slightly lost
<client>
<currentclient ID="01">
<clientTeam>Arsenal</clientTeam>
<clientName>Dave Dunn</clientName>
<clientPos>1st</clientPos>
<clientWon>0</clientWon>
<clientLost>0</clientLost>
<clientDrawn>0</clientDrawn>
</currentclient>
</client>
Is the XML document and currently i want to be to say take the value of clientTeam "Arsenal" and set the text on a label elswhere to the value.
<code>public void UserReader()
{
string Path1 = "/Program%20Files/SmartDeviceApplication4/User.xml";
XmlTextReader Reader = new XmlTextReader (Path1);
while (Reader.Read())
{
if (Reader.NodeType == XmlNodeType.Element)
{
if (Reader.LocalName.Equals("clientTeam"))
{
this.TeamTitle.Text = Reader.Value;
}
if (Reader.LocalName.Equals("clientName"))
{
this.ManagerName.Text = Reader.Value;
}
}</code>
Is what i had, but i really dont think its what i'm looking for - it compiles but the label values dont change.
|
|
|
|
|
Hi davedunn,
Try giving
this.TeamTitle.Text = Reader.ReadInnerXml();
insteadoff
this.TeamTitle.Text = Reader.Value;
Guess this will help you.
Thanks and Regards
Kodandapani.
|
|
|
|
|
Hi.
I'm having a little trouble getting this thing to work.
I have two tables Houses and People
Every "Person" belongs to a House, but only one per house is the "OwnerOfHouse".
So I made a colum named "HouseOwner" in the "House" table, which has the PersonID. And every person has a "HouseID_FK" which tells them to which house they belog.
SO here is the thing. I'm working with ADO.NET 2.0, and using BindingSource. So I have a BindingSource that has my Houses in a nice DataGridView, and when I click on any of them, I have another DataGridView which displays the people that live there.
That works Fine.
Now, when I chose one of the inhabitants, and press a button, His ID is updated on the Houses table, and I have a reference that tells me he is the Owner. So far so good.
What I want to do is that when I choose a House in my first DataGridView, The Owner is selected automaticlly in the People DataGridView. So far I've tried everything I could thinf of, but it allways selects the first element (the first person on the list).
Thanks in advance.
|
|
|
|
|
Please help me out by giving detailed sketch over the conversion of a VB 6.0 project to a C#.NET project. (should not produce unexpected results after conversion). Thanks for everyone who helps me.
love coders'
|
|
|
|
|
Once again, the only practical option you have is to rewrite the application from scratch. There are no steps to go through to convert the code! You have to write your own steps based on your own VB6 code!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm currently developing some kind of editor by using the PropertyGrid. I saw in VS.Net that the property in PropertyGrid can be validated in range, I want to add that feature in my application also, but I don't know how.
Does anyone know anything about this ? Do it need to create new TypeConvertor ? Or just specify the attribute to that property ?
Wutipong W.
|
|
|
|
|
Hi
ProperyGrid control displays the properties collection for an object. For
each property in the propertygrid, its value can only be displayed in
string representation.
For a property that is build-in type, .Net has provided the
validation, while for custom type, we should implement the TypeConverter to
do the type convertion and validation.
Thanks and Regards
Pani
|
|
|
|
|
OK, I have to implement the TypeConverter.
Thank you very much
Wutipong.
|
|
|
|
|
I would like to ask one more question.
What is displayed in the PropertyGrid Cells anyway, is it just take string from ToString() method, or using some mechanism to create the panel and display it there, etc ? And how can I customize the way it display property in the PropertyGrid.
Well, I means, what is espect to return from TypeConverter to use in PropertyGrid ?
Regards,
Wutipong
-- modified at 2:48 Wednesday 1st February, 2006
|
|
|
|
|
|
I'll be very thankful,if someone lets me know the way by which I could convert a Visual Basic 6.0 project to C#.NET.
After migration, the code must produce the same results as seen in VB6.0.
love coders'
|
|
|
|
|
That is not possible I think. You can convert from VB6 to VB.Net but even then you have to do some things manually.
Greetings,
Ingo
|
|
|
|
|
The best solution is a complete rewrite, by hand, from scratch.
You COULD convert the app using the Conversion Wizard with VB6, then convert that code to C#. Chances are, you'll have to tweak a bunch of stuff by hand to get it to work in VB.NET, then you'll have to do a bunch of other things to get it to work in C#.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Use the upgrade wizard to convert to VB.NET. It's not perfect, but it can be done.
Once your code is in VB.NET you can easily convert to C# using either ours (Instant C#) or any other decent VB.NET to C# converter. There will be some manual adjustments, but nothing you can't handle (we offer support to help out with this also).
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# converter
Instant VB: C# to VB.NET converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB.NET to J# converter
Clear VB: Cleans up VB.NET code
|
|
|
|
|
I am looking for a messagebox that does not have any buttons. Is there such thing in the .net framework?
|
|
|
|
|
Why would you want such a messagebox? It's not good UI design.
If you *really* think you want something like that, you can create a new form with no Ok or Cancel buttons and display your message there instead.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
The reason i want that is because i wanted some of those "Please wait" messages that after a while it will close it self ( invoked by something else).
Is there a way?
|
|
|
|
|
Hi , Iam using the following code to get Excel data
m_ConnXL = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + sXLFilePath + ";Extended Properties=Excel 8.0;");
m_ConnXL.Open();
sXLQuery = "select * from [sheet1$]"
dtXL = ExecuteXLQuery(sXLQuery); //simple method to excute the query & to return the DataTable
It fetches the all the rows including the hidden ones , how can i avoid fetching the hideen rows...?
Thank you...
|
|
|
|