Jump to content
Xtreme .Net Talk

coldfusion244

Avatar/Signature
  • Posts

    269
  • Joined

  • Last visited

Everything posted by coldfusion244

  1. While we are on the subject of communication to ports... Anyone know how to enumerate USB devices? sending data and calculating the CRC?
  2. TPG, if you aren't using asynchronous methods or threads, then it will stop on that statement and wait until someone does connect. Are you using it and it still stops there?
  3. Figured it out... Seems as though everyone on this forum (xtremedotnettalk) only does vb... almost as no one does C++ anymore... oh well... Anyway the answer was that I had to make my callback static and take out the EnumWindows declaration from my class.
  4. There is no 'Split' function in VC++. You can use MFC and get CString's which have more functionallity than Strings which should help you out more. But, you can go for the easy approach and just loop until you find a ',', set the index and do a substring. then you could attempt to cast it to an integer/double/etc after that, don't know how well it'll work.
  5. I am actually waiting to see if they change the amount of pins... and some other fun stuff.
  6. You have to take into account chipset, disk access, etc. You can't just say I have a motherboard, he has a motherboard, etc etc. While programs in the backround are annoying and most of the time useless (weatherbug, msn messenger, etc) they also take up processor cycles and ram. Not to mention disk access if they are saving or reading anything from the disk. I can't wait to build by rig with the NCQ and see how much disk performance goes up!
  7. lol, I am a member of a php board and you wouldn't believe how many times the answer was "you forgot the second equals sign bud."
  8. As a user of VB6 I am in concurrance with realolman. What used to be so simple to do in vb6 now takes 15 extra lines of code in .net. I also find the namespaces a PITA. I do however like the OOP and inheritence. Some things are just easier to do in vb6 (not to mention that the programs ran faster). I also found, however, that some things are easier to do in .net. All in all, I don't necessarily like the changes in .net (I loved my activex controls :)) but it will help professional coders. Being a hobbyist, I really don't benefit from it since I have to basically re-learn the language. Learning API was hard enough for me, now I have to ditch it and learn all the namespaces and classes. I found myself bookmarking the msdn page (yikes!). I have to consistantly look for help from these forums to get anywhere. Some things I have been able to do by myself, for instance accessing the registry, writing and reading to files, but there are other things that just have me stumped. I have finally decided to drop vb.net and C# and just go with C++. I figure if i'm going to be confused and be a newbie, I might as well use a language that I can at least (minus the .NET part of it) use on windows and linux/unix machines. I also use C++ and x86 assembler as well as learning the assembler for the motorola 68000 series for school, so it helps in that aspect as well. But all in all, I might not like the change that was made for .NET but it's a necessary evil in order to move ahead. As for the msdn documentation... it is sketchy at best and rarely provides newbies like me simple clear examples to learn from (if there is an example at all!). I have bought books for .NET but haven't been able to find a good one that is a beginner -> advanced one. I don't care if it's 3,000 pages, but I'm tired of reading books and getting the next one in the series only to think to myself "ugh, this isn't intermediate, it a beginner's with 2 chapters of new information.". Then I had a book that I sold because I opened it up and the first remedial chapter that was suppost to "refresh" my memory, I had no clue what was going on. I think for such a big change they should have really done something better with msdn.
  9. I am moving from C# and VB to C++. I am attempting to make a project that enumerates all of the open windows, returns the handle of the window, the captions and the class of the window. The problem I am running into is, it says that it connot convert ENUMWNDPROC to BOOL. In all of the examples it compiles, but if I just even try copy and paste it doesn't work for me. I must have something wrong but I am not sure. I have attached my code and hopefully someone will say "Hey sean, you're stupid just do this!". I just don't understand which setting i need to have :confused: . Thanks guys! cEngine.zip
  10. Adding on top of diverdan's code... If ListBox1.SelectedIndex >= 0 Then Dim value() As String Dim a,b,c as Integer Dim values As String = ListBox1.SelectedItem value = values.Split(",") a = int.parse(value(0)) b = int.parse(value(1)) c = int.parse(value(2)) End If Forgive me, but I don't have VS on this computer, nor do I program in VB, but that should work. You are just going to take the string value that you have from splitting the values and use int to parse it to an actual integer(since you only gave integer values in your examples, i assumed they will always be integers).
  11. [CS]textbox.SelectionStart = textbox.Text.Length; textbox.ScrollToCaret();[/CS]
  12. You can also choose which fields you want returned as well. No sense in grabbing every field if all you need is their address. Anyway, here is a list of MySQL commands.. should come in handy. http://dev.mysql.com/doc/mysql/en/
  13. hmm, 384 should be enough, depends on your OS and what you have running,etc. But I have 1.5 Gb of memory on my work/leisure pc and I normally have a good bit of stuff running, media player, internet explorer windows, etc, etc.. running an AMD64 3200+, so unless your using 384 with a 1.7 Ghz Celeron (bah) using stock installation of windows xp on a 4200 rpm drive that has 1% disk space left, you really shouldn't have a problem. VS really doesn't use that much memory on my pc... I would look to other applications running in the backround to be the culprit.
  14. That's correct for 100 Mike; pick the next catagorey.
  15. I come from a backround using mostly API, and now in .NET there seems to be a class that has the same function. However, my question is, is my previous assumtion true? Is there no need for API? I am asking this because I am a hobbyist and thought of a cute little program, I need to get every open window handle (visible or not) and the only way I know of doing this is with API and a callback function. If the case is that there is a .NET class for most/all coresponding API, then is there a good C++ .NET reference book like there was for the WIN32 API [i love that book!] ? Second question. MS is coming ouut with VS 2005. I have read that there is a good amount of changes to the classes, i.e. some are gone or replaced, others have slight changes or have been depreciated. Would it be better to delve into 2003 and then 2005 or stick with generic C++ [i.e. no windows programming, compiles on linux/windows] and wait for 2005?
  16. Actually I find MSDN quite useful sometimes :). Mostly because i'm a .NET newbie and don't know all the built in classes yet... It really does help though, when I am looking and I type in collection (like we had in vb6) and I find that there is a collection class, but to get any use out of it you have to derive a class from it. there has been countless times i've just typed in for example "Sockets" and looked at the sockets class, or compile errors... So it does have it's uses even though half of the documentation looks like it's missing a huge chunk of text and arbitrarily stops at some points...
  17. Hmm, most of my VB6 code was API, I guess that is a bad thing? I really didn't know of any other way to add icons to menu items without subclassing everything, or when working with bitmaps or metafiles, lots of good api for that... Also enumerating windows... Must just be me :(
  18. When you receive the data, instead of loading it into memory, just the file, seek to the end and add the data (or I guess append mode would work). Now if you are receiving the data in a non-contiguous manner (i.e. byte 1 is followed by byte 6 followed by byte 3) then I would suggest creating a file of the correct size and making it blank. Then when the data comes in, find which part of the file it is, seek to it and replace the data. Hope this helps, I will try to write some code for you but I am not currently on a machine with .NET.
  19. If all you wanted is to add both of those items into a listbox then... [CS]listbox.items.add("Temp"); listbox.items.add("Permanent");[/CS] If that's not what you wanted then I don't understand your question.
  20. Thanks nerseus, I would love to tell you what I want to do with the language, but I am unsure myself. I mostly program for fun, and thus only make something when I want to help myself out, or if I really want something done. Lately I have been attempting networking lately and also a good bit of data manipulation, for example, reader headers of mpeg's, avi's, working with bitmaps, etc. I am not stupid when it comes to C++/C#, but I'm by no means near advanced. Most of the programs I create are for myself and other admins in multiplayer games that I play [i write a good bit of PHP and mysql]. Right now I am still attempting to write something close to TeamSpeakOverlay, and possibly get into directx/opengl. So, I really write a broad range of programs, but I want to become advanced in one certain language, and have worked with VB, C# an ASM, I find C++ to be the most fun (I must be crazy) and that's why I really want to learn it well (Plus it's really close to php[so hopefully will help in that area as well!]).
  21. I am not sure how to do it with html, but with javascript it's: <script language="Javascript"> <!-- window.moveTo(0,0) window.resizeTo(screen.width,screen.height) //--> </script>
  22. Basically like Dill said override the OnPaint event, then invalidate it to remove the last square then draw the square.
  23. Sometimes though, it's better to have control over memory.
  24. Yeah, I have started C#, the problem is that in C# you can't use pointers :eek: Well, you can but it has to be an intrinsic variable type. I have done C++ before when I had to integrate ASM into C++ code, and I have done C++ in VS 6.0. I also write PHP alot which is very close syntactically like C++ (infact when I write some things in VB.NET I use Switch instead of select case :p ). I also find both VB.NET and C#.NET SLOW, I don't know if it's just me, but when I make the same thing in C++ as I do in C#, it just seems to be slower in C#. I will however say this, C# rocks when it comes to ASP.NET. I dabbled in ASP.NET and wrote the code in C#, worked very well! But as I mostly write PHP, this didn't last very long. My problem is I know a little bit about a ton of different languages and not alot about one single language. Thus I figured since I've used ASM and C++ before, I'd start with it and once I understood C++, I would be able to use any other language because the advanced concepts would be there. I was looking around and found some books put out by Microsoft, has anyone used these? Are they any good or should I go a different route? I also don't know where I am in terms of ability. I think that I would be beginner, but whenever I get beginner books it seems so dull and boring and I end up finishing the book with very little new knowledge. However I can't find intermediate books, as most are just supplimentary beginner books. Ugh. So any suggestions on C++ books?
  25. Hey guys, I just program (in .NET, I use MASM for school/work)for fun and when the time comes, useful item that make my day to day life easier (for now). I have some spare time between school and work and I wanted to learn .NET to gain added efficiency as most of my code comes from VB6 (API, etc). I want to see what you guys think of some books to learn .NET. I want to focus my study on C++, have any suggestions? Should I wait for .NET 2005? Should I start with plain C and work my way to C++? Any advice on some books, or maybe online classes (?) would be good. :D Thanks!
×
×
  • Create New...