Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Oh :), I hope I understood your question right now. So you want to create controls when the form loads then I assume you open that form from another one which asks to select a quiz. You would have to edit the constructor of the form that displays the quiz and pass in the path to the quiz. Dim path As string 'a variable that will keep the path Public Sub New(ByVal quizpath as string) MyBase.New() InitializeComponent() path = quizpath End Sub And then in your constructor or form load this: Dim reader As New IO.StreamReader(path) 'get the path of the quiz Dim x as Integer = 0 'keep track of how many checkboxes there is Do While reader.Read() checkboxes(x) = New CheckBox checkboxes(x).Caption = reader.ReadLine() 'read the line checkboxes(x).Location = New Point(coordinates) Me.Controls.Add(checkboxes(x)) x +=1 Loop [edit] Forgot the x += 1 line :) [/edit]
  2. 1. Me.WindowState = FormWindowState.Maximized Why not set it in the designer if you do it on form load? 2. Dim sc As Rectangle = Screen.PrimaryScreen.WorkingArea 'get the screen width MessageBox.Show(sc.Width) 'get the screen height MessageBox.Show(sc.Height) :)
  3. So for example you have a form called "Form1" and you want to open a file that has the same name, read it, create a checkbox for every line?
  4. Im using GeForce4, its a good card, came with my computer which I bought very recently (2.5 weeks). What you said Nerseus could just be the problem but I already got rid of the Win2003 installation and went back to XP pro, I guess I can always try again :)
  5. I guess you want to open it from another form then. Edit the constructor of your form to accept a string variable that will hold the path of the file: Public Sub New(ByVal path As String) accept a string variable MyBase.New() InitializeComponent() Dim reader As New IO.Streamreader(path) TextBox1 = reader.ReadToEnd 'read to something, like a textbox End Sub You didnt really answer my last question so Im not sure what you want :).
  6. You mean when you start your app so it automatically opens a text file or you open your form from another one and want to pass in the text from the text file?
  7. Good to hear that now the site has its own server. Good to hear too that vB3 is coming here becuase it is a really good piece of software. :)
  8. You need to have VB6 installed to have the license for the CommonDialog control, becuase it is not a standard control in VB6.
  9. The only thing that could force to change the query is if you have code that you want to make DB independent, meaning that you want your application to run on a DB user choose, so you would need different queries for different DBs if they need to be different. But it still has to be written in SQL syntax.
  10. You cant send command lines between forms, are trying to pass information between two forms?
  11. Those should help you, there is a section on silent framework installation: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingsetupexebootstrappersamplewithapplication.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsetupexebootstrappersampleoperations.asp
  12. Why would you want to convert it to C#? I have never seen a database that uses C# syntax for SQL.
  13. You should look into the FileSystemWatcher component, its in the toolbox of VS under components tab. That components monitors the file system and raises events when something happens to the directory or files.
  14. Couldnt you simply use PrintSetup dialog?
  15. So is the move all done now and it went ok? :)
  16. Im not excatly sure what you need but since you said you need to force repaint try this: PictureBox1.Invalidate() This will make the pic box repaint when you call this. You could call this in your form's move event.
  17. :) It automatically creates the file if it doesnt find it.
  18. I dont think Managed C++ is harder. Since it uses framework and framework is object oriented it makes a great organization. Win32 platform APIs are procedure oriented, since I think most of it is written in C. I would say that the good of pure C++ comes at a little price :).
  19. Yeah, since it wont be touched by the framework. But remeber, since it wont be its important that you code your own destructors for the objects you create.
  20. You need to add reference to the System.Web assembly in your solution explorer. Right click your project and click add references and look for System.Web.
  21. You could add this to your loop: Dim writer As New Io.StreamWriter("ad" & i + 1 & ".html") writer.Write(temp_v) writer.Close() I hope this is what you mean :).
  22. Yes, its possible to mix managed and unmanaged code in one Managed C++ app. You will have to create a Managed project and then just declare you classes as not managed (without the __gc keyword).
  23. That should work, but you can also try this: If MyCheck(k).Checked Then 'it is checked Else 'it is not checked End If
  24. Yes, its easy, you just have to select the Win32 Appliaction type of project and you can make unmanaged application.
  25. To addition of what Volte said, I would very strongly recommend that you yourself are god at chess before even attempting to create an AI. Its hard to be good in chess :D ;) . I sguuest you play online with some people, I like visiting games.yahoo.com when I want to play chess online :).
×
×
  • Create New...