|
Hi:
Thanks for your help. I tried your suggestion but I came across the same problem. It seems like the MouseUp event that I'm using may not be the best event to use in this case. It seems like it is obtaining the row value prior to the actual sort of the datagrid values.
Do you know of any event that I can implement to notify me when a change has occurred in a cell/row value (not change in row index)??
|
|
|
|
|
Use the datagrid.Refresh() function...
|
|
|
|
|
can somebody show me how to link two table and save it as view
using sqldmo
|
|
|
|
|
hi to all,
witch reference do i have to add to see the flexgrid and hierarcical flexgrid control in my toolbox
best regards and thanks in advance
fady
|
|
|
|
|
Flexgrid last shipped with Visual Studio 6 (old school). It doesn't ship with VS.NET (same deal for heirarchical flexgrid, I think). If you want to write apps with it you have to fork out for the license for VS6, install the old VS on your dev machine with VS.NET and access the controls using interop.
I miss it too. So lightweight. So easy to code against...
Sean
|
|
|
|
|
i want to add a dll which have two function one is for reading data from the parallel port and one is for writing data to parallel port using c#.
how i will use this dll and call its function please tell me.......
|
|
|
|
|
open a new project
select class
type in your code
make sure the functions are public class
bulid ths solution
save the project
close the project
open your project
use the Using to call the dll
like
using projectdll;
create a reference type like
project.Adddate mydate=new project.adddate
you can now use the instatiated object
mydate.adding(rttr,teert);
if it returns a string
declear a string reference type
s=mydate.adding(rttr,teert);
|
|
|
|
|
|
I am starting as novice in C# express beta 2 and would like to learn how to manipulate database files ie *.dbf files.
Amending, adding and outputting as a new dbf file (in ODBC)
Can anyone supply me some code with instructions.
thanks
BS
|
|
|
|
|
Is there any way to paint on a browser control? Can't use .CreateGraphics() because it doesn't have that function, so I was just wondering if anyone knew how to do this some other way? Any invalidation or something? Please help...thanks!
|
|
|
|
|
Hi all !
I have build a remoting server as a simple application using a WinForm to show messages.
The WinForm program starts a serverprogram, that registers a RemotableObject to be run in singleCall mode. The Server has an event (taking a string var) which the WinForm registers a method to, so that a RichTextBox in the WinForm will show any text from the stringvar on the event.
The RemotableObject on its side, has a static event which the server (abovementioned) registrs a method (on itself) to, just delegating the incomming event (from the remotableObject) on to the WinForm by firing its own even, thus sending the incomming text to the Winforms registered medthod.
That is: every time anything interesting happens on the remotableObject it fires the event, which the server has registered to - and receiving the text from the remotable object the server "sends" it to the WinForm (by firing its own event, which the WinForm has registered to) thus displaying the text from the remotable object in its RichTextBox control.
If I run some program, using the remotableObjects methods, everything works fine the first couple of times, but then the WinForm program crashes with a NullPointer error (actually the debugger traces this to happen just after the Application.Run statement starting the WinForm)
If then I replace the RichTextBox display with a Console.Writeline of the exact same text (at the exact same place, as the winform displays the text in the RichTextBox) I can go on and on without any errors, getting everything displayed in the console output.
Any ideas about why the RichTextBox causes the crashing ???
TIA
|
|
|
|
|
Hi!
Unspecific crashes/exceptions often occur because of threading problems.
Could it be that you're updating the RichTextBox from a different thread that it was created on?
Try using Invoke or BeginInvoke to call a delegate for setting the text and see if your app still crashes.
Regards,
mav
|
|
|
|
|
Thanx mav.
Considered that, and must admit that treading is not exactly my strong side (a bit new to .NET)
I will try to follow your sugestion, but it still puzzles me that everything is started from the server WinFom and also that the replacing of the RichTextBox with the Console.Writeline trick, makes the code work.
But then again, I guess that the remote-call (from some client-app) to the remotable object makes the whole scenario a bit more complex in terms of thredaing, so although the serverproces and the WinForm runs in the same thread (the one started by the other, that is) I couldn't really tell which thread holds the actual invocation of the remotable ???
Coming to to think of this, actually makes it a lot more complicated, than at the first glance ?
Could you (or anyne else) perhaps lead me to some source of understanding this issue better ?
TIA
|
|
|
|
|
Hi all !
Found the solution - it's just like mav said: use a delegate.
For further information read this article which explains everything nicely: http://www.codeproject.com/csharp/remotinggui.asp
|
|
|
|
|
Why would you do the following rather than writting this code without the try block?
<br />
try<br />
{<br />
}<br />
catch(Exception excep)<br />
{<br />
throw;<br />
}<br />
This is in a utility function so the idea is to handle the exception in the code that calls this function. Why would you write a try catch here instead of just letting the code throw the exception?
Example: here[^]
// TODO: Write code.
|
|
|
|
|
The only reason I can think is that at some latter point error handling code is to be put here, but for the time being the exception is just being thrown to the next callee in the stack.
|
|
|
|
|
You would do this if you needed to perform some form of cleanup that is only required if an error occures but don't want to swallow the exception at that point in the code. Catching and then immediately re-throwing without doing anything else serves no purpose though.
|
|
|
|
|
I tried to add a certificate to the store using WSE (Web Service Enhancement) with the following code fragment ...
X509Certificate certFromFileOriginal = X509Certificate.CreateCertFromFile(@"C:\Keys\CertServerCA.cer");
X509CertificateStore store = X509CertificateStore.CurrentUserStore(X509CertificateStore.MyStore);
store.Open();
int certPos = store.Certificates.Add(certFromFileOriginal);
store.Close();
There was no error thrown. But the certificate did not get added to the store when I checked in the MMC. In fact it did not get added to the certificate collection of the store (which can be viewed by putting store.Certificates in the watch). However the existing certificates showed up.
I tried with store.Certificates.Insert(2, certFromFileOriginal ); and got the same problem.
.NET developer
|
|
|
|
|
my code is compiling but giving linking error when i try to print any document.
techno
|
|
|
|
|
intractive wrote:
giving linking error
And that would be? Please supply the EXACT error message, the line it's on, and the code snippet that has the problem. Using only the description you've given, which wasn't much, the problem could be caused by anything.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
How can I check if Form1.ProjectName object exist?
Is there InstanceOf method, or something like that?
Thank you.
|
|
|
|
|
You have not mentioned what the type of the ProjectName property is, but going by name I assume it is a String. Strings are nullable so you can just check it for null.
MyForm myForm = new MyForm();
if(myForm.ProjectName == null)
{
}
|
|
|
|
|
Thank you very much
I already figured that out.
Thanks
|
|
|
|
|
Hi I'm having a little problem with .NET Regex. I'm using Regex to find included javascript and CSS files in a HTML page and want to put their content directly to my page (because I'm disabling some JS methods for security).
Here's my non working code:
<br />
string html = "content of the webpage";<br />
String jsFilePattern = "(?<firstpart><script\\s* [\\w \\s = \" ' / \\. & ?]+) src=\" (?<jsurl> [\\w \\s = \" ' / \\. & ?]+) [\" '] (?<lastpart> [\\w \\s = \" ' / \\. & ?]+>) ";<br />
Regex r = new Regex(jsFilePattern, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.IgnoreWhitespace);<br />
html = rReplace(html, "${firstpart} ${lastpart}" + ReadFromFile("${jsurl}"));
You don't need to debug the pattern for me because I've tested it and it works. My problem is when I call the function ReadFromFile (witch reads data from a file and returns it's contents as a string) from the Regex the content of the parameter ${jsurl} is not put in the function but the parametername instead (${jsurl}. This results in an error from my ReadFromFile funtion. It seems like Regex puts the contents of it's parameters afterwards.
Is there another way to do this?... Can I use my precious Regex pattern somehow to collect the $jsurl parts into an array or something??
Thans for reading this far
Hrannar
|
|
|
|
|
Strange pattern... You have a lot of superflous spaces in your character sets, and everywhere in the pattern. And I suppose that the set [" '] should be ["'] to only match those two characters, and not space. And shouldn't you have that set on both sides of the value for the src attribute?
Tip: You can use @ in front of strings to disable all escape sequences:
String jsFilePattern = @"(?<script\s*[\w\s=""' \.&?]+)="" src="[""'](?" [\w\s="" '="" \.&?]+)[""'](?[\w\s="" \.&?]+="">)";
Of course the Regex puts the contents of all it's parameters afterwards. It can't very well put them in there before you call the Replace method.
Use the Matches method to get a collection of matches.
---
b { font-weight: normal; }
|
|
|
|