|
rick0557 wrote: private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(@"CMD.exe","attrib C:\\save.txt +s +h");
}
Try This,
private void button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(@"CMD.exe","/C attrib C:\\save.txt +s +h");
}
The only change I have made, is I have added "/C" with the Second Parameter.
|
|
|
|
|
How about System.IO.File.SetAttributes instead?
|
|
|
|
|
nope...its for file attributes like, readonly, hidden...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Basicly what I am tring to do is change a files properties to super hidden.
(or system hidden) like the protected operating files. read about a way to do this manually
with the cmd.exe(comand line). one could probably build a batch file to do this. But the clean
way would be to do it with in the C# application that creates the file in the first place.
But Im not sure how to go about doing it. the "File.Atributes" only has the general type properties
.It has "hidden" and also "System". But what I need to do is tuck away a file that my program can access And be sure that it wont get deleted or changed.
Any Help would be greatly Appriceated.
Regards;
Rick
|
|
|
|
|
I have a Program that displays a List in a textBox such as
Items
Items
Items
is there way that I can make the list in the textBox Click able so that it leads you to a Page depending on which item you click with out showing such as.
http://Site/items
http://Site/items
^_^ thanks for any help.
|
|
|
|
|
Does it have to be a TextBox?
This would be fairly trivial if you were using a listbox.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ListBox would be Fine, still don't know how myself so help?
|
|
|
|
|
Create a handler for the Click event, then check the SelectedItems.Item property to determine which item was clicked.
|
|
|
|
|
ok I have all the Code but exactly how to create a Click Handler
private void listBox1_Click(object sender, ??? e)
{
String item = listBox1.SelectedItem.ToString();
System.Diagnostics.Process.Start("http:site" + item);
}
what exactly should I have there?
|
|
|
|
|
The easiest way to create the click handler is the following:
1. Highlight the listbox control
2. In the properties window, choose the "events" view ( the little lightning bolt )
3. Find the click event in the list of events
4. Double-click the click event in the list, and it will create a method stub for you to put your code into
|
|
|
|
|
yeah thanks I found that after manually figuring out how to :P
^_^ thanks for all the help.
|
|
|
|
|
now I have to ask once you set DataSource is there anyway to full release it?
Additional information: Items collection cannot be modified when the DataSource property is set.
Because the program has a reset feature and this is the error I get when trying to clear the data from the both the listBox and the original list<string>
|
|
|
|
|
Hmm. You're trying to delete an item from the listbox and not from the database?
|
|
|
|
|
never mind I used an unbound list ^_^ thanks for your time though.
|
|
|
|
|
My problem seems to be simple, therefore I could not find an answer yet.
I have a windows forms application and the reports are being deployed and uploaded to a binary field in the database. The main idea is to run a query and retrieve this data, storing the report on a byte array. I don't want to compile reports inside the project nor reading them from the hard disk.
Is it possible to set the reportsource for the crystalreport viewer using this byte array or I REALLY have to define a file path on the hard disk? Actually, reading on a buffer, write the file on the disk and read it doesn't seem to be that clever... It'd be nice if we could just read the byte stream of the report template and directly set it as the report source.
Thanks in advance!
(C# / WindowsForms / Sql Server 2008)
|
|
|
|
|
Hi,
I've Built a chat and now i'me trying to a a function that prevent
same user to login.
The problem is when i'm blocking/disconnecting the user that login as same,
i'me also disconnectin the user that already connectec to the chat.
Some have an idea how to do it?
Tanks...
modified on Sunday, August 2, 2009 12:56 PM
|
|
|
|
|
I can suggest you to use Database for that. Create a field in DB Table as ISOnline of type bit . Set it True if user logged in.
Now, Whenever user logged in, I guess you are authenticate the use with Database, So during authentication also check the ISOnline Field . If its True, Throw Error Message. Else, Set the field as true and allow user to logged in.
Set ISOnline Field as False, when he logoff
Hope this will help you
|
|
|
|
|
And what if I logon, then my PC crashes, I reboot, I want to logon again? what will make sure IsOnline gets reset?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
One can send a "challenge" every n-seconds or so, verifying whether the client is still there. That would be what Windows Messenger does. When the client doesn't respond to the challenge-request, he/she is considered disconnected
That's a form of polling though, and polling is bad.
I'm as confused as a baby in a topless bar
|
|
|
|
|
Eddy Vluggen wrote: polling is bad.
I don't agree. Polling is mostly bad when used as a primary means for solving a synchronization problem; however IMO it is fine for low-frequency checks and problem recovery like the one you suggested. That's somewhat similar to Exceptions.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
plus add a LastActivity column too and keep update at a specified timer
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Senario is like this;
I have a wcf service, this service sum two number. So "sum" class run on the server side. Client use following code;
Sum sum = Sum.Instance;
sum.AddParameter(1);
sum.AddParameter(2);
int result = sum.Calculate();
This service is run corectly when if at the same time ten client call this service and add different parameter? My main question is singleton pattern using is it wrong in this senario? Because all client use same instance.
|
|
|
|
|
I would have written this as sum.Calculate(params) that way you don't have to worry about other clients calling AddParameter, or even the same code adding more parameters then necessary and causing errors.
only two letters away from being an asset
|
|
|
|
|
Ok, I know if I send parameter in Calculate() function its work. What about the example I have given. How does it work in singleton?
Thanks...
|
|
|
|
|
Hi,
Here's what my table looks like..
ID Parent Name
------------------------
0 0 BaseLine
1 0 A
2 1 A1
3 1 A2
4 0 B
5 4 B1
6 4 B2
How would you load it recursively so it would show A1 & A2 under A and B1 & B2 under B and any deeper sub levels would show in the right node level.. I know it's supposed to be a simple recursion logic but it's getting me tired
|
|
|
|