|
You can also do it with Move to Front/Back on the controls. Send the toolbar to the back.
|
|
|
|
|
It's not about the z-order Bob, it's how the docking mechanism works in WinForms. Sending the Toolbar back will permanently hide it behind the ListView at runtime.
|
|
|
|
|
It is not about the Z order, true, but 'Send to Front/Back' in the VS designer changes the creation order of the components, so it changes the docking order. By default the Z order is also based on the creation order so the function kind of does both things. I've had to do this myself for docked controls and splitters.
|
|
|
|
|
It works , Nice trick, thanks.
|
|
|
|
|
hello...
when i wase test my solution, i found exception.
message is...
----------------
The Undo operation encountered a context that is different from what was applied in the corresponding Set operation. The possible cause is that a context was Set on the thread and not reverted(undone).
----------------
that is riaseup after this code
p_han = OpenProcess(1, false, (IntPtr)ps.Id);
TerminateProcess(p_han, 0);
CloseHandle(p_han);
this code is kill process from my ui form command.
why raiseup is exception ?
|
|
|
|
|
There's not enough information to troubleshoot this. The message your exception is supplying has, on the surface, nothing to do with the code you posted.
One problem I see is that your opening a process, then killing it while you have the process open. Try closing the process first, THEN killing it. It's entirely possible that the handle you get in the OpenProcess line is no longer valid when you try and Close it.
Frankly, this reeks of copy'n'paste coding.
|
|
|
|
|
This error could occur due to cross-thread operations. You may want to check InvokeRequired and call your methods using either Invoke or BeginInvoke .
|
|
|
|
|
|
Is this a question? Here is not the place to post these kind of stuff..
|
|
|
|
|
I have just voted to have your post removed as it is blatant advertising.
I don't see anything wrong if you have a question regarding C# which is related to your workflow system - I have worked on workflow systems and can tell you that most people on this forum have enough intelligence to not require a workflow system.
Workflow systems I have seen are generally for sheep who are unable to keep organised - they kill all creativity and turn workplaces into factories for the walking dead!
So I think you may be targetting the wrong audience too...
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
GuyThiebaut wrote: factories for the walking dead!
So I think you may be targetting the wrong audience too..
Are you sure about that?
The best things in life are not things.
|
|
|
|
|
Now you come to mention it...
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
GuyThiebaut wrote: Workflow systems I have seen are generally for sheep who are unable to keep
organised - they kill all creativity and turn workplaces into factories for the
walking dead!
We had one at the last place I worked at, your asessment isn't too far off. Wasn't as cool as a zombipocalypse though.
|
|
|
|
|
My experience was they they are a product of marketting departments.
Because process flows are constantly changing these sorts of workflow applications need constant tweaking and recalibration.
As a consequence they become a good source of revenue for the companies selling them, who need to supply consultants to help tweak the systems, and a good way to keep the imagination and creativity of workers in check.
Call centres are good examples of places that use workflow systems... (when I say good examples the word 'good' is open to interpretation)
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
Now I'm intrigued; wish I could read the post.
|
|
|
|
|
You didn't miss anything, it was just an advert for some squalid enterprise's COTS workflow system
The only thing that distinguished it was a paticularly florid use of English peculiar to Indian marketing departments, if recent evidence is anything to go by.
|
|
|
|
|
GuyThiebaut wrote: into factories for the walking dead!
Working in such a company now, I already thought it was strange that I feel a growing urge to eat my colleague's brain. Guess I need to find something to move on before it is too late !
V.
|
|
|
|
|
Hi,
I'm trying to find a particular node in treeview. I used below code to find out, but not working. Please let me know how to find out. Thanks in advance
approach 1:
treeView1.Nodes.Find("Company", true)
approach 2: it is searching at only one level, not child nodes
foreach ( TreeNode tn in theTreeView.Nodes )
{
if ( tn.Text == "Company" )
{
return tn;
}
}
My treeview:
Business
|__Company
| |__BBS
| |__CBS
|__Prod
|
|
|
|
|
When creating your TreeNode s, did you use the correct version of the Add [^] method, to insert a search key in each one?
The best things in life are not things.
|
|
|
|
|
You will need to use a recursive search. Or if you search often, you may want to also have a Dictionary<string,TreeNode> to help out.
|
|
|
|
|
The Nodes.Find() method searches keys and not text. So, if you want to search for a node, you must have added the node with a key.
treeView1.Nodes.Add("key1", "text1");
TreeNode node1 = treeView1.Nodes.Find("key1", true);
|
|
|
|
|
|
C# WinForms .NET 4.0 Client FrameWork, WinForms TreeView
Hi, Shameel gave you the answer you need ... you need to make sure a TreeNode Name (string) is used as the argument to TreeNodeCollection.Find ... but, since I've been working with the (original WinForms) TreeView this week, I'll include a few notes here from my own recent TreeView "brain top-up" I hope will be useful to you.
0. a Treeview NodeCollection is not a Generic Dictionary: you can have multiple Keys with the same Name (key) as well as Text (value). imho: it would be passing strange/nuts to have duplicate Name/Text (key, value) TreeNode objects with the same Parent node, or being children of the top-level TreeNodes object, but you can do it.
1. the result of TreeNodeCollection.Find will be an array of matching TreeNodes.
2. if you expect zero, one, or a known number, of matches to occur, or you just to plan to handle the first of potentially multiple matches, you can use the length of this array as an indexer for a switch statement.
Of course, if the Nodes of the TreeView are being created, added, on-the-fly, or updated real-time from some DataSource, and you have potentially an unknown number of duplicate Keys, and you need to take action based on all the matches.then you'll need to enumerate the result of Find if #matches > 1 ...
In the history of .NET WinForms, TreeView and its NodeCollection object came before Generic Dictionaries, and, with hindsight, in my humble opinion, it would have been better if the 'Name property of a TreeNode were referred to as the 'Key, and the 'Text property referred to as the 'Value.
With Linq, you can now can use the LookUp special form of Dictionary; for example: LookUp (implementing ILookUp) is the return type of such operators as ToLookUp, which also allows duplicate keys. I intend to add a brief CP 'Tip/Trick' on ToLookUp this week.
best, Bill
"Reason is the natural order of truth; but imagination is the organ of
meaning." C.S. Lewis
|
|
|
|
|
Hello,
I want to make a web service that receive files using MTOM:
[WebMethod]
public void Upload(string FileName, byte[] buffer, long Offset)
{
string FilePath = Path.Combine(UploadPath, FileName);
using (FileStream fs = new FileStream(FilePath, FileMode.Open, FileAccess.ReadWrite, FileShare.Read))
{
fs.Seek(Offset, SeekOrigin.Begin);
fs.Write(buffer, 0, buffer.Length);
}
}
i have this error : System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access to the path 'C:\MTOM\AA' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at MTOM.Service1.Upload(String FileName, Byte[] buffer, Int64 Offset) in C:\Documents and Settings\Administrateur\Bureau\MTOM\MTOM\MTOM.asmx.cs:line 41
|
|
|
|
|
|