Search Results

Showing results 1 to 40 of 132
Search took 0.02 seconds.
Search: Posts Made By: scru ; Forum: C# and child forums
Forum: C# Jan 19th, 2009
Replies: 9
Views: 2,352
Posted By scru
If you are running on .NET 3, you can use Lists, which are very easy:


List<String> strings = new List<String>(); //initialise the list
strings.Add(str); //Add an item
int length =...
Forum: C# Oct 20th, 2008
Replies: 6
Views: 601
Posted By scru
Is that your entire code file? You don't seem to have neither a namespace nor a class defined, both of which are needed.
Forum: C# Oct 19th, 2008
Replies: 4
Views: 480
Posted By scru
Have you tried:


public class Child : Parent
Forum: C# Oct 13th, 2008
Replies: 2
Views: 570
Posted By scru
If you're running C# 3.0, you can use this shorthand for the properties; just add {get; set;} after each declaration and so you can totally remove the extra code below:

using System;
using...
Forum: C# Oct 9th, 2008
Replies: 3
Views: 1,640
Posted By scru
I'm not a noob.

I've looked on msdn but found nothing. Searching google, I've been able to determine how to get bitmaps from screen, and send bitmaps to the screen. This is not what I want. I need...
Forum: C# Oct 9th, 2008
Replies: 3
Views: 1,640
Posted By scru
How can I get and set the rgb value of a specific pixel on screen using C#?
Forum: C# Oct 6th, 2008
Replies: 2
Views: 959
Posted By scru
What you mean stores in sample.xml? Their binary data, or just the file names?
Forum: C# Oct 6th, 2008
Replies: 7
Views: 3,426
Posted By scru
Yeh what LizR said, only let me break it down more:

The File.Copy method doesn't want a destination directory, it wants a destination file. So you have to do this in the loop:


string...
Forum: C# Oct 6th, 2008
Replies: 7
Views: 3,426
Posted By scru
These Classes in the System.IO Namespace will help:

Directory
File

Specifically, you need:


Directory.GetFiles("Z:\\", "*.bak");
Forum: C# Sep 20th, 2008
Replies: 4
Views: 3,387
Posted By scru
LizR is right. More simply put you can define a single method like this:


public void test(int a){...}
public void test(int a, int b){...}


At run time you can call test with whichever set...
Forum: C# Aug 15th, 2008
Replies: 2
Views: 546
Posted By scru
Imo stepping into an advanced API such as Direct X for something so simple is overkill. What you need is to learn how to use sockets well.
Forum: C# Aug 15th, 2008
Replies: 9
Views: 909
Posted By scru
If you have an ASP.NET server, then create a service with a set of methods for you application that the client will call, so the "valuable" code will be stored on the server.

My point is, once the...
Forum: C# May 28th, 2008
Replies: 1
Views: 1,140
Posted By scru
I have one that seems to be hard to find info on (with good reason).

I want to hook into Firefox and IE and detect when a user inputs a password and username, prompt the user, and then get that...
Forum: C# May 12th, 2008
Replies: 1
Views: 473
Posted By scru
Forum: C# May 7th, 2008
Replies: 1
Views: 2,931
Posted By scru
Double precision is more precise than float, and performance really shouldn't be an issue on today's computers. Just thought I'd mention that.

As to your question; usually when i get a problem...
Forum: C# May 6th, 2008
Replies: 1
Views: 984
Posted By scru
Project -> Properties

Select your choice from the target framework dropdownbox
Forum: C# May 6th, 2008
Replies: 7
Views: 710
Posted By scru
Rule of thumb for submitting new threads.

Re-read your new post before submitting, but pretend that you are reading it for the first time.
Does it make sense to you?

Pretend that you know...
Forum: C# May 1st, 2008
Replies: 4
Views: 542
Posted By scru
that is the current position of the character you are reading in the string.
Forum: C# Apr 29th, 2008
Replies: 4
Views: 542
Posted By scru
woops, that variable needs to start at 1, so its

int errLine= 1;
Forum: C# Apr 29th, 2008
Replies: 4
Views: 542
Posted By scru
simple actually.
Assuming you are parsing the text file character by character, set a variable to zero first, and increment it whenever you hit a newline indicator.

Here is the C# code:


