Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. Not sure this is the best way to do it, but I know this works. Change the constructor of your form to this (it's in the WinForms Generated Region): Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call SetStyle(ControlStyles.ResizeRedraw, True) setstyle(ControlStyles.AllPaintingInWmPaint, True) setstyle(ControlStyles.DoubleBuffer, True) End Sub And then add this to your Paint event of the form: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim b As Bitmap = Me.BackgroundImage Dim g As Graphics = e.Graphics g.DrawImage(b, Me.DisplayRectangle) End Subdivil will probably come by and tell me how much my method sucks, but meh; I don't know of any other way. :p
  2. The Start Page of VS.NET does not actually interact with the IDE itself; it simply accesses the registry to get the list of recent projects, and lists them as standard <a> links. When you click on one, it opens the project in VS.NET as if you double clicked in in Explorer. There isn't really any "interaction" between the IDE and the Start Page going on, but it does access the registry, etc. AFAIK, what you want is not possible directly, without coding your own handlers, etc, into the program; any code you wanted to execute would most likely be done totally in your program using click handlers and such, instead of in the code of the webpage.
  3. Convert.ToInt32("FF", 16)Will return 255.
  4. Most of the people here who are fairly well experienced in VB.NET can also help with C#; the languages are nearly identical when you get right down to it.
  5. It's almost exactly the same for VB.NET; C# and VB.NET are the same language, essentially; the main difference being the syntax. In this particular example, the syntax isn't even that much different. Even a basic understanding of the structure of the C# languages should be enough for you to port it over yourself.
  6. Perhaps it is a trick question, and your instructor wants you to say "why?" :p
  7. Perhaps you meant ".NET is specifically designed for XP"? That is closer to the truth.
  8. The fact that XP was released before .NET was finalized should tell you that they didn't integrate is too heavily. I'm not saying that they didn't take it into consideration, but if they started integrating the beta version of .NET into XP, they could have run into some real problems. I think Microsoft is a little smarter than that. Windows .NET will be the first operating system where .NET is a really big part of it, I believe.
  9. Oh, add 'http://' in front of the URL, and make sure the address is valid.
  10. I don't know how true that is... .NET came out after Windows XP, and designing an operating system around a beta of a language framework doesn't seem like the smartest of ideas. It may have had some special consideration/optimization for the basic concepts, but I don't think that it was "specifically designed" for .NET. If it was, it probably would have been released around the same time as .NET, rather than 4-5 months earlier. I don't know though; someone who knows more about this than I do should clear this up.
  11. Oh. Well, I really don't know what to tell you. foreach can easily get the data, but I have no idea how to get it out in the order that you want it. Sorry. :-\
  12. You know, you can always not use foreach; it may be more appropriate, in this case, to use a standard for loop. int i,j; for (i=0;i<=myArray.GetLength();i++) { for (j=0;j<=myArray.GetLength();j++) { // use myArray[i,j] to output the data } }
  13. Heh, sorry, I didn't realize this is the C# forum. In C# it would be like this: foreach(int i in theArray) { }
  14. Well, for the first question, use a WebClient: Dim wc As System.Net.WebClient Dim bhtml() As Byte, html As String bhtml = wc.DownloadData("www.somesite.com") html = System.Text.AsciiEncoding.Ascii.GetString(bhtml)For your second question, there are a few choices. You can go with some simple link parsing with .IndexOf statements, .SubString statements, and the like, but I would use RegularExpressions for something like this. RegularExpressions is a sort of search language; you can enter a complex pattern, and it will attempt to find it. It's a very complex thing to master, but it can save a lot of time if you learn it. Read about it in the MSDN. As for your third question, you could use an ArrayList, I believe. Like this: 'After visiting: visited.Add("http://www.somesite.com") 'To check if it's been visited: If visited.Contains("http://www.somesite.com") Then
  15. You could somehow cause your program to explain to them that they need the framework, and where to get it, instead of just having that 'MSCORE.DLL not found' error or whatever it is.
  16. A standard Dim i As Integer For Each i In multiDimArray Nextwill do it. I'm not totally sure what order it traverses it (which dimension increments first in the loop), but I'm sure you can figure that out.
  17. Like I said, I'm not sure that the TimeoutException is what you want; it looks like it doesn't have anything to do with the IO namespace or anything similar; it's for service timeouts. I'm sorry, I really don't know what to tell you. :-\
  18. Well, it's supposedly going to be a very inexpensive upgrade for people who already own the first .NET, so yeah. :)
  19. Heh, oops, I meant VS.NET, not VB.NET. But aside from using, there are still some inconsistencies, which make life harder. I can't tell you of any right off the top of my head, but I do know that there are more; it drove me crazy when making a game with GDI+ in C#. Let me open C# to find some... ... Ok, here is a major one for me; no autolisting of constants. I type this.DrawMode = in C#. Nothing happens. No intellisense list of possible draw modes, so I have to type 'System.Drawing.DrawModes' or whatever the constant is in order to get the list. In VB.NET I type Me.DrawMode = and a list of possible constants pops up. Quite a big pain. Another is that is doesn't do as-you-type error checking for anything other than structure. I type Drawing.Graphics g; g.MeasureString(a,b,c,d,e)and there are no errors. Aside from the fact that none of those variables exist, there aren't that many parameters in MeasureString.
  20. Actually, C#'s intellisense isn't as intelligent as VB's; for example, the using statement doesn't invoke the the intellisense, while Imports in VB.NET does. Also, in some cases when working with classes, this, among other things, don't have intellisense either. Apparently this is fixed in VB.NET 2003.
  21. You're not trying to add it at runtime or something are you? That's the only way I could make it greyed out on my comp. :-\
  22. Right click on the 'References' item of your project in the Solution Explorer and click 'Add Reference', then find it in the list.
  23. I don't know if TimeoutException is what you're looking for; it's part of the ServiceProcess namespace; you actually have to add a reference to System.ServiceProcess.dll to your project for it to work. If it is indeed what you want. Catch ex As System.ServiceProcess.TimeoutException:-\
  24. Why?
  25. It's the same with VB6... XP even ships with the VB runtimes, so you don't need to include them if you want to run on XP only.
×
×
  • Create New...