Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. Working directory is the "default directory" in the program's eyes; if the program attempts to access file using relative path (i.e. "images\img.jpg" instead of "c:\game\moo\images\img.jpg"), that is the directory it will look in.
  2. Mine is located at C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe /i ... Obviously, WINNT will be WINDOWS or WINNT depending on OS version. Gah, ... somehow I managed to triple posts....
  3. This is the default Windows XP (maybe 2000) behaviour. That's the way it's meant to be, and I doubt you'll be able to change it without going to extensive trouble.
  4. [api]GetAsyncKeyState[/api] allows you to check the sates of multiple keys at once, and at any point in execution; not just at a certain event. It will probably help your speed a bit.
  5. In VB6 it was indeed best to use a Long, because due to the 32-bit architecture of the OS, it is more efficient; however, VB6 is an oddball, because C++ and other languages have always had 32-bit ints. In .NET you should stick with Integers. If it confuses you, the standard types (Integer, Long) are just aliases of less confusingly named types; Int16 is 16-bit (Short), Int32 is 32-bit (Integer), Int64 is 64-bit (Long). They can be used instead if it is more comfortable.
  6. Vertical seperation of statements doesn't do it for you? ;)
  7. No, it is as accurate as it can possibly be (potentially at least; system load might have some slight effect on it).
  8. [api]timeGetTime[/api] is apparantly accurate to the millisecond. [api]QueryPerformanceFrequency[/api] and [api]QueryPerformanceCounter[/api] are very very accurate indeed. All three are APIs.
  9. Try changing the Read() to Peek(). Anyway, you can read the whole thing like this: txtOriginal.Text &= rdBfr.ReadToEnd()
  10. Looks like it's just appending .html to the end of the page URLs (so it's like page.php?var=4.html)
  11. You would need to initialize a system-wide keyhook. Since it is possible to abuse functionality like this to create trojan type programs, you most likely will not find much help on the matter here. However, if you search on Google, I'm sure you'll probably come up with something (for VB.NET or otherwise, but it should all be similar in the end).
  12. They are disposed of, but there is no guarantee that the memory will be freed right away. There should be no problem with memory. Also, if only for code readability, you should close all connections explicitly. I would tend to let .NET do as little automatically as possible (within reason, of course).
  13. It's not an oversight -- MDI children are not meant to be used like this at all. The ones that do manage to hack out someway to do it are misusing the concept of MDI. You could either make it so that the MDI children are movable and collapsable (how MDI is supposed to be), or use standard top-level forms. Either way would allow you to use inherited forms. In any case, to do what you want, you should look at the MDI child's Resize event. When it resizes, check its WindowState -- if it's not set to Maximized, set it to Maximized.
  14. Do you mean that when you start the program, the child is maximized so that the control-box buttons are in the same place as the menu bar (directly underneath the host window's control box), rather than on a blue caption strip? If that is the case, I doubt you can fix it. It's just simply not the way MDI children are meant to be used. If you want it used in the manner you're saying, I suggest looking into something like a tab control when you can have multiple groups of controls, but only one group visible at a time.
  15. I do some ASP work and web design work for my dad... whatever I can get. Pay isn't much, but it certainly beats working for minimum wage at McDonalds.
  16. Here's some sample code I whipped up to do it from a string. Dim fname As String = "TestProj.Form2" 'The name must be fully qualified (i.e., with the namespace) Dim formType As Type = Type.GetType(fname) Dim f As Form If Not formType Is Nothing Then f = formType.InvokeMember(Nothing, Reflection.BindingFlags.CreateInstance, Type.DefaultBinder, formType, Nothing) f.Text = "My New Form" f.Show() End IfNothing fancy; it just uses the awesome power of the System.Type class to find the Form's base type given the string, and then it uses the base type to create an instance of the form and show it.
  17. Well, I think Length or Count - 1 will probably do the same thing.
  18. I don't think the capacity allocates 10 items right off the bat; you need to start at 0 and go up. Instead of getting the value from the textbox, just do what i did and get the UpperBound of the array (after you've added the button). And don't forget, it starts at 0. Also, just try not specifying the capacity right off the bad, and leave the constructor as (). Sorry, I don't know much about webforms and ASP.NET like that, so I probably won't be able to help much more. :-\
  19. That's because you're just changing the position of test(0), not the newly created button. Try this: Dim b As New Button test.Add(b) Dim n As Integer = test.GetUpperBound(0) test(n).Text = "Moo!" text(n). 'other stuff....
  20. Doing something like this isn't very practical. You'd need to hook the IE window, capture the WM_CREATE of the parent, add new items to it, subclass them so you can make them do things... I'd say the best bet would be to see if you can do something like this with IE plugins, and investigate that.
  21. Many of the common namespaces are imported by default, but anything you're going to be using in your class alot, import it. You don't *have* to import anything, it just saves typing and readability.
  22. You can use an ArrayList: Dim i As Integer Dim ctrls As New ArrayList() For i = 0 to 10 Dim b As New Button() '.. position the button and stuff ctrls.Add(b) AddHandler b.Click, AddressOf OnButtonClicked 'you need to make this sub yourself Next iYou can also access an arraylist with indicies like regular arrays, too -- ctrls(2).BackColor = Color.Red [edit]Oh, I just realized you want a webforms example; well, I think the same logic should apply[/edit]
  23. The language concepts are almost all the same. And all C# programs start in sub main -- notice that in your main form, you probably have something like this: static void Main() { Application.Run(new Form1()); }You can put anything you want in there before the application really starts.
  24. Well, the loop 'j' is completely redundant. I think the problem might be that you are splitting on " : " and not ":". Try this:For i = 1 to noverbs verb(i) = ListBox1.Items(i) parts = verb(i).Split(":") 'note there's no spaces verbl(i) = parts(0) verbr(i) = parts(1) Next i
  25. What is your exact code?
×
×
  • Create New...