|
I found the solution:
it was indeed a windows display setting.
This setting is found here:
1. Right click an empty area of your desktop.
2. Select Appearance
3. Select the Effects button
4. Place a checkmark in the "Show window contents while dragging" checkbox to enable this setting.
when you restart the application it works.
|
|
|
|
|
I want to write a software to protect all files in my computer. When user open a file, i can allow or not allow open, base on roles of user which i support.(like software "PC Security" but in my software, when any file is opened, i will do something in it). Help me...........!!!!
|
|
|
|
|
This requires intercepting calls in the NTFS file system. This is black-belt, low-level stuff. There is nothing in the .NET BCL that will help you with this. A utility called FileMon from SysInternals does something along the lines that you need. I don't think they'll give you the source though. There is a short discussion on what techniques are involved though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I 'm trying to create a chess program.
I have one windows form application project which represents the client part. This client is using a class library which contains a class Deployment (the Deployment class contains the position of the chess pieces). This class inherits form the class MarshalByRefObject. Further I have created a server console application which is responsible to host the server object of the class Deployment (object mode = singleton).
The missing part of my application is the notification of all the clients which are connected to the server. When client X is sending a message to the server object (of the class Deployment), client Y needs to be notified via event triggering. In this case client Y knows it should refresh the chess board, because the positions of the chess pieces are changed.
Can anyone help me with information about implementing the event handling mechanism?
I’m using C# via Visual Studio 2003.
Many thanks in advance!
Kind regards,
Johan
-- modified at 11:36 Sunday 16th October, 2005
|
|
|
|
|
Help please.
My windows form contains tab Control which is used to navigate through a number of user controls (tabpages). My windows form contains back, next and cancel buttons.
When I click Next button, I want to be able to validate the contents of the usercontrol inside the currently selected tab page. 1. But if I put my validation inside the windows form Next event, I need to instantiate my usercontrol and thus, contents are emtpy. (I'm not sure if this is the correct approach assuming I place my validations inside Next event of Win form.)
2. If I put my validation inside the usercontrol,
but I cannot put it in Validating or Validated event, because if I don't set focus on the particular control, (e.g, textbox2), and only set focus to textbox1, and click Next button, it doesn't perform its textbox2 validation.
So I placed it inside Leave event of usercontrol. Unfortunately, if there's an error in validation, it applies to all buttons (back next and cancel) of my windows form.
For instance,
//UserControl class
<br />
... Leave event ...<br />
if (tbName.text == string.emtpy)<br />
errorProvider1.setError(tbName, "Cannot be emtpy."); <br />
else<br />
errorProvider1.setError(tbName, "");<br />
<br />
if (errorProvider.getError(tbName) != "")<br />
MessageBox.Show("Please validate data.");
So when I click Cancel which is suppose to close my window, it displays messagebox. =(
Where should I put my validation? inside windows form (particularly Next event) or inside user control (leave event? or other events)? before it even leaves.
if I put my validation in Windows form,
I use this approach:
I access the tabpage which contains imagekey that is set to the specific user control.
so if the imagekey matches the user control, then i
set error messages, etc but the contents of the control is always empty (textName).
... Next event ...
Control.ControlCollection c = this.tabWizard.Controls;<br />
System.Windows.Forms.TabPage tabPage = new TabPage();<br />
<br />
foreach (Control ctl in c)<br />
{<br />
tabPage = (System.Windows.Forms.TabPage)(ctl);<br />
if (tabPage.ImageKey.ToString() == "Profile")<br />
{<br />
WizCreateProfile cp = new WizCreateProfile();<br />
if (cp.tbName.Text == string.Empty)<br />
{<br />
cp.errProvider.SetError(cp.tbName, "Please provide a profile name.");<br />
validateName = false;<br />
}<br />
else<br />
cp.errProvider.SetError(cp.tbName, "");<br />
}<br />
}<br />
<br />
if (validateName == false)<br />
MessageBox.Show("Error");
... end ...
Please help. Thank you so much.
|
|
|
|
|
Hey..
Some time ago, I made a small boardgame in C++. It was a console application, so you had to move on the "board" by typing a letter representing a direction. A small menu displayed your choises.
The board was made up by a vector and each field had pointers to other fields, creating directions. Each field had it's own properties. So when you moved around the board, different things could happen on different fields. The game had alot of other features, nothing fancy, but it tought me alot about C++.
Anyway, I've been away from the programming game for a while, and now I'd like to get into C#. So I thought I'd rewrite (.NETify) the game and maybe spice it up a little. I was thinking about creating a Windows forms application, with a grafical representation of the board, maybe in a grid?.
To get the ball running, how do I make a grid to represent a game board (like a chess board), making each field an object? Can I make a custom gridcontrol? Also, is it possible to load a picture on top of the entire grid, so that it looks like a map of sorts, still keeping the fields individual?
I've been looking around for some time now, but I haven't really found anything I could use....
Thanx in advance...
|
|
|
|
|
Have you thought about doing this as an ASP.NET application? This way, you could make the game work on a web page, and use a HTML table to give you a simple grid. You could also make the 'map' a background image..
And, we could all play it then too!
Rob Philpott
|
|
|
|
|
Yes I actually thought of doing that, and it's not such a bad idea I think it would be a good way to learn something about ASP.NET applications as well.
And you're right, it would be a great opportunity for you all to enjoy this fantastic game
I think I'll start with the Windows application, and then look at the ASP.NET solution afterwards.
|
|
|
|
|
do you mean something like this
http://www.codeproject.com/csharp/Learning_Draughts.asp[^]
The BoardControl is a seperate dll so you should be able to use it for your project quite easily using the Draughts code as an example of how to use it.
pseudonym67
My Articles[^]
"So keep that smile on your face.
Have a drink to help you sleep at night.
They got what they desired.
We're passive in their brave new world."
New Model Army
|
|
|
|
|
This looks very good, I didn't come across this one on my search here on Codeproject. There are definitely some things here I can use. Thank you
|
|
|
|
|
I need to create a virtual drive ( let's say Y: ), and after that I want to be able to create virtual directories and files ( for example y:/test/test.txt ).
I don't want to use subst.exe - I want all the files to be virtual, and I think the best solution is a shell extension.
Can someoen help me with a sample ( a shell extension for drives/folders ) or some usefull links ? 10x
|
|
|
|
|
What your talking abot is a RAM Disk, not a shell extension.
You can download one from here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No,this is not what I was talking about . I need to develop myself the virtual drive in C#, and the best way to integrate it with windows explorer is a shell extension. I only need the names of the files, I don't need them on the hard drive.
|
|
|
|
|
|
Are you absolutely sure about this ? How does Nero image drive on daemon tools work ?
|
|
|
|
|
It's definately not a shell extension, but an extension to NTFS. It sets up and maintains an interface to translate between NTFS and a foreign file system.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I think you are wrong . Look at Gmail drive : http://www.softpedia.com/get/Internet/E-mail/Mail-Utilities/GMail-Drive-shell-extension.shtml . It is a shell extension, isn't it ?
|
|
|
|
|
Well, how about this... here[^] is the Windows Shell guide. You tell me.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually that's not true. The shell displays objects based on PIDLs (pointer to an ID list). Explorer displays the file system with a shell namespace for the file system itself. Remove file systems are browsed using shell namespaces, too. This whole system is extensible and described at http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/namespaceextension/namespace.asp[^].
Doing this in C# is not a simple task and I highly recommend using native code. You'll probably spend more time trying to define and use interop interfaces and other types than actually doing the necessary work for a shell extension. All the native headers already have all these types defined.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
Thanks Heath! I couldn't find it in there at all. I just assumed that since it "wasn't" in the Shell Guide, it had to be in NTFS.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi,I have a application by C#.I want encapsulate it in order to can use it on computer not install VS.NET.
Who know about this problem,please help me.
Thanks.
|
|
|
|
|
Just compile it. In the bin folder you get an exe file.
---
b { font-weight: normal; }
|
|
|
|
|
VS.NET is used to compile the applications, and .NET is used to run the applications. A computer cannot run a managed application without having the .NET Framework installed. It's a runtime, just like Java, Perl, Visual Basic, etc.
.NET only needs to be installed once and many computers (and more in the future where .NET is installed by default, which started with XP Media Center and Tablet PC editions, and Windows Server 2003) and there are intelligent ways of not requiring a specific version if you've done compatibility testing. That is, .NET applications will typically run on newer Framework versions. There are, on occasion, a few breaking changes but these are documented at http://msdn.microsoft.com/netframework[^] and you typically won't run into them. Your install could check that at least the minimum runtime version is installed. If a newer runtime is installed you could avoid requiring a newer runtime versin.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|