|
Dirty Solution so far
WorkspaceManager as the DockingWindows exposed as a DockingWindowCollection
I also exposed a collection of ContainerWindows as a ContainerWindowCollection
You need to create a docking window, then create a container window in the workspace manager and set the ContainerWindow property on the DockingWindow to the ContainerWindow you want to use within the window.
This seems to work so far...
Any more encapsulated solutions would be welcome )
Thanks - James
James Simpson
Web Developer
imebgo@hotmail.com
P S - This is what part of the alphabet would look like if Q and R were eliminated Mitch Hedberg
|
|
|
|
|
How to do synchronization to threads, for example if I have some number of nodes each have a thread and, also this nodes have some values for each node stored in an array, these values will be updated under some conditions “the one with min value will be updated first”, and the new value will be stored in the initial array.
How to do this?
nad
|
|
|
|
|
For information on thread synchronization, see the documentation for the System.Threading namespace in the .NET Framework SDK, specifically information about the Monitor (or use the lock keyword in C#) class which is the easiest to use (but not always appropriate). I also urge you to search this forum (use "Search Comments" above) and the CodeProject site for many examples and discussions. There have been several here in the C# forum similar to your problem in the recent past.
When using the lock keyword, the C# compiler generates the following:
lock(someObject)
{
Console.WriteLine("Hello, world!");
}
Monitor.Enter(someObject)
try
{
Console.WriteLine("Hello, world!");
}
finally
{
Monitor.Exit(someObject);
} someObject is an instance of an object and its scope depends on your requirements. Since you're synchronizing methods on different objects, you should use a static object like the Type of your class. So, if your class is called MyClass , then use lock(typeof(MyClass)) to make sure all threads are synchronized no matter which object is trying to access a resource (like your array). If you want to synchronize a resource that is specifically to a single instance of a class, then you can lock against this .
If you look at the namespace I mentioned before, there are many other synchronization objects that allow you to specify time-outs, share WaitHandle s, and more. There's also a topic in the .NET Framework SDK that should get you started: http://msdn.microsoft.com/library/en-us/cpguide/html/cpconthreading.asp[^].
-----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-----
|
|
|
|
|
Hi!
I'm trying to have my videos of our software
(which is to be burned onto a dvd or cd)
protected from copying. I mean, I dont want the user
to copy-paste the lot of them with a happy smile.
I'd like them to be read-only.
Of course, it would be nice if there exist a simple solution
-aka not too expensive or even free!- to this minor problem.
What are my options ?
thanks !
This by our hands that dream,
"I shall find a way or make one!"
|
|
|
|
|
Your options are to use google and not to post in the C# programming forum. This is not a programming question. There are solutions available, but everything is crackable. Just go to http://slashdot.org[^] to see what everyone thinks of them and how fast they're cracked (think: DeCSS).
-----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-----
|
|
|
|
|
Just FYI...
Most CD copy protection schemes really just end up making some legitimate customers unhappy in the longrun (in other words, the protection causes some people who bought the software to not be able to run it).
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
hi
i am working on an applicatin that will record all keyboard keys in a text file.... just like the keylogger do.... i have worked in windows services ... i have make that ... but my application is not working like a keylogger .... don't take it in negitative sight.... just for learning porpose... thx..
Mazhar Hussain
|
|
|
|
|
|
yes this a question .... thx for your quick reply...thx
Mazhar Hussain
|
|
|
|
|
I have a TextBox inside a windows form (C#) which has capture property set to true. The TextBox captures the mouse events fine until I click inside the textbox itself, after which it does not respond to the mouse event happened outside its boundary. I checked the capture property and it is automatically set to false.
Thanks in advance
Manobal
|
|
|
|
|
Just out of curiosity, do you have a Click event handler for your TextBox.Click event? What is it doing? If so, you should put a breakpoint at the first statement of your handler and put a watch on the Capture property of your object and see when it changes. Examine the line before the change occured.
-----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-----
|
|
|
|
|
No there is no click event declared for the textbox.
The TextBox is used to rename XYZ. So when a user choose to rename XYZ the textBox is enabled and user can write into it. Now If user is done renaming XYZ, he/she will click outside the boundary of textbox and I will disable the textbox. I am trying to make it similar the way it is done in windows to rename files.
The problem arises when I click inside the TextBox. It stops capturing the mouse events (Even though I set it to true) and I don't get mousedown event that occur outside textbox... I can not disable the textbox
Hope I made myself clear..
Thanks
MAnobal
|
|
|
|
|
It would be much simpler to handle the LostFocus or Validating event to disable the TextBox .
-----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-----
|
|
|
|
|
Hi
Is there any one who can tell me how to get the port of an application with the application e.g i run an application and want to see on which port it is running by clicking the button with in that application
|
|
|
|
|
If your application binds to a port in order to listen, your application should already know which port and / or address it's binding to, or if you specify 0 for the port and IPAddress.Any for the address, you can retrieve the Socket.LocalEndPoint property to determine which address and port were selected by the service provider.
If you're connecting to another sock (and have not used Bind to pick a specific port), you should still be able to use Socket.LocalEndPoint to determine which address and port were used.
-----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 need to copy files from a directory on our network out to a FrontPage Web's folder. Any tips/ideas on how to do this? The object browser is starting to give me a headache as I can't find anything to Open a web connection.
- Adam
|
|
|
|
|
This is a question better suited for the Web Development forum as it has nothing to do with C#. Please post in the appropriate forum next time, please.
You can, however, simply type a URL in the Open dialog box and a new web folder is usually created, but not necessary. FrontPage uses the FrontPage Server Extensions to connect to IIS (not simply WebDAV). You should also make sure that the FrontPage Server Extensions appropriate for your version of FrontPage are installed on the server with IIS installed.
If your FrontPage site is comprised of files from the network, use File->Publish and you're provided a number of options in which to publish the site to a FrontPage directory (see the paragraph above as it still applies) and most likely WebDAV and FTP depending on your version of FrontPage.
-----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-----
|
|
|
|
|
Heath,
I think my question was misunderstood. I am developing a C# application that will search a file system and then I want to automatically push the files found out to a web site that has FrontPage extensions installed. I know it is possible to connect to a site in this manner (Frontpage instead of FTP), I just don't know how. Can anyone help?
|
|
|
|
|
Misunderstood? You never mentioned that you wanted to write a program that did this. It helps to ask the right question.
There's no easy way to do this: the .NET base class library does not support FrontPage extensions (nor should it be expected to). You'll have to create a class library that uses the FrontPage protocol or search for one on google. The protocol is very poorly documented.
You could use WebDAV instead, which is a well-documented and industry-standard protocol. See http://www.webdav.org/[^].If you google well enough, you'll probably even find a .NET library you can use, but again it is not supported in the .NET base class library.
-----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 didn't believe it necessary to state the obvious, that I was writing a program to do this, considering I was in the C# discussion board.
I appreciate your assistance in this. You are correct, I want to use the FrontPage protocol to do this. I am looking for people who have used it before. More specifically, the Office PIA now appears to be what I would require.
If you have and are capable of giving a more detailed explanation, great.
|
|
|
|
|
No, it's not obvious because we get unrelated questions like "how do I use frames in my HTML document?" all the time. Trust me - I spend a LOT of time in here.
The majority of people that have used the FrontPage protocol before were using FrontPage. Even the Apache server project had to be given a FrontPage mod by Microsoft themselves in order to support it (last I knew, it was written by an MS employee with permissions without support from MS themselves).
The Office PIAs don't expose what's necessary for the FrontPage protocol to be used through the object model - read the documentation[^] of the object model on MSDN and you'll see that. To get an instance of anything using Microsoft.Office.Interop.FrontPage you need an instance of the FrontPage.Application object, which is an out-of-process automation server (a .exe executable, namely frontpg.exe). So this won't be using the FrontPage protocol but FrontPage itself. It this is not a problem, then follow below. Otherwise, google for the API documentation if you can event find it, or visit the http://www.apache.org[^] project and look for the FrontPage extensions mod.
If you want to use FrontPage to publish the web, then create an instance of the ApplicationClass . Get the Webs property and call Add to add a file:// URL to the root network directory, which also returns a WebEx instance. That has a method called Publish that you can then use to publish the folder (and its subfolders). Call Close on the WebEx when done and call ApplicationClass.Quit (implements _Application.Quit ). This is roughly how all the Office applications work. If you have any experience automating Office (and I have lots) this becomes very easy because they are all architected about the same.
You won't find specific object model documentation for FrontPage, but you can use the concepts in the Word object model and apply them here, because as I said they are very similar in concept and architecture.
Microsoft MVP, Visual C#
|
|
|
|
|
I have a C# application that interops with PowerPoint 2000 (Project references description is "PowerPoint 9.0 Object Library"). I know that this app does not work on a PC that has PowerPoint 97 installed. Is it likely to work on a PC with PowerPoint 2002 (XP?). I know that COM is based on contracts of interfaces, so I guess later PowerPoint objects would support earlier versions' contracts, but is the interop generated by the IDE clever enough to deal with this too?
Thanks for reading.
--
DaveDG
|
|
|
|
|
The Runtime Callable Wrappers (RCWs), or COM interop assemblies, generated by .NET Framework tools and the IDE are attributed with the interface and class GUIDs defined in the typelib that you're importing. So, just like COM, if a newer version of a library supports the older versions of the interfaces, you can use the new library through the old object model since the contract is honored.
-----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-----
|
|
|
|
|
Does anyone have experiece with using ms access databases with C#?
I was wondering how fast and efficient the access is.
I am writing AI for an AI tournament and was considering using an MS ACCESS DB to store stuff. However, our moves have to be made in 6 secs or less..therefore it has to be fast access if I used this approach
|
|
|
|
|
mweston wrote:
I was wondering how fast and efficient the access is.
If you want to use it only in a desktop, its effieient enough and not as expensive as SQLServer, you can also use MSDE which I think is free and its SQL engine.
Mazy
No sig. available now.
|
|
|
|