Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. :eek: The working of this were this simple and I didnt see it before! :rolleyes: :)
  2. You could make a structure for each square, and have some value in it like, Suqare(1).Occupied = False. And then you would determine where the figure can move and then look into the occupied value of a square. This is just an example of some things you could do.
  3. AddHandler object.Event, AddressOf handlersub Where handlersub is the sub that will handle the event, it must also accept arguments that correspond to the event.
  4. Did you reference the System.Web assembly? You have to do that, and use the imports statement becuase you dont use the full path of the class. This is the Imports statement you need after referencing the System.Web: Imports System.Web.Mail Put that on the top of your code.
  5. You need to create a new instance of the MailMessage class, and you didnt fill in the .To field which specifies to whom the mail is sent. Dim message As New MailMessage() message.To = "personsemail"
  6. The best way would be to pass the form instances in constructors. And then access them from there. You would have to modify the Sub New to accept argumets.
  7. mutant

    e-mail

    Message.From = textBoxName.Text :)
  8. If you compile your other project to a DLL and add a reference to that DLL you can create a new instance of a form if its in that class. Then you can access it. Something like this: Dim frmForm As New YourNameSpace.FormClass() That is of course after you add a reference to the DLL.
  9. This api will do what you want: http://www.mentalis.org/apilist/keyb_event.shtml Example(from the site, but modified to work in .net: Const VK_H = 72 Const VK_E = 69 Const VK_L = 76 Const VK_O = 79 Const KEYEVENTF_EXTENDEDKEY = &H1 Const KEYEVENTF_KEYUP = &H2 Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Show() Do While Me.Created keybd_event(VK_H, 0, 0, 0) ' press H keybd_event(VK_H, 0, KEYEVENTF_KEYUP, 0) ' release H keybd_event(VK_E, 0, 0, 0) ' press E keybd_event(VK_E, 0, KEYEVENTF_KEYUP, 0) ' release E keybd_event(VK_L, 0, 0, 0) ' press L keybd_event(VK_L, 0, KEYEVENTF_KEYUP, 0) ' release L keybd_event(VK_L, 0, 0, 0) ' press L keybd_event(VK_L, 0, KEYEVENTF_KEYUP, 0) ' release L keybd_event(VK_O, 0, 0, 0) ' press O keybd_event(VK_O, 0, KEYEVENTF_KEYUP, 0) ' release O Application.DoEvents() Loop End Sub
  10. What you have should work all good, becuase it does :). What errors are you getting ? You said something about no being able to link to another form, do you want to modify buttons on another form?
  11. mutant

    e-mail

    You can put anything you want in the "from", but its always good to know where emails come from. :)
  12. What are the errors?
  13. What errors do you get when you do what I showed you?
  14. Other people can get it to compile and work, hmm... Ok, by rules I think that person meant that you should write down what you want your game to do excatly, set the rules of your game. Thats a good approach to it :)
  15. mutant

    Sendkeys

    Its KeyCode, not KeyData. :)
  16. mutant

    e-mail

    You could check if the window is active and manipulate it a little with APIs like FindWindow.
  17. Or you call your WebForm aspx page "index.aspx" or "default.aspx" :)
  18. Try those sites: http://www.codeproject.com http://www.windowsforms.com Yes, controls created in one .NET language can be used in any other .NET langauge.
  19. You have to use GDI to draw shapes. This works fine for saving images: PictureBox1.Image.Save("imagepathname.gif", Imaging.ImageFormat.Gif)
  20. If its just for a hobby then buy the Standard version, what you wont be able to do you can do with the command line, like compiling DLLs or controls. Stanard is not so bad if you only need basic features.
  21. Reporting program is an application that generates graphs, reports and things like that to visually show things from the data you pass in to it. Crystal reports is an example of a program like that.
  22. That would be cool, imagine if anyone could just download .NET SDK and develp games for XBOX on their own computer :), there would be some chaos on the XBOX market.
  23. Imports System.Text.RegularExpressions :)
  24. Typos, typos :rolleyes: Ok, well go one by one It should be the other way around :) Dim GameForm as new frmGame You got that wrong but but this is a how its supposed to look: Dim gamegraphics As GraphicsClass This will be fixed by the previous one. I didnt make it clear enough to declare that variable, just declare it on the top of your code. Here you probably misread it becuase this is supposed to go into the GraphicsClass class, not in the form, it says it there in the text. :) Same as the one excatly like this above :)
  25. I dont have time to test it right now :) but you could try invalidating the desktop window with these APIs: Declare Function RedrawWindow Lib "user32" Alias "RedrawWindow" (ByVal hwnd As Integer, lprcUpdate As RECT, ByVal hrgnUpdate As INTEGER, ByVal fuRedraw As Integer) As Integer 'and Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Integer http://www.mentalis.org/apilist/RedrawWindow.shtml http://www.mentalis.org/apilist/GetDesktopWindow.shtml
×
×
  • Create New...