|
i would to create a file in a temporary volume and with read/write access for my application only.
How can i do?
|
|
|
|
|
Sasuko wrote: for my application only.
You can't. The best you can do is make it hidden, so most people when they browse the file system won't see it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Look at the System.IO.IsolatedStorage namespace, and see if it offers what you want.
|
|
|
|
|
I'm stuck trying to parse the date out of an RSS 2.0 feed. According to the RSS specification the date has to be in this format:
Sat, 07 Sep 2002 00:00:01 GMT
I have tried using DateTime.Parse with no success, and I'm not really having luck with DateTime.ParseExact . I'm not looking for an answer neccesarily but someone to point me to the right direction.
Matt Newman
Even the very best tools in the hands of an idiot will produce something of little or no value. - Chris Meech on Idiots
|
|
|
|
|
Maybe it would help if I was parsing the right node. I don't think parsing the GUID node as datetime will work
Matt Newman
Even the very best tools in the hands of an idiot will produce something of little or no value. - Chris Meech on Idiots
|
|
|
|
|
Hi,
my problem is that i have a business layer which contains all my classes that represent my entire "world" (i'm writing a app for the registration of the members of our organization so this business layer contains classes like Member, Membership, MembershipPayment etc.)
the problem no is that these classes do not really fit the databasetables in my database (SQL Server) i mean, a class not always has as many properties as a table has columns and there is no table for each kind of class.
my problem no is, how do i connect my business layer to the DataTables and DataSets of my Data Access Layer? can someone give me a concrete example?
|
|
|
|
|
In my main program i create a thread to run a function which is infinite (while (true))
when i close the main frame of the program the thread is still running
how can i make it collected by the gc automaticly when the main frame closes??
Thanks
|
|
|
|
|
thread.IsBackground = true; will cause the thread to be aborted when the application is closed.
|
|
|
|
|
Hi there,
I've got the following problem:
I create a panel in an empty Form. then I set this panel to dock to the left.
Inside that panel i add some buttons, all docked to the top.
I set the autoscroll property on true.
When i start the app, i resize my form so the vertical-scrollbar automatically appears.
Now the problem:
When i start 'dragging' the scrollbar up and down, on SOME pc's the contents of the panel won't change position until i release the scrollbar. On my pc it will update directly, so i see the contents sliding smooth, but on a lot of other pc's it won't slide, until i stop scrolling.
I hope somebody has the answer for me
Greetz,
Pete
|
|
|
|
|
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
|
|
|
|