|
Then retreive the values using the index in the order you would like
only two letters away from being an asset
|
|
|
|
|
Hello
string[] MyArray = {"Wes","Josh","Dave"};
private void Rearrange(byte OldIndex, byte NewIndex)
{
string Temp = MyArray[OldIndex];
MyArray[OldIndex] = MyArray[NewIndex];
MyArray[NewIndex] = Temp;
}
Regards
|
|
|
|
|
Hi,
In SQL Server Everywhere, there is no support for keyword "TOP" for selecting
limited number of rows. Can you give me any idea how can I perform similar task with this limitation ?
Thanks in advance
|
|
|
|
|
Perhaps it would be better to ask this question in the SQL forum
only two letters away from being an asset
|
|
|
|
|
Hi,
I have Form A who is the MDI container, Form B and Form C children. Now, In order to call a method
of parent MDI Container from Form B, I have a delegate which trigger event in Form A (MDI Container) and Form A call a Background worker of Form C as
response of that event (Event Handler). Now while the background worker is working, can I close the calling child form (Form A) ? I was wondering, Do I need
to keep Form B active for the whole time when background worker is busy in Form C ?
Regards
|
|
|
|
|
Note the difference between the Windows Form object and the window it actually has opened. You could close the window, while keeping the form object alive. I think now you know what to do.
Best,
Jun
|
|
|
|
|
Hi Jun,
I got it from your clue..
Thank you very much for giving me the clue exactly in the right manner.
Regards
|
|
|
|
|
I am trying ot run this programm from a windows form application but at command line it stops with message:
"Reading passphrase from file descriptor 0 ..." and nothing happens.
Same program run fine on command line with follwoing line:
C:\Program Files\GNU\GnuPG>gpg --passphrase-fd 0 < c:\gnupg\passphrase.txt -o c:\HIF\Clock.swf -d c:\gnupg\Clock.gpg
This is a command to decrypt the file using GnuPG encryption and decryption program.
Any help is most welcome.
Code Snippet:
string strArg = @" --passphrase-fd 0 < c:\gnupg\passphrase.txt -o c:\HIF\Clock.swf -d c:\gnupg\abc.gpg";
process.StartInfo.FileName = @"C:\Program Files\GNU\GnuPG\gpg"; OR "gpg"
process.StartInfo.Arguments = strArg;
process.StartInfo.RedirectStandardInput = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.UseShellExecute = false;
try
{
process.Start();
process.WaitForExit(5000);
string str = process.StandardOutput.ReadToEnd();
}
catch(Exception ex)
{
string str = ex.Source + ex.Message + ex.StackTrace;
}
Bharat Gadhia
In life, failures teach you as much as — or perhaps more than — successes.
Thank you very much for the help.
|
|
|
|
|
process.WaitForExit(5000);
The first question I would have is, is this enough time for the process to complete? Have you tried to increase the timeout, or not use it at all?
only two letters away from being an asset
|
|
|
|
|
Thank you.
yes I have done that too. I increased time to 40000 but after process exits the cmd screen still shows
Reading passphrase from file descriptor 0 ...
and it waits there till one hits manually enter button and then it comes out and at
string str = process.StandardOutput.ReadToEnd();
value of str string is empty.
So it seems that same command which reads passphrase.txt and passes to passphrase in command line operation does not do the same in windows form application.
By the way there was a small mistake in strArg value, It is as follows:
string strArg = @" --passphrase-fd 0 < c:\gnupg\passphrase.txt -o c:\HIF\Clock.swf -d c:\gnupg\Clock.gpg";
Bharat.
In life, failures teach you as much as — or perhaps more than — successes.
Thank you very much for the help.
|
|
|
|
|
Try reversing the calls
string str = process.StandardOutput.ReadToEnd();
process.WaitForExit(5000);
rather than
process.WaitForExit(5000);
string str = process.StandardOutput.ReadToEnd();
only two letters away from being an asset
|
|
|
|
|
Thank you.
I did that but the cmd screen waits with followong message at the call to the function process.StandardOutput.ReadToEnd()
Reading passphrase from file descriptor 0 ...
Bharat.
In life, failures teach you as much as — or perhaps more than — successes.
Thank you very much for the help.
|
|
|
|
|
please tell me if there is a way to run my project in c#.net 2005 on Linux platform
i heard about grasshopper and mono
1--> which one is better
2--> what i should do to make that happen
(any intigration with visual studio.net or recompile the code)
|
|
|
|
|
Use Mono
You can first try to compile it on both Windows and Linux. If it compiles and runs on Windows, check if it compiles and properly runs on Linux, too.
The mcs compiler is for .NET 1.1 and the gmcs for .NET 2.0 as far as I remember
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thanks Greeeg
you seem to have a better knowledge of the topic will you please mind to put some more information so that everybody reading this get the benefit
|
|
|
|
|
There are already some articles on this site that explain it very well. Just type "Mono" into the search box at the top.
Here are two vey good ones:
Number 1
Number 2
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Hello. Is there any way to read one by one the pixels that contains a Graphics class and know his color? And I can replace these color to other different?
Thanks.
|
|
|
|
|
Yes, Bitmap.GetPixel/SetPixel methods.
Best,
Jun
|
|
|
|
|
But how I can convert the Graphics class into a Bitmap class?
|
|
|
|
|
A graphic doesn't contain any pixel information per se. It's a Brush , Image or Bitmap that holds some pixels
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Yes, I need to replace the white pixel that appears in a Graphics class of a Print event, and I can´t create a Bitmap class.
|
|
|
|
|
This is what I see could be done:
1) Create and maintain a Bitmap object as the drawing buffer (canvas)
2) Construct a Graphics object from the Bitmap (optional)
3) Use that Graphics object to draw to the Bitmap (optional)
4) Change the colors of pixels to the Bitmap
5) Finally, use the Graphics object from the PaintEventArgs to draw the Bitmap to the screen
Hope this helps.
Best,
Jun
|
|
|
|
|
If you have a Bitmap-Object, then you can use GetPixel() and SetPixel() .
But both are very slow if you plan to use it on many pixels.
Use LockBits() and UnlockBits instead.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
please go through articles posted by
'Andrew Kirillov'
they cover a whole lot of the things
|
|
|
|