int...
Forum: C# Apr 29th, 2008
Replies: 3
Views: 1,895
Posted By scru
That's a design decision that you have to make. Do you skip over those internal tags, do you complain to the user, or do you return the text as is?
Forum: C# Apr 29th, 2008
Replies: 2
Views: 547
Posted By scru
I dont know how, but I just want to remind you to back-up
Forum: C# Apr 29th, 2008
Replies: 3
Views: 1,895
Posted By scru
psuedocode time!


assuming tag opener is "<" and tag closer is ">" and wanted tag is [any tag you want to read the contents of]
Read every character as 'c':
if c is tag opener:
read d...
Forum: C# Apr 19th, 2008
Replies: 4
Views: 1,293
Posted By scru
What the original poster needs is WPF (Windows Presentation Foundation) that is built into .NET 3.0.

Setting transparency of a control is as simple and easy as Opacity = 0.6 or something similar....
Forum: C# Apr 10th, 2008
Replies: 10
Views: 1,125
Posted By scru
I agree with Jerry. Use the built in settings. It's pretty simple to use if you haven't got the time to code your own parsing methods.

As for registry, it's best not to store settings for your...
Forum: C# Mar 21st, 2008
Replies: 2
Views: 787
Posted By scru
Pointers? C#? C# is garbage collected. Don't use them.
Forum: C# Mar 18th, 2008
Replies: 2
Views: 3,897
Posted By scru
Without even bothering to question you about your motives, I shall get right to it:

The measures you will need to take may vary from site to site, and I for one do not know which methods this site...
Forum: C# Mar 6th, 2008
Replies: 2
Views: 1,956
Posted By scru
Application.Exit()
Forum: C# Mar 4th, 2008
Replies: 8
Views: 8,442
Posted By scru
Button[] btnArr = new Button[COUNT]; //count is the amount of buttons this array can hold.

//Add/Change a button:
btnArr[indx] = IAmButton; //indx is the position, IAmButton is the button you are...
Forum: C# Feb 20th, 2008
Replies: 1
Views: 1,109
Posted By scru
I'm sure the SharpZipLib has some included documentation. If it doesn't, you're probably better using another one.
Forum: C# Feb 20th, 2008
Replies: 2
Views: 1,959
Posted By scru
Windows Media SDK. But that will only give you things like length, width, height etc.

EDIT: If you want a lib to read jpg image metadata, I have an easy to use one that I will gladly share with...
Forum: C# Feb 18th, 2008
Replies: 3
Views: 2,463
Posted By scru
An easy way would be to sort the word alphabetically in the text box, then loop through each line on the text file and sort it (after removing the newline character of course). If you have a match,...
Forum: C# Feb 9th, 2008
Replies: 9
Views: 4,127
Posted By scru
I have finally given up and decided that I can't get it to work on the Frame Control. However, I'm doing it on every Page control that goes inside the frame (by setting the handler to an external...
Forum: C# Feb 7th, 2008
Replies: 9
Views: 4,127
Posted By scru
Not my intention to be rude or ungrateful, but I'm confused as to how that link helps me. It doesn't say anything about getting Drag/Drop events firing on frames (they have fired on every other...
Forum: C# Feb 7th, 2008
Replies: 9
Views: 4,127
Posted By scru
DragEnter, DragLeave, DragOver and Drop events do not work for the frame element in WPF.
Forum: C# Feb 6th, 2008
Replies: 9
Views: 4,127
Posted By scru
Is there something wrong with the Frame Element that prevents these events from firing (AllowDrop is set to true)?
Forum: C# Jan 28th, 2008
Replies: 7
Views: 831
Posted By scru
Thanks! Now off to rip off your idea and sell it on ebay for an extra kidney.

Honestly, sounds like an interesting thing to code. My guess is that it shouldn't be *that* hard. Here's to hoping you...
Forum: C# Jan 27th, 2008
Replies: 8
Views: 1,778
Posted By scru
Just unzip it and double click FirdayCounter.sln. Visual studio will open it. That appear to be a version 8 file (2005)
Forum: C# Jan 26th, 2008
Replies: 3
Views: 5,085
Posted By scru
I have the honor of welcoming you to Daniweb :). That said:

Your problem is that C# strong types its boolean values. A True in C# is not equal to 1, as a false is not equal to 0. Might I suggest...
Forum: C# Jan 24th, 2008
Replies: 9
Views: 1,795
Posted By scru
See this thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=148907&SiteID=1

Sorry I kept leading you around in circles.
Showing results 1 to 40 of 132

 


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

©2003 - 2009 DaniWeb® LLC