- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 115
- Posts with Upvotes
- 101
- Upvoting Members
- 68
- Downvotes Received
- 18
- Posts with Downvotes
- 14
- Downvoting Members
- 18
23 year old software developer from Edmonton, Alberta. Right now I am developing embedded FPGA, PLC, and real time OS systems that integrate with .Net (C# and VB.Net) applications for monitoring,recording, and control.
- Interests
- Guitar, Weed, and Learning
- PC Specs
- Hardware changes too fast for me to bother keeping up.
624 Posted Topics
When working with TCP client sockets I often find myself frustrated with the lack of event-driven support. I usually end up writing a whole bunch of code to determine disconnects, reconnecting, etc and I figuired it's time to just write my own class for this stuff. I figuired I'd share … | |
Re: Hardest? Probably the game I made in college. It used a client and a server, a database on the server for storing instant replays which where pushed out after kills (similar to call of duty), and direct 3d. Believe it or not, the hardest part of the whole thing was … | |
Re: It is kind of a headache. I have called C# written dlls in vb6 a few times via com interop. A lot of overhead involved - really lowers overall performance. Plus you need to add a bunch of attributes to your classes and create a seemingly pointless interface that your … | |
Re: [QUOTE=Narue;1703267]That seems kind of silly to me. The point of a checksum is to verify the legitimacy of a file after downloading it. If you're getting the checksum before downloading the file it's no different from taking on faith that the file is legit in the first place.[/QUOTE] Would make … | |
Re: I don't think any native windows console commands support sockets. So making a multi-player game in batch is going to be impossible. I suppose it could be possible to create a file on a shared path on a network, then use batch to read the file and display the scores/etc … | |
Re: Wouldn't this allow the user to enter "....." as a number? I wonder how efficient this would be: [code] private void MyTextbox_KeyPress(object sender, KeyPressEventArgs e) { int aDouble = 0; // Check for the flag being set in the KeyDown event. if (double.TryParse(MyTextBox.Text + e.KeyChar, out aDouble)) MyTextbox.Tag = aDouble; … | |
Re: Are you asking us to do this for you? Or did you have a question? People on this site won't typically do your homework for you. | |
Re: You can't expect your code to do things you don't tell it to do. If you need to remember things, it will need to be saved to some form of media. The simplest form of this would be a textfile. Google reading/writing from textfiles in c#, use your knowledge of … | |
Re: Looks like the internet continues to get cluttered with absolute rubish. | |
Re: The only way to prevent someone from reverse engineering your code is to [B]not give them your program[/B]. This might sound like an oxymoron, but it really isn't. Think about client/server apps - the client only knows its inputs and outputs and not [B]how the inputs got transformed into the … | |
Re: [QUOTE=sknake;989676]Open up visual studio, slap that code in to a form, and hit F5.[/QUOTE] There's no designer code so it won't be that simple... | |
Re: The return statement will not be called if the first if() statement fails (ie the Read() returns false) One way to solve this is to put return ""; at the end (after con.close()) Note that con.close() is not being called if the name is read, since return is called which … | |
| |
Re: Do you know anything about the System.IO.StreamReader class? | |
Re: It's pretty bad practise to simply serialize everything in a class, whether related to the data you want or not. Not only can it be highly inefficient, you can run into issues with 3rd party libs that don't play nicely with the .net object binary serializer (especially interops). Using a … | |
Re: Does your biometric hardware come with an API? Hard to just start telling you how to use something that we know nothing about ;) | |
Re: Hard to say. What controls are you using? Any events you think may be suspect, or low level hooks? If you kill DWM.exe (Aero) does it still happen? | |
Re: It sounds like you are asking homework questions to an assignment that you don't understand. Sounds like you have made all your classes - so are you having troubles implementing them into an application? | |
Re: [This](http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/05dc2d35-1d45-4837-8e16-562ee919da85) looks like a good place to start. | |
Re: What kind of reports are you generating? HTML? Crystal? Some formats will be easier to work with than others for something like this... | |
Re: Your question doesn't really make a whole lot of sense but I'll take a stab at it. You are asking how to represent Async communication, I think. Seeing as C# is an object oriented language, you will need to represent it as an object (a class) as well. | |
Re: In the DogChorus constructor you are initializing a bunch of members with the same names as the Dog class (which are all private except for Breed) that aren't actually members of the DogChorus class. Perhaps you mean to have 2 objects of type Dog in this class called lady and … | |
Re: Latency is the amount of time it physically takes your data to arrive at your destination - it's based mostly on distance, optimum routing and hardware that must be passed through. The speed is based off of your bandwidth - basically how much your ISP is lending you and can … | |
Re: You are not instantiating a new button into memory. Try using Button newBtn = new Button(); //Set attributes from XML here myForm.Controls.Add(newBtn); | |
Re: Which SendKeys are you using? Is it the .Net wrapper or a WIN32 API call? Have you tried running it as administrator? | |
Re: If you are looking in a special folder you can use the SpecialFolder enumerator to make sure you get the path right everytime: Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) There's quite a few other special folders to note that are represented by that enumerator. | |
Re: This has nothing to do with C#, and everything to do with Active Directory for Windows Server 2003/2008. If you go to 'Server Manager', go to **Roles->Active Directory Domain Services->your.domain.name->Users** you will see a list of users and groups, and when you double click a user and go to the … | |
Re: There's really a lot of ways to do this. One option would be to use an event that other forms can subscribe to: //In form two public partial class Form2 : Form { public class MyFormEventArgs : EventArgs { public string SomeData { get; set; } public MyFormEventArgs(string data) { … | |
Re: If you have a deep wallet, [DevExpress](http://www.devexpress.com/) has some outstanding control suites that I use quite regularly at work. If you don't want to spend any money, you will either have to write them yourself or find a really nice person who has done your work for you. Let us … | |
Re: License keys, online product validation and server-driven content. Oh and code [obfuscation](http://en.wikipedia.org/wiki/Obfuscation_(software)). | |
Re: Try using the Let keyword to create a temp datetime. var views = from vc in dbContext.ViewCounts let tempDate = new DateTime(vc.Time.Year, vc.Time.Month, vc.Time.Day) where vc.Time >= dateFrom && vc.Time <= dateTo group vc by new { catalogueId = vc.Catalogue_Id, day=tempDate } into vc2... I haven't tested it but I … | |
Re: I've noticed that same problem before, too. But I don't think you rational behind why it occurs makes sense - how fast or how slow the threads fire shouldn't have an impact on the argument passed to the dowork() method. I think it's a bug with the way annonymous delegates … | |
Re: You are assigning all of your values to the same index in the 2d array, and I don't think it needs 3 columns. Putting aside the errors, I think this is the logic you are after: [code] Random rand = new Random(); for (int i = 0; i < 10; … | |
Re: So your sepecific problem is creating these controls at runtime? If that's the case: private void CreateImageButton(Rectangle bounds, string text, Image image) { Button btn = new Button(); btn.Bounds = bounds; btn.Text = text; btn.Image = image; this.Controls.Add(btn); } This will create a button with the given location and size … | |
Re: Generally using a polling timer is to check for events like this is not a good idea. It will consume more CPU than using events or window messages and has a delay period in between each update. Also, even though your timer is set to a very fast firing 10ms … | |
Re: You are giving 4 of the parameters the same name. Without a doubt this will cause problems - I think you meant to increment each one but stopped at @Val3. Since you are creating this command and only running it once, you don't really need to use parameters, just a … ![]() | |
Re: Not that it really matters, but 'global' methods and members are typically frowned upon in an OOP environment since they inherently have no associated object (instanceless) thus delving away from the object oriented nature. Having said that, feel free to ignore the norm and do what works best for you … | |
Re: You seem to have 'Method Overloading' confused with the term 'Method Overriding'. Overloading is using the same method within a class with different return types or argument types. Method overriding is used with polymorphism to allow different functionality to be achieved in derived classes than in the parent class. | |
Re: I use MySQL at work for this kind of thing. You can do a database restore from a self contained file to load in the data. Note that for large databases this can take a while. | |
Re: How about a list of linked list, where each linked list contains each significant vector position required to satisfy a condition. | |
| |
Re: There's 2 ways to do this. 1 would be to hook IE directly by injecting code into it and knowing what you are monitoring (basically would have to know how IE works inside which I unfortunately can't help you with). This would be pretty troublesome and complicated so I recommend … | |
Re: I would make the group-box with the radio buttons into a custom user control, then give it a property "IsAnswered" or something similar public bool IsAnswered { get { return (this.Controls.OfType<RadioButton>().Any(x => x.Checked)); } } //Then in the main form, in your validation function (or event or whatever) btnNext.Enabled = … | |
Re: I think primitives like int and string as keywords opposed to classes were added to keep C++ programmers happy and porting code less tedious. | |
Re: Do you just want to simulate the result of a click (ie calling the click event handler)? Or did you want to automate the click (ie the mouse move onscreen and visually depresses the button)? The first one is by far easier than the second one, but both are possible. | |
Re: If you want them to write to the same log file you will have to syncronize the two applications such that neither of them try to access the same resources simultaneosly. An easy class for cross-process syncronization is the [System.Threading.Mutex class](http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx). Note you will have to use a named mutex, … | |
Re: So....do you understand how threads, threadpools, or background workers work? Do you understand file IO and parsing? Or do you just want us to do the project for you (lol)? | |
Re: Hmmm, since this is for your final project you would think that these topics were probably gone through during the semester at some point. Also, you already started a thread for this - why not just tack this on the end of it rather than creating a new one? | |
Re: If you have any sort of control over the database, maybe putting images in a different table and having a default image if the user has/doesn't have an image uploaded is a good idea. You can link to it with a foreign key to link employees with their images and … | |
Re: Basically the problem is - if no username/password match is found in the table, no value gets returned. |
The End.