|
Dear all,
I am new to C# programming and I need some guide on this problem. I am using MicroSoft Visual Studios 2005 C#.
I am given a task where i have to use the detections(in byte) received by the serial port, to
store them into points and appear on the interface form.
I need to:
1) use ReadByte Method to receive a single byte at a time from the serial port and to give a unique initial to the received byte detections by the HS0038B receiver. The detections must be categorised as X1 and Y1.
2)Create an ArrayList to store the bytes when the function ReadByte receive single byte.
Can anyone provide me with a small workable codes?
Thank you very much
|
|
|
|
|
I want to move a file with the following function but i get UnathorizedAccessException thrown. What could be the problem. When i try to move it to My Documents, it works just fine, only when i move it to the C Drive it throws the Exception mentioned. I'm really stuck.
private void MoveFile()
{
string fileName = "myFile.txt";
FileInfo fInfo = new FileInfo(fileName);
fInfo.MoveTo(@"C:\"+fileName);
MessageBox.Show("Done");
}
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Have you got Admin rights on the box? Sounds pretty much to me like you don't have access to c:\
Can you manually move a file there in explorer?
Regards,
Rob Philpott.
|
|
|
|
|
When i move a file in C, i get a pop up saying Destination Folder Access Denied, then asks me to provide administrators permission. I click on Continue to get permission. Then i get permission and the file is moved. Is there a way my program can make such permission requests? What is the best way to go about this?
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Well, security isn't really my thing, but your problem is clear enough.
First off, can you move the file somewhere other than root?
If not, you can fiddle around with the folder security on it and make sure the account you're using has full access to it.
And, if its that stupid UAC vista thing, I'd consider turning it off completely if you can. It's most annoying.
Regards,
Rob Philpott.
|
|
|
|
|
I think i have to deal with UAC !! Thanks
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
You can't copy anything to the C drive unless it's to the application data folder.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Its all because of UAC, google to run application as Administrator, vista will ask for the permission.
Actually, you are supposed to use the personal folder(My documents/App folder), in that case you will not face such problem.
|
|
|
|
|
I said that, but in a lot fewer words.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi all,
I have created a user control.
Now i am adding that user control in other application.
I added the reference of the dll, but i can't see the user control in my toolbox.
Am i missing something?
Thanks,
Nagendra.
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:14am.
|
|
|
|
|
User Control is not visible in the Choose ToolBox Items Menu.
|
|
|
|
|
I got it worked.
|
|
|
|
|
Hi
If i covert any .Net component as COM component using tlbimp.exe then to use that library do i need .Net framework in the target environment?
|
|
|
|
|
satsumatable wrote: tlbimp.exe
I guess you mean tlbexp.exe.
There are only 10 types of people in this world — those who understand binary, and those who don't. |
modified on Thursday, December 31, 2009 2:01 AM
|
|
|
|
|
You are right .. I'm Sorry for the typo.
|
|
|
|
|
Go though this awesome article. Does not answer your question but is a good read for com interop.
There are only 10 types of people in this world — those who understand binary, and those who don't. |
modified on Thursday, December 31, 2009 3:53 AM
|
|
|
|
|
Hi, when uploading a image to a server, I get error saying directory not found. I am guessing its because its trying to find a path of users computer path in server and failing. in my localhost this works fine. how can i modify below code so that below line
System.Drawing.Image.FromFile(System.IO.Path.GetFullPath(flUpload.PostedFile.FileName))
maps to server. is there anyway i can get it working before actually uploading the original image to the server? thank you
using (System.Drawing.Image Img = System.Drawing.Image.FromFile(System.IO.Path.GetFullPath(flUpload.PostedFile.FileName)))
{
Size ThumbNailSize = NewImageSize(Img.Height, Img.Width, 100);
Size ImageSize = NewImageSize(Img.Height, Img.Width, 500);
using (System.Drawing.Image ImgThnail = new Bitmap(Img, ThumbNailSize.Width, ThumbNailSize.Height))
{
ImgThnail.Save(ImageThumbPath, Img.RawFormat);
ImgThnail.Dispose();
}
using (System.Drawing.Image Img1 = new Bitmap(Img, ImageSize.Width, ImageSize.Height))
{
Img1.Save(ImagePath, Img.RawFormat);
Img1.Dispose();
}
Img.Dispose();
}
|
|
|
|
|
Check this link : http://forums.asp.net/t/1079883.aspx[^]
Note: Please post the questions related to asp.net in the correct forum.
"Never put off until run time what you can do at compile time."
- David Gries, in "Compiler Construction for Digital Computers", circa 1969.
|
|
|
|
|
Is code specifically for Windows 7 (through the win7 SDK) ignored if executed on a pre-windows 7 OS? or do you have to do OS version checks before calling any of it? or will it just not run at all?
|
|
|
|
|
You don't have to do anything unless you start using functions that are specific to Windows 7. The Windows SDK is cumulative, meaning that each revision builds on the last one to add support for features in the new O/S. It does NOT mean that the SDK is specific to that version of Windows.
If you're going to use functions that only work on Windows 7, then you've going to have to include code that checks to see if it is running on Windows 7 before it uses those functions.
|
|
|
|
|
Hi im pretty new to programming so any help would be greatly appreciated.
I am trying to create an application that has the following features:
contains two texboxes labeled Formula Name: and Formula Number:
Contains a spreadsheet with 2 columns
Selections from a List Box
Able to total the quantity of the elements in the formula
Being able to print what is typed into the form Spreadsheet, Formula Name, Formula Number
Create a save feature
create an open feature
create a sort A-Z feature
I know how to put the objects in the form but I need help with coding. Any help would be greatly appreciated.
Sincerely,
Steven
|
|
|
|
|
Take help from a C# book (or do a google search) to start writing some code. When you run into any trouble paste your code here and people may be able to guide you.
There are only 10 types of people in this world — those who understand binary, and those who don't. |
|
|
|
|
|
Sound like Excel. Can you not achieve this with Microsoft Excel and macros or other spreadsheet app.
Please confirm if Excel is available to you. A C# solution to this could use VSTO(Visual Studio Tools for Office) api
|
|
|
|
|
yes i have excel but i'm trying to make a simpler program for my friend that has just the basic things that he needs. When he tries typing formulas on excel he becomes overwhelmed for some reason so i'm just trying to help him out.
|
|
|
|