|
Yep, my fault. Sorry. Hope you got it working!
|
|
|
|
|
Hello every one,
well I've encountered a really weird eror in datagridview here. I'm workin in C# 2.0 windows form application and there is a dgv(datagridview) on it that is attached to a view..I added an unbound column in it to take the quantity from the user. Now when I get the value of quantity from a cell of that column I get a null when I put 1 in that cell where is its always the correct value whenever its not 1. Can any buddy plz tell me whats happening here. I receive the correct value when its 0, 2, 3 4 ... but its a null when its 1... What should I do.. is it a bug in VS or what??
thanks in advance
Rocky
|
|
|
|
|
can u post ur code to give an idea what u r doin
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
well I sorted out that wrror by making a new column with a different name and I deleted that column but it was weird u know...
|
|
|
|
|
How are you attaching it to the view, through a bindingsource or just saying DGV.DataSource=theView; Also, how are you trying to access the value of the cell?
|
|
|
|
|
I attached it through a binding source but now the problem is solved as I just deleted that column and made a new one with a different name. I bound the datagrid with the usual procedure of using a datasource u know but I still dont know what happened there but its working fine now. thank God..
thanks alot!
Rocky
|
|
|
|
|
Does anybody have an idea about autoscalling?
the problem i have is with changing the screen resolution. When screen resolution changes the controls get messed up. I tried using the anchor and dock properties for the user controls and the panels. some worked and some not. Don't ask me why cause i don't know. i made the same changes for all but some worked and some didn't. i made some search to find an alternative way for using the dock and anchor properties and i found that i can use the autoscalling.
i don't know how to use and i can't find any sample code or sample project that teach me how to use it. so if anybody have an idea about it, that would be very helpfull.
thanks in advance.
|
|
|
|
|
how can i log into a site using my application?.
i mean, how do i send the data (as in www.site.com/login.asp?user=bla&pass=bla);
i tried several options and failed, please help me
|
|
|
|
|
I'm sorry, but this question is a bit vague. Do you mean, how do you start a web page from a desktop application? If you do, then use the following:
Process.Start("www.site.com/login.asp?user=bla&pass=bla");
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
no, i want to retrieve details from a website but you have to be logged in to be able to see them, so i want to log in and then get the details..
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
actually it's nothing even close to what i wanted <_<
i just want to login to a site using my prog...as in www.site.com/login.asp?user=sharpie&pass=sharpie
...
|
|
|
|
|
sharpiesharpie wrote: actually it's nothing even close to what i wanted
Your previous message (i want to retrieve details from a website but you have to be logged in to be able to see them, so i want to log in and then get the details..) seems to imply that you want to (a) programatically login to your website and (b) retrieve the information that's presented to the user (upon a successful login). If that is indeed what you meant, you could use the WebResourceProvider class to do that.
If not, you may want to consider rephrasing your question or providing more detail.
/ravi
|
|
|
|
|
umm, yes, that's about it, but isn't there a way to do it with managed ( and built in library ) code? as in sending a httpwebrequest or something similar?
|
|
|
|
|
sharpiesharpie wrote: isn't there a way to do it with managed (and built in library) code?
The article I pointed you to is managed code.
/ravi
|
|
|
|
|
Hi all,
I have a question about encrypting string data with the RSACryptoServiceProvider class.
Look at the following C# code example:
<br />
string target = "String to be encrypted ... ";<br />
<br />
int kLength = 128;
<br />
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(kLength * 8);<br />
UTF8Encoding enc = new UTF8Encoding();<br />
<br />
byte[] bytesTmp1 = enc.GetBytes(target);<br />
byte[] encrypted = rsa.Encrypt(bytesTmp1, false);<br />
string encString = Convert.ToBase64String(encrypted);<br />
<br />
At rsa.Encrypt(), I get a CryptographicException with the message "unspecified error". This error only occurs, if the string size is greater than the size of the key, which is used in the RSA CSP. For example: If the key size is 128 byte and the string length ist greater than 117 bytes, the error occurs. With shorter strings (for example 117 bytes or less), no error is been thrown.
The limit is at kLength - 10, longer strings will provoke the exception.
What am I doing wrong? How can I solve this problem? In my application, strings can have any size, there is no limit. The RSA CSP must be able to encrypt every strings, independent of its size.
I'm happy about any idea, which could help me solving this.
Greetings
|
|
|
|
|
Can someone please post a small/simple working example of doing a callback in Managed C++?
Basically, I have a MC++ windows form client, and an unmanaged C++ DLL (which I wrote). I have a function in MC++ client that needs to get fired by the DLL as it "loops" thru records (it's basically looking to see if a
<stop> button click has fired in the client). I've found several different C#-client examples on CodeProject and CodeGuru (and have read MSDN docs on delegates, as well as chapters in several books dealing with P/Invoke), but can't seem to find a simple example of doing a callback with MC++ (using DllImport) and a C++ DLL. I've tried to duplicate
the C# examples in MC++, but can't seem to find a ombination that compiles & works.
I've been doing C++ for many years (on the Borland side), but am a relative "rookie" with .NET (and MC++) -- thus, part of the reason why the syntax and the process is not clicking in my brain (yet <g> ).
Thanks in advance...
A Ansari
|
|
|
|
|
Sounds like a MC++ question, not a C# one.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Seems like he accidentally posted twice in the C# forum instead of cross posting in the C++ forum...
---
Year happy = new Year(2007);
|
|
|
|
|
Can someone please post a small/simple working example of doing a callback in Managed C++?
Basically, I have a MC++ windows form client, and an unmanaged C++ DLL (which I wrote). I have a function in MC++ client that needs to get fired by the DLL as it "loops" thru records (it's basically looking to see if a
<stop> button click has fired in the client). I've found several different C#-client examples on CodeProject and CodeGuru (and have read MSDN docs on delegates, as well as chapters in several books dealing with P/Invoke), but can't seem to find a simple example of doing a callback with MC++ (using DllImport) and a C++ DLL. I've tried to duplicate
the C# examples in MC++, but can't seem to find a ombination that compiles & works.
I've been doing C++ for many years (on the Borland side), but am a relative "rookie" with .NET (and MC++) -- thus, part of the reason why the syntax and the process is not clicking in my brain (yet <g> ).
Thanks in advance...
|
|
|
|
|
Wrong forum, try "(Managed) C++/CLI"
|
|
|
|
|
Hi all,
I am now developing a program which can get data from third party device with using serial port.I am facing 2 problem.
1)I am using serial port which provide by .NET. But in the properties i cant find LinkerPort(the device which i communicate to have linker port). So,how can i add in this properties?
2)In my situation,i need to get 3 group of string buffer and will assign them to different string object(example A,B,C). I am refer to the example at code project (title : Serial communication in .NET 2.0).i need to do these action at the same time(in real time).My question is how can i get the 3 string buffer at the same time(possible?) and how to recognize them whether the first string buffer is belonging to object A and so on..
any hits are welcome,
thanks in advance
cocoonwls
|
|
|
|
|
Hello all,
First time post...so go easy on me
Here is what my problem is with the BackgroundWorker:
I have a list of files that I would like to go through and manipulate in the background, the problem I am having is how do I recover if one of those files has an error in it?
What I mean by recover is instead of raising an error, I would like to store the error in some list and move on to the next file and then when all the files are done I would like to write to a text box the files that had an error..Would I handle this in BackgroundWorkers RunWorkerCompleted? Because this is where an error goes when it occurs in the DoWork method. Basically after an error how can I get back into my for or while loop that iterates over the remaining files..starting at the next file...
Thanks
Alan
|
|
|
|
|
Use a try-catch-block inside your DoWork method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Wow...Holy crap I never thought of that.....I was reading this article http://www.developerdotstar.com/community/node/671/print and it said not to use a try/catch block with the backgroundworker....but I just realized....they meant "Around the backgroundworker" not in the doWork method....Wow....Thank You
|
|
|
|