Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Namespaces were mainly made so there was no conflicts with the names of the object. But they provide great organization too, for example lets say you dont know the name of some class but you know it should be in System.IO becuase it does something with a file, you look through that namespace instead of all 3500 classess. You dont really need them for small projects, but iff it gets bigger it can be a lot of help.
  2. I think they should make one for MySQL fast, it popular and widely used. And I was just reading some interesting arctile about MySQL getting a big money boost from joining some big German developer business, to provide databases for their costumers. Future looks bright for MySQL :).
  3. Ok, what your were doing is creating all those object all the time, which is not needed, and setting region in every paint. Look at this modified file, I hope it helps :) form1.vb
  4. The easiest and probably the best way would be to pass your form's instance in a constructor. Then you can manipulate the form and its controls.
  5. To simulate a mouse click use the SendInput API. More info: http://www.mentalis.org/apilist/SendInput.shtml The example is in VB6 but very easy to convert to .NET.
  6. I personally think Game Programming forum is a good idea. :)
  7. I copied and pasted your color changing code, not a single sign of flicker. I cant try the whole thing as you took out that array.
  8. Use: System.IO.File.Delete("pathtofile")
  9. I tried to do something similar with 12 pictureboxes, randomly changing color in a 20millisecond timer. No flicker at all. I dont think I can help you more without seeing more of your code :).
  10. How fast are you changing the backgrounds? PictureBoxes are not recommended for something that changes fast as they are slow.
  11. That should be all good except there is no IntializeComponent sub in there, which you dont need. So remove the call to it. :)
  12. Im not sure if im understanding you right :) , but I thinnk you are in need of an event handler. To add one dynamically do this: AddHandler ControlName(counterorwhateveryouuse).GotFocus, AddressOf handlersub Your handler sub must accept arguments that correspond to the event. Then you check what control sent it with the sender argument. Again, I might totally off on this, so tell me if im talking about what you wanted to know :) .
  13. It should be there like PlausiblyDamp said, right click your project, select properties, on the left there is a treeview with options, there should be one that Configuration Properties, expand that, and then expand one that says linker, then click on Advanced on the expanded list. And there should be an Import Library option on the right.
  14. It looks like the DLLs are not registered, use the RegSrv32 tool. Put your DLLs in System32 dir and go to command prompt. Type in: regsrv32 dllname That should help you.
  15. What do you mean without success? :) Is there any error or it just doesnt make anything better? As for the control, to do what I said, make a new class, inherit it from the control you want to use, then in the constructor of the control use: SetStyle(DoubleBuffer,true) SetStyle(AllPaintingInWMPAINT,true) Then instead of using the default control from the toolbox use your own control that you inherited.
  16. VS.NET IDE is a great place to create XML files :)
  17. Is that dirUp or dirLeft is supposed to do? Use the KeyDown event on your form to capture keys, then check what key was pressed like this: If e.KeyCode = Keys.Left Then 'for example if you want 'to check if left arrow was pressed. And you also have to change the coordinates of your ellipse, right now you are drawing in the same place all the time, (10,10). Make those two values a variable, and increase it or decrease it when someone presses a button and then refresh your form.
  18. Both VB.NET and C# can access the same class library, and they both compile to the same thing. Its only a matter of which syntax you choose.
  19. Make your Tekenbal sub accept PaintEventArgs, not draw item event args. Dont use Me.CreateGraphics.smoothingmode. Use e.Graphics.SmoothingMode, after you pass in the paint event args from Paint event. Also in your timer, you try to pass in e, which I dont see you declaring anywhere in that sub, but you dont need this, Me.Refresh will call your paint event which contains the same thing.
  20. For a form, type: SetStyle(DoubleBuffering,true) In form load or the constructor for example. If you want to use it in controls you have to inherit a class from the control and set the same thing in there, you have to do that, becuase this is protected in controls.
  21. That code looks fine, can you show an example of your file and the characters you get when reading?
  22. None of those points bother me :). I dont know why people lower the rating for things like that, but mostly because its not C#, its a VB book, instead of ranting the guy who said that should find another book :). :) :D
  23. Did you try setting DoubleBuffering?
  24. You could the the LinkButton control, or use the Response.Redirect() method.
×
×
  • Create New...