Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. What dont you understand about arrays or strucutres?
  2. You could use a timer and set it to 5 seconds, or you can use the Sleep() method of Thread: System.Threading.Thread.Sleep(5000) This will make your progeam stop for 5000 milliseonds which is 5 seconds.
  3. Dim ico As New Icon(System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream("NamespaceName.YourIcon.ico")) Substitute the NamespaceName with the name of the namespace your project is in.
  4. If you cant bring them to top I would suggest taking everything out, desiging it, and then putting it back wherever it belongs. :)
  5. Ok, the first one is: SetParent() The declaration is as follows: Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Integer, ByVal hWndNewParent As Integer) As Integer This will set the parent of your control. The one GetDesktopWindow() will get the handle to the desktop window which you need to set the desktop as the parent of the control. Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Integer Put those two declarations in your form class. Then do this: Dim DesktopHanlde As Integer = GetDesktopWindow() SetParent(Button1.Handle.ToInt32, DesktopHandle) First declare a variable that will store the handle of the desktop and then SetParent using the Button1 handle and then DesktopHandle you just got. :)
  6. You put one too much rand.Next in there :) Dim rand As New Random() TextBox1.Text = rand.Next(1, 100) YOu first picked the number you wanted but then you created a new number without min and max values. If RadioButton1.Checked Then 'do what you want when it is selected ElseIf RadioButton2 Checked Then 'do want you want when it is selected End If
  7. You could create a graphics object from an image and then draw to it and save. Dim GR As Graphics = Graphics.FromImage(PictueBox1.Image) GR.DrawString("SOME TEXT", New Font("Tahoma", 72), New SolidBrush(Color.Blue), 100, 100) PictureBox1.Image.Save("imagepath") This is assuming your image is in a picturebox but you can change it to any Image object.
  8. You mean the API VolteFace gave you?
  9. You mean what do you draw squares with? If thats the question then use GDI+ or DirectDraw. Here is the example of what I said before: Structure Field Dim Occupied As Boolean 'if is occupied Dim LetterPosition As Char 'what letter corresponds to it on the board Dim NumberPosition As Integer 'what number corresponds to it on the board End Structure Dim Square(63) As Field You could make an array of structures, each holding info such as if the square is occupied and things like that. You would also include in that structure X and Y coordinates that would mark where the square is drawn. Then when painting you would get the X and Y values and draw it. Then when you place a figure on the board you would determine what square is the target and check the Occupied value for the structure that contains that square. Do you have any code done yet?
  10. Did you import the Threading namespace? Imports System.Threading If you say its not there then this is the problem.
  11. As long as you know how to code AI you can do it in VB.NET. Its just that its hard to find samples on AI for .NET framework now.
  12. Yes, you can create neural networks in fact I saw one article where they had code for VB.NET for that. Most sites list the algorithms for C++ but as long as you can translate it to VB.NET there is no problems. You can find an article on neural nets and the vb.net code here: http://www.ai-junkie.com/
  13. mutant

    need help

    We need to see your code to help you optimze it :)
  14. Yes, they can coexist on the same computer.
  15. SOrry, I typed in the wrong thing Dim lines(somenumber) as LineStuff lines(0) = new linestuff [edit]typos..:) [/edit]
  16. You cant initialize the whole array as new, you have to do that for each member of the array, like this: Public newline(0) As New LineStuff In the example you initialize the first member of the array which is at zero.
  17. Interestnig package you found there, but you might have a look at this host too: http://www.webhost4life.com/ Pretty good packages.
  18. Actually the validation controls like RequiredFieldValidator attempt to do the client side validation first, then if the browser doesnt support JavaScript or cant do it then the validation goes server side. Put a RequiredFIeldValidation on your form and run it with a button. You will see that the error message pops up without any loading. (If you use IE, if you use any browser that doesnt support it it will be server side)
  19. Not many people use Managed C++, its not popular. But I think the compiler should come with the SDK even if a lot of people dont use it.
  20. Edit the constructor of your second form to accept a form as an instance. So you can manipulate the first from from the second one. Like this: (this in yur second form) Dim firstform As Form1 'variable to that will hold the instance Public Sub New(ByVal formfirst As Form1) 'accept an instance MyBase.New() InitializeComponent() firstform = formfirst 'get the instance to the declared varibel End SUb Now you can modify it from your whole class, including hiding and showing it. In your first form you have to declare it like this: Dim frmTwo As Form2(Me) :)
  21. You can do it using the WebClient class: Dim dl As New Net.WebClient 'create new instance dl.DownloadFile("http://www.youraddress.com/image.gif", "C:\image.gif") 'download the file using DownloadFile method to a specified path p.Image = Image.FromFile("C:\image.gif") 'load the image from the path you downloaded it to :)
  22. You made it sound so easy , like its easier than to install wizards :).
  23. This website might help you: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingsetupexebootstrappersamplewithapplication.asp
  24. You must include the whole Framework, there is no way around it. :)
  25. Dont create your own graphics object, use the "e" argument that passed into the Paint event, it contains the graphics object: Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint e.Graphics.DrawString("AntyText", New Font("Comic Sans MS", 20), New SolidBrush(Color.Black), 5, 5) End Sub
×
×
  • Create New...