|
File.SetAttributes("textfile1.txt", FileAttributes.ReadOnly);
Just a suggestion for future!!! Try to Google the question you are posting. I believe, most of the times you will get get the answer there itself.
|
|
|
|
|
Thanks for your solution.
It works fine.
Can you please tell me about “attrib C:\test +s +h”. both attrib simultaneously.
|
|
|
|
|
|
Member 2837615 wrote: Can you please tell me about “attrib C:\test +s +h”. both attrib simultaneously.
You will need to write it in two statements; specifying the attributes you want.
|
|
|
|
|
Read up on how to use the SetAtributes method. A quick google search shows how to use a combination of attributes in one method call.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The Class of Process is used to execute the command of DOS.
This class provide a Filed to set attrib.
|
|
|
|
|
Hi to all,
I need to read bitmap file which is basically scanned sheet like answers sheet.
So tell me if anyone knows.
Its urgent.
|
|
|
|
|
krinaljariwala wrote: I need to read bitmap file which is basically scanned sheet like answers sheet
Do you want to read it as image or extract the text from it?
If latter is the case, this should work:
FileStream fs = File.OpenRead("Holiday.bmp");
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
MemoryStream ms = new MemoryStream(data);
Bitmap bmp = new Bitmap(ms);
|
|
|
|
|
Hi,
i have tried this but i have scanned an answer sheet of entrance test exam paper, n stored as image file so i want to read at which answer's line its option is selected.The image includes options like you have to choose one answer from 4.So i want find which option is selected.
|
|
|
|
|
studying would probably be easier, but you're going to need some kind of really cool OCR or image recog software, i've seen some articles on CP about it but cant remember what i was looking for at the time, i think one compared the color data of each pixel to try to find patterns, it may have even been looking for things that were circled. handwriting recognition software may help too.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Manas Bhardwaj wrote: If latter is the case, this should work:
former, not latter.
|
|
|
|
|
Hi I want to write a program to forward incoming tcp connections on port 22 on my computer to another address on the network (which happens to be 192.168.37.20) on the same port 22. Does anyone have any suggestion how I can do this?
|
|
|
|
|
NAT
why must it be a program?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
I need to write a simple windows service that will automatically forward connections on port 22 (SSH) to the other address. And i have found no easy way to do this in windows, nor have i found a freeware program that can be installed as a system service
|
|
|
|
|
there is a way to do this that is built into windows as far as i know... its called NAT or Network Address Translation
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
but isn't NAT part of a server version of windows afaik? If not do you have any idea how to set it up on win xp pro?
|
|
|
|
|
i havnt a clue on how to do it on a pc, i just know that you can...
but ive done it on a router before... are the 2 pc's on a LAN or connecting though the internet?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
It is on a lan. The router is configured to forward port 22 to my computer which is running windows. However, i am running coLinux on the system and it is connected to a virtual network device. Therefore port 22 (SSH) is forwarded to windows by the router, which in turn needs to be forwarded by windows to the coLinux system which resides at 192.168.37.20
|
|
|
|
|
VrIgHtEr wrote: Does anyone have any suggestion how I can do this?
Maybe you could start here?[^]
led mike
|
|
|
|
|
Hello
I am developing a new control based upon a button. In fact it is based upon code for a splitter button I found here.
So far I have updated the class so that multiple images can be assigned to the button. Each time the button is clicked the next image in the list is displayed. If there are no more images left it wraps around to the start. So far all good.
What I am trying to accomplish now is updating the image in response to a user selection on the context menu accessed by clicking the black triangle.
I want this to be automatic within the control. i.e. I don't want to catch the event in the form and handle it that way.
However im not sure how to do this within the control. I tried putting an event handler for the OnContextMenuStripChanged event in the controls code but it never gets called.
Hope that makes sense, any ideas?
Cheers
Rich
|
|
|
|
|
kildareflare,
You need to override the event.
protected override void OnContextMenuChanged(EventArgs e)
{
base.OnContextMenuChanged(e);
}
Make sure when overriding methods, that you always call the base method as well.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
When I try to connect to the Database using C# I get an error that says(provider is not supported or the DataAccessLayer could not be loaded)
I am connecting to Sql Server 2005 using C# 2008.
|
|
|
|
|
mphumeleli wrote: When I try to connect to the Database using C#
Make sure you are using the correct ConnectionString...
|
|
|
|
|
mphumeleli wrote: When I try to connect to the Database using C# I get an error that says(provider is not supported or the DataAccessLayer could not be loaded)
How are you trying to connect to the database. Show us the code.
|
|
|
|
|
Use a more meaningful subject line, please.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|