Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. What do you mean underlined in blue? You get errors? If thats the case then what are the errors? Tell me what they are so I can fix it, im bad at proofreading (a proof of that is all the typos I left in the tutorials that I had to fix later :) ) Well, to build from that really depends on what you want to do. If 3D then I suggest you look for some meshes, and if 2D for some spirtes so you can learn to load meshes and stuff like that, or learn some basic lets say graphics movement for some character in a 2D game. I will be adding more tutorials in very near future, so I hope they will be some help :)
  2. Each of those loops is drawing only 4 times. If you set the background to white or black they board will get confusing becuse you will be able to see only one color coming out as some kind of a shape and the rest will not seem like part of the board :)
  3. Or you can do something like this to draw a checker board (im saying something like this becuase I dont know the size of checker board but i know the size of a chess board :) ) (this is assuming the size of each square is 45) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetStyle(ControlStyles.DoubleBuffer, True) 'to reduce flicker if there will be any End Sub Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint For x As Integer = 0 To 360 Step 90 For y As Integer = 0 To 360 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.Black), x, y, 45, 45) Next Next For x As Integer = 45 To 315 Step 90 For y As Integer = 0 To 360 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.White), x, y, 45, 45) Next Next For x As Integer = 45 To 315 Step 90 For y As Integer = 45 To 315 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.Black), x, y, 45, 45) Next Next For x As Integer = 0 To 360 Step 90 For y As Integer = 45 To 315 Step 90 e.Graphics.FillRectangle(New SolidBrush(Color.White), x, y, 45, 45) Next Next End Sub Each of the loops draws rows of squeres that alternate.
  4. You have alternate it manually. Set is no longer supported in .NET, Dim just initializes a variable so you can use it later.
  5. mutant

    Handle

    You want to know what menu was clicked and raised the event in your MenuItem_Click handler? If yes, then: (in your MenuItem_Click handler) If sender Is somemenuitem Then MsgBox("some menu item was clicked") End If Substitute it with your object names and with what you want to do there.
  6. mutant

    Handle

    Dim arrlist As New ArrayList() arrlist.Add(someobject)
  7. mutant

    Handle

    Maybe you could make your ID variable public to the whole class so you dont have to pass it between the sub. Instead of declraing 1000000(!!) array members you could use an array list, where you can add objects to it without having to worry about the array capacity.
  8. mutant

    Handle

    Private Sub MenuItem66_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem66.Click Dim newmainframe As New MainFrame(NbMainFrame + 1, NbMainFrame + 1, Me) NbMainFrame += 1 MainframeTemp(NbMainFrame) = newmainframe MainframeOpen(NbMainFrame) = True newmainframe.Show() Dim sendertemp As Object sendertemp = NbMainFrame AddHandler MyMenu.Click, AddressOf MenuItem_Click Menu1.MenuItems.Add("Hy",MenuItem_Click) Menu1.MenuItems.Item(NbMainFrame + 3).Visible = True End Sub Private Sub MenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) MainframeTemp(id).Activate() End Sub You cant pick your own arguments for event handlers, but you can identify the menu that was clicked with the sender argument that is passed in. Whats the MainframeTemp object, if I know that I can help you come up with the substitute for the id number. :)
  9. mutant

    Handle

    You have to put the name of your handling sub there, and make sure the arguments it accepts correspond to the ones that the event you are using passes in.
  10. You could do this: Dim lbl As Label For Each lbl In Me.Controls lbl.ForeColor = Color.Green lbl.BackColor = Color.Black Next This will change all your labels on your form.
  11. What are the fxspace objects?
  12. At the top of your code/file, not the top of your class :)
  13. mutant

    Error?

    As long as you dont click on the left side of your code where you set breakpoints you are set :)
  14. IO.File.Copy("C:\somefile.txt", "C:\somefile.wpd") IO.File.Delete("C:\somefile.txt") :)
  15. Thanks, but I dont think advertising like that is allowed :)
  16. GDI+ and GDI are not hardware accelerated, BitBlt is a little faster than DrawImage as some say so maybe you could try that.
  17. mutant

    Error?

    YOu probably set a breakpoint in the IDE, stop your program and click on that darkred circle on the left of your code.
  18. ASP.NET cant display a message box, you will need to use JavaScript.
  19. You would have to create your own routine to do that.
  20. Oh i missed a little part of that code :rolleyes:. Now that I look closer at the code I get it. btw. Cool avatar Heiko :)
  21. I have written a simple tutorial on setting up the device and setting up the primary and backbuffer surface and then filling it with color and flipping it. I hope it can help you :). (beware, it might contain typos as i just uploaded it :) ) http://www.directx4.net/ddbasics.html [edit]The site seems to be down now[/edit] [edit]Seems to be up now[/edit]
  22. I never used WinZip from command line but there is a free GPL library that handles zips for .NET, check it out: http://www.icsharpcode.net/OpenSource/SharpZipLib/
  23. DynamicSysop, i dont get the logic of your sample :). It says that e is EventArgs, becuase thats whats passed in, why do you try to check what it is? :)
  24. If you work with the Directory.GetDirectories class or similar then you dont need to worry about checking if its a file or directory.
  25. Go through it character by character, its not so bad :). Read both of them to an array, first check if the array is the same size, if not there the number of character is not equal so the file is not the same. Then go through all and compare them in a for next loop. If something doesnt match then add it to some kind of a list box or textbox. :)
×
×
  • Create New...