Jump to content
Xtreme .Net Talk

Derek Stone

*Gurus*
  • Posts

    1910
  • Joined

  • Last visited

Everything posted by Derek Stone

  1. Integer (Int32) is actually a value type structure, not a class.
  2. Straight from the .NET SDK: Imports System Imports System.Threading Public Class ThreadWork Public Shared Sub DoWork() Dim i As Integer For i = 0 To 2 Console.WriteLine("Working thread...") Thread.Sleep(100) Next i End Sub 'DoWork End Class 'ThreadWork Class ThreadTest Public Shared Sub Main() Dim myThreadDelegate As New ThreadStart(AddressOf ThreadWork.DoWork) Dim myThread As New Thread(myThreadDelegate) myThread.Start() Dim i As Integer For i = 0 To 2 Console.WriteLine("In main.") Thread.Sleep(100) Next i End Sub 'Main End Class 'ThreadTest
  3. ASP files or ASP.NET files? Both languages (I'm using the term broadly) install ISAPI filters that preprocess the requested page before it's sent to the client.
  4. One word: XML. Learn it. Use it. Enjoy it.
  5. Trust both divil and I when we say you don't need to worry about it. Visual Basic 6 and its memory handling differs greatly from .NET's, and the two shouldn't be compared in that aspect.
  6. ASP.NET is compiled on the server, so to answer your question, no, you can't.
  7. A tutorial will be coming out in less than 3 days. Keep a lookout at http://www.elitevb.com.
  8. The Garbage Collector (abbreviated GC) will dispose of the object for you. So, unless you're overly worried about memory usage there is Nothing to worry about. ;)
  9. Me.TabControl1.Controls.Clear() Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabPage3, Me.TabPage2, Me.TabPage1}) I've yet to find a better solution.
  10. If you're using Visual Studio its a simple matter of adding a reference to the Excel Application library. Right click on your project in the Solutions Explorer window and hit References. The code will be fairly similar to its Visual Basic 6 equivalent.
  11. You can run a simple message service using the System.Net.Sockets namespace.
  12. You store it in a variable of type TabPage.
  13. Either declare the adaptor as Shared in a separate class (similar to a Global variable in Visual Basic 6) or overload the form's constructor, passing it the adaptor when you load the second form.
  14. Try changing the BorderStyle property.
  15. I don't believe you can hide or show individual tabs, as they're not actual controls. What they are is an enumeration telling the framework how to render a tabbed dialog. So, with that said, you would need to remove the tab from the enumeration altogether to hide it, and add it back in to show it.
  16. quwiltw is correct. Once you stop the message pump of the main window in your application the application will terminate under most circumstances. The easy solution to this is to hide the window instead of closing it.
  17. Set the timer's interval to one second and update the label each time it fires. Record the number of times the timer fires, and when it reaches the interval of your choosing (number of times fired multiplied by one second) have it execute the event of your choosing. You could also do this with two timers, but I'm not one to waste resources. :)
  18. Run aspnet_regiis.exe. It'll configure IIS to parse ASP.NET. You'll find the executable in the %WINROOT%Microsoft.NET\Framework\<version>\ directory.
  19. Make sure the site is actually redirecting back to a page on your server, and not a cached version. I see no other reason, short of client-side cookie blocking, for this to be happening.
  20. You could place the DataGrid in an iframe and refresh it instead. I don't recommend this method however. <iframe src="datagrid.html" width="100%" height="200"></iframe>
  21. Download the .NET SDK.
  22. Imports System Dim sQuestions() As String = {"Question 1", "Question 2", "Question 3"} Dim r As New Random(DateTime.Now.Ticks) Dim nElement As Decimal = r.Sample * sQuestions.GetUpperBound(0) Console.WriteLine(sQuestions(Decimal.ToInt32(nElement)).ToString)
  23. You need to make sure that Debug is set to On and customErrors are set to Off. Otherwise we can't even begin to diagnose the problem.
  24. You'd have to add a meta refresh tag to the header of the page, setting its interval to 60 seconds. <meta http-equiv="refresh" content="60;URL="myPage.aspx" />
  25. Set a ListBox's DrawMode property to DrawMode.OwnerDrawFixed. Use the System.Drawing namespace to paint each image when the DrawItem event fires.
×
×
  • Create New...