|
Look at Assembly.Load method.
|
|
|
|
|
This is my question, lets say that i have a picture, his resolution is 1600*1200,, and i want to know the RGB number of the pixel 100*100 (for example), and by the RGB number i mean the Red, Green and Blue number that are combined to make a custom color.
Note:
If it is posible, i can use other method, the important thing is that i need to be able to compare one pixel color whit other pixels colors.
This is because i am currently making a robot that is able to follow lines, for this i am currently using a PIC(Programable chip), but since this just works whit a crappy line of white tape on the floor and this robot is already using a labtop to work, it will make muck more sence to use a cam, and stop using that crappy tape, and it will make much more sence to use signboards to extend is functionality.
Any help will be very apreciated
|
|
|
|
|
Hi,
the Bitmap class is intended for holding images. It has a GetPixel(x,y) method that
returns the Color of a single pixel. The Color struct has properties Red, Green, Blue.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
tanks works great, i have already google this but i tink i remember why i dont use it, it was because when i crate a bitmap:
Bitmap bmp = new Bitmap(@"C:\1.jpg");
the "Bitmap" was pointed like a namespace not a type, however i remenber someting similar so i put it like:
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(@"C:\1.jpg");
I have spend some time looking for the source of this, but seems to be an internal error.
tanks fot the help work great.
|
|
|
|
|
You're welcome.
BTW: you can omit the "System.Drawing." stuff if you put a using System.Drawing;
near the top of your source file.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
How would i change the contents in a read only text box from another form button.
My parent window has a read only text box on the top, a button that opens another form asking which item *4 buttons*
I would like the information in the read only text box to be changed when the user clicks on the certain button, how would i do this?
-- modified at 21:04 Thursday 1st November, 2007
|
|
|
|
|
If you are using the VB.net please make a global variable in module
and on the button click's event set the value in that global variable.
And on the other form's load event please write
textbox1.text=basic.Myvar.ToString();
Regards
Pankaj Joshi
|
|
|
|
|
HI,
i've ceated a new Component and i like to compile it to a DLL
HOW?
THNKS
Have Fun
Never forget it
|
|
|
|
|
Create a class library project and put your code into it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i tried it but
when i compile it it screams :
"A project with an output Type of class library cannot be started directly"
WHAT am i missing ???
THBKS
Have Fun
Never forget it
|
|
|
|
|
Forget About My Last Q
i'm an IDIOT
SORRY
Have Fun
Never forget it
|
|
|
|
|
HI,
I like to know if there is an DLL with the DataGridView extensions
That i can use (free - open source(yeh i know it's a DLL))
did anyone devloped one here cause i didnt found
and all i find using google is a trail version to buy later
any suggestion, idea????
THNKS
Have Fun
Never forget it
|
|
|
|
|
Hi,
You may try ComponentOne's Studio Enterprise for .Net 2007. It is a complete visual development package which contains two grid controls as well (C1FlexGrid and C1TrueDBGrid). These two grid controls has rich set of properties and method to help developers in developing exclusive .Net applications.
You may download the evaluation version from http://www.componentone.com/Downloadcenter.aspx[^]
for better understand you may see the samples at http://helpcentral.componentone.com/samples.aspx[^]
If you find it suitable for you then you can get the license easily.
I hope this helps.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Hello,
thanks in advance for your attention.
I'm delving into application registration for the first time. I've figured out my approach in regards to handling registration, in no small part based on Heath Stewart's great article (http://www.codeproject.com/csharp/ComputerID.asp).
Yet I'm faced with a problem: I wish to allow the user a 90 day trial period of the application. Beyond those 90 days, only a registration option will be available. Now, I need to store a "application installation date" value somewhere locally, as I don't wish to rely on an available Internet connection. But where do I store this, so that the user cannot effortlessly simply uninstall and reinstall the application for a further 90 days trial? I reckon the registry is the place to hide this, but does anyone have a safe tip on exactly where to put it, so it won't interfere with other applications on the machine?
Like I said, thank you in advance.
Morten,
Denmark
-- modified at 18:33 Thursday 1st November, 2007
|
|
|
|
|
The sad fact is, the only way you can achieve this is to be anti social. You need to hide the data so that the user can't find it.
I never use the registry, I would put a file in the system32 folder, and name it something starting with MS so it looks official, something like MSVWML.DLL. Then store your date in there, but not as plain text, you don't want anyone to be able to modify it in notepad.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: put a file in the system32 folder, and name it something starting with MS so it looks official, something like MSVWML.DLL
That works fine. Most people fall for it.
|
|
|
|
|
Christian Graus wrote: something like MSVWML.DLL
my system32 is full of that crap. How did you get access to my machine?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you all.
Best,
Morten
|
|
|
|
|
how should I debug this error which says "Input string was not in a correct format"
Here is the code:
private void frmLogin_Load(object sender, EventArgs e)
{
this.Visible = false;
if (FWFAddin.userid == "")
{
FWFAddin.FWFAppSettings fwfreg = new FWFAddin.FWFAppSettings();
long dtNow = DateTime.Now.Ticks;
long dtThen = long.Parse(fwfreg.LoginTime()); //I get an error here
long dtFinal = dtNow - dtThen;
if (dtFinal > 36000000000)
|
|
|
|
|
Insert the following before the parse attempt.
string testString = fwfreg.LoginTime().ToString();
Then set a breakpoint.
You can also use TryParse , which catches the exception internally for you and returns true or false.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
What does fwfreg.LonginTime() return? What does the string look like there?
|
|
|
|
|
Hy!
I want to play with WPF but I can't.
I have installed .NET Framework 3.0 and Visual Studio 2005.
What I need to install to learn WPF?
I hear about an ORCAS extension and a Windows SDK but I don't know where I fount these.
thx
|
|
|
|
|
|
Hi,
I'd like to develop a simple Windows application in which I have a rich text box (on which I have a tight control) and a version management system handling the files I'm editing, so that I dont modify my original text file, and I can come back to a previous version.
Like I want to integrate the check in and check out in the editor, but I want to give the editor some features I dont find in standard editors (for my private needs).
Is C# the wrong language for this? Like I've invested a lot of time learning it,
it would libraries to handle this would be written in C++ but
I'd rather avoid the complexities of C++.
|
|
|
|
|
Hi,
I did my own IDE in C#. It includes a full featured text editor, which is not based on
a RichTextBox, instead I use my own data structures and paint everything to a Panel myself.
This allows me to implement all the things I want without being hindered by the peculiarities (shortcomings?) of an RTB. An RTB is not very good at handling large files for one. And
I have seen many posts struggling with syntax coloring; I do mine inside the Paint handler,
just coloring the part that is visible. This works just fine, supporting a whole set of
languages.
I did not interface to a version management system yet, but that can't be very difficult.
Conclusion: I did all this once in Java, later on a repeated and extended it in C#.
These are the only languages I would want to do it in right now!
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|