Search Results

Showing results 1 to 40 of 45
Search took 0.01 seconds.
Search: Posts Made By: _r0ckbaer
Forum: C# May 4th, 2008
Replies: 6
Views: 3,819
Posted By _r0ckbaer
Yes, because you must use the window handle of the Application:

theprocess.MainWindowHandle

use that one...
Forum: C# Apr 27th, 2008
Replies: 8
Views: 1,934
Posted By _r0ckbaer
Here:


RegistryKey subKeys = HKCU.OpenSubKey("Software\\VB and VBA Program Settings\\Company\\", true);
Forum: C# Mar 1st, 2008
Replies: 7
Views: 2,804
Posted By _r0ckbaer
What?:D That timer is certainly NOT out of class.


That's completely wrong. What do you think methods like Control.BeginInvoke() are there for? It's absolutely possible to use UI controls in a...
Forum: C# Nov 29th, 2007
Replies: 5
Views: 1,259
Posted By _r0ckbaer
Try to correct that one by yourself, the answer is right there in the code, have a look at how i handle the other case (it's exactly the same), we're not here to chew you every piece in advance...
Forum: C# Nov 25th, 2007
Replies: 5
Views: 1,259
Posted By _r0ckbaer
Here is corrected source:


using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
Forum: C# Nov 17th, 2007
Replies: 1
Views: 4,600
Posted By _r0ckbaer
There are overloads for that method,
have a look here : http://msdn2.microsoft.com/en-us/library/wcxyzt4d.aspx

should be the one you need
Forum: C# Nov 6th, 2007
Replies: 8
Views: 5,877
Posted By _r0ckbaer
That is of course only in case FieldName is of type string
Forum: C# Nov 5th, 2007
Replies: 8
Views: 5,877
Posted By _r0ckbaer
The short-circuit is working right, however your code is not, a short-circuit evaluation should be written like this :


if ((cr.FieldName == null) || (cr.FieldName.Length == 0))
...
Forum: C# Nov 4th, 2007
Replies: 8
Views: 5,877
Posted By _r0ckbaer
So basically you think c# doesn't support short-circuit evaluation ?
Have a look here: http://msdn2.microsoft.com/en-us/library/2a723cdk(VS.71).aspx

@iamthwee: Those kind of answers are not very...
Forum: C# Oct 10th, 2007
Replies: 1
Views: 2,119
Posted By _r0ckbaer
Try this:

string[] lines = Regex.Split(s, "(.+?)(\\*{0,13}RECIVED MAIL)\\s*(PQR.+)(New PQR.+)(Respond.+)");
Forum: C# Sep 25th, 2007
Replies: 12
Views: 10,156
Posted By _r0ckbaer
Just for the gallery, see first part of code in my previous post:


string format = "MM.dd.yyyy HH:mm:ss";
lines.Sort(new Comparison<string>(delegate(string a, string b)
...
Forum: C# Sep 25th, 2007
Replies: 12
Views: 10,156
Posted By _r0ckbaer
When you catch the exception you should output its message, and not "blabla..is not a valid image file". That way you'll be able to identify what's going wrong.
Forum: C# Sep 19th, 2007
Replies: 2
Solved: Subdirectorys
Views: 1,226
Posted By _r0ckbaer
This is usually done with recursion:

void Fetch (string SourceString)
{
arrayCount = 0;
DirectoryInfo di = new DirectoryInfo(SourceString);

...
Forum: C# Sep 13th, 2007
Replies: 12
Views: 10,156
Posted By _r0ckbaer
Hi, if every line starts with the date, this should do the trick:

List<string> lines = new List<string>();
using (StreamReader r = new StreamReader(new...
Forum: C# Sep 12th, 2007
Replies: 2
Views: 3,388
Posted By _r0ckbaer
What i don't understand in your code is that you first format the DateTime to a string and then you construct another DateTime object from that same string; is that step absolutely necessary? By...
Forum: C# May 7th, 2007
Replies: 4
Views: 5,349
Posted By _r0ckbaer
Have a look at http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.openremotebasekey.aspx
Forum: C# Apr 10th, 2007
Replies: 2
Views: 7,903
Posted By _r0ckbaer
You can do something like this:

if (st.ToLower().Contains(data.ToLower()))
Forum: C# Apr 2nd, 2007
Replies: 1
Views: 2,369
Posted By _r0ckbaer
http://msdn2.microsoft.com/en-us/library/ms180903(VS.80).aspx
Forum: C# Mar 23rd, 2007
Replies: 9
Views: 5,887
Posted By _r0ckbaer
It's possible that your custom RandomNumberGen class is not seeded properly, where is the seed set?
Forum: C# Mar 17th, 2007
Replies: 1
Views: 16,374
Posted By _r0ckbaer
This is because you instantiate the stringbuilder object via

strbuild = new StringBuilder();

in the loop, you have to instantiate it outside when you first declare it

StreamReader reader =...
Forum: C# Jan 20th, 2007
Replies: 7
Views: 5,071
Posted By _r0ckbaer
This is because you call ToString on type string instead of long.

Make sure your code looks like this:

long num = 4445556666;
string s = num.ToString("(###)-###-####");
Forum: C# Jan 9th, 2007
Replies: 5
Views: 2,294
Posted By _r0ckbaer
I would do this via regex, here's some example:


static void Main(string[] args)
{
const string theRegexString = "quote\\.jsp\\?symbol=([^=>]+)\\s*>";
Regex regex = new...
Forum: C# Jan 6th, 2007
Replies: 5
Views: 2,294
Posted By _r0ckbaer
It's waiting for the user to press the ENTER key here, so it stops
Forum: C# Dec 16th, 2006
Replies: 9
Views: 3,905
Posted By _r0ckbaer
Ok, i think it should be quicker now, i introduced some cryptor class with own progressbarupdatehandler. There's still some work for you to do though, mainly the way how you get the filepaths from...
Forum: C# Dec 15th, 2006
Replies: 9
Views: 3,905
Posted By _r0ckbaer
It would help us if you would paste use the complete source code, otherwise it's hard to recreate your problem (and eventually help you).
Forum: C# Sep 5th, 2006
Replies: 3
Views: 3,284
Posted By _r0ckbaer
have a look at that:
http://msdn2.microsoft.com/en-us/library/system.threading.waithandle.aspx
Forum: C# Jun 14th, 2006
Replies: 1
Views: 4,269
Posted By _r0ckbaer
I don't see where you actually declared your delegate ?

somewhere in the namespace put this:

public delegate void ProcessingCompleteDelegate();


also to fire an event you usually do it like...
Forum: C# Apr 27th, 2006
Replies: 1
Views: 2,424
Posted By _r0ckbaer
What about having a look at Convert.ToBase64String and Convert.FromBase64String ?
Forum: C# Apr 17th, 2006
Replies: 7
Views: 3,438
Posted By _r0ckbaer
Yes, and to populate the int array of the Arrays class you could either pass an int array in the ctor of the Arrays class or expose a setter via the MyArray property.
Forum: C# Apr 16th, 2006
Replies: 7
Views: 3,438
Posted By _r0ckbaer
Hi, i don't know exactly what you want to do there, but if you want only to make your int array public by a property you could do this in your class:

public int[] MyArray
{
get
{
return...
Forum: C++ Apr 12th, 2006
Replies: 4
Views: 2,445
Posted By _r0ckbaer
try this solution:

bool SortBylength(const string& a, const string& b)
{
if (b.length() > a.length())
{
return true;
}

return false;
Forum: C# Apr 6th, 2006
Replies: 10
Views: 5,878
Posted By _r0ckbaer
Refining tayspen's example a bit ( i hope he doesn't mind):

private bool IsNumeric(string input)
{
bool isNum = true;
try
{
int.Parse(input);...
Forum: C# Apr 5th, 2006
Replies: 10
Views: 5,878
Posted By _r0ckbaer
Or just put that code into a try/catch block and output the error message or a custom message
Forum: C# Mar 30th, 2006
Replies: 2
Views: 3,309
Posted By _r0ckbaer
// generate exception
catch (DivideByZeroException e)
{
// handle exception
}
Forum: C# Mar 11th, 2006
Replies: 13
Views: 18,498
Posted By _r0ckbaer
http://www.codeproject.com/csharp/highperformancetimercshar.asp
Forum: C# Jan 28th, 2006
Replies: 4
Views: 3,126
Posted By _r0ckbaer
well, to make registry access read only you could log into your windows without admin rights :P
another thing maybe would be to store that data in a file and fiddle with the security rights of it...
Forum: C# Jan 12th, 2006
Replies: 9
Views: 19,614
Posted By _r0ckbaer
\s+ is a regular expression, the \s means to consider whitespaces and the + means to consider at least 1 occurence or more of them
Forum: C# Jan 11th, 2006
Replies: 21
Views: 11,880
Posted By _r0ckbaer
Forum: C# Jan 11th, 2006
Replies: 9
Views: 19,614
Posted By _r0ckbaer
string [] split = System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);

split is already a string array
Forum: C# Jan 9th, 2006
Replies: 9
Views: 19,614
Posted By _r0ckbaer
StreamReader objInput = new StreamReader("C:\\values.dat", System.Text.Encoding.Default);
string contents = objInput.ReadToEnd().Trim();
string [] split =...
Showing results 1 to 40 of 45

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC