Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. Well, it is possible to make vBulletin moderate posts and attachments which are sent to a forum. This is the way the forum was originally set up when I joined EXVBF a couple of years back. Anyone could post or reply to anything in Tutors Corner (Code Library didn't exist at the time), but the posts were sent to a moderation queue which moderators could review and either accept or deny. It would be more work for the moderators (perhaps a system could be worked out so forum leaders could moderate the Code Library and Tutors Corner queue or something) but would allow people to post updates (et al) and still allow the moderators to keep the two forums relatively clean.
  2. That code works fine for me. The form closes normally.
  3. For something like that you should look into using Form Inheritance. It's sort of limited, but can be useful for making things like dialog boxes and such.
  4. That's just an example of owner-drawing menu items. As it is, when you put the component on your form, it extends every menu on the form which an ImageIndex property (you need to specify and ImageList in the MenuIconProvider component itself first), and then it will draw the image next to the menu item like it does in MS Office 2000. For what you want, you may not need the Image functionality, but you can modify the source of the component to change the background color. If I remember correctly, I commented the source code so you can find the code which does that. There's a block of code which checks if the item is selected and sets the color to either SystemColors.Control or SystemColors.Highlight, and you can change those two to whatever you want. You get full drawing control, so you can do whatever you need.
  5. You could modify the file at: C:\Program Files\Microsoft Visual Studio .NET\Vb7\VBWizards\Class\Templates\1033\Class.vb which is the template for the New Class item, and change that. You can also add your own item templates, but it is a bit more work. There's probably some info in the MSDN about that.
  6. How are you showing the form in the first place, and how are you sustaining the console app while it is shown?
  7. Like I said, if you want it to be a real .NET project, you have to rewrite it in .NET using similar logic. The upgrade wizard generates terrible code by .NET standards - the code resembles VB6 more than anything. The code generated by the wizard pretty much kills the point of using .NET to begin with. If you don't want to rewrite it, you should keep it in VB4.
  8. You just told us you wanted to convert a program, but you didn't tell us what specifically you wanted us to tell you. There is no question in your original post. If you mean you want to convert a program with the "Upgrade Wizard", you will almost certainly need VB6 (possibly VB5 will work too) for it to work. However, the Upgrade Wizard generates horrible, messy code and should never be used. Ever. Rewrite the project in .NET using .NET CLR compliant code and you will be far happier with the end result.
  9. So what do you want us to do about it? :confused:
  10. It is just a wrapper - it still needs to call the COM DLL, but it created a DLL which has the same structure as the COM DLL. For example, if there's a method in the COM DLL like this:Public Sub DoStuff(a As Long) Dim i As Integer For i = 0 to a 'do a lot of stuff Next End SubThen in the .NET wrapper it may be something like this: Public Sub DoStuff(a As Integer) MyComDll.DoStuff(a) End SubIt doesn't turn the code into .NET managed code, it just makes a wrapper function for each function in the COM DLL.
  11. You can use the ToFileTime and FromFileTime methods of the DateTime object to go to and from a long value.
  12. You need to Ownerdraw the menu items and draw them manually. Look in the Code Library for my "Extend your Menus With IExtenderProvider" component. You can modify the source to suit your needs.
  13. Questions/comments about the submissions should be directed to PM. Cluttering up the article thread with all kinds of question/comment posts is really not needed and would just serve to make it harder to find other updates and such posted in the same thread. However, I do think that the original poster should be able to reply to his or her own threads to post updates and corrections.
  14. Volte

    namespace

    Right click on the "References" item in the Solution Explorer and choose Add Reference.
  15. Volte

    namespace

    You need to reference the System.Windows.Forms.dll in the Project References.
  16. Every data entry control has a Validating event which is fired whenever you try to leave the focus of the control. Just call the sub from there.
  17. If you have one sub to do the calculation, and call it from the Validate event of the controls, it should do the trick. You don't necessarily have to validate the input, but the Validate input is called when you enter data, and leave the control.
  18. Yes, you can use COM components in ASP.NET - You can either: Register the component and use Server.CreateObject to create the component (late-binding). OR (preferredly) Use Tlbimp.exe to import a COM component into a managed .NET wrapper which can be used like any other .NET component (early-binding).
  19. When the form is closed, the managed controls and objects loaded by it are disposed of, and the garbage collection will kick in eventually and free the memory. So, in short, yes, the memory is freed when the form is closed.
  20. You could try this:richTextBox1.LoadFile(filePath & strFileName, RichTextBoxStreamType.RichText); richTextBox1.SelectionStart = richTextBox1.SelectionLength; richTextBox1.SelectedText = myStringVar
  21. The two framework versions, while "versions" of each other, are not compatible with both IDEs. You need 1.0 to use the 2002 IDE and 1.1 to use the 2003 IDE. They can co-exist together as far as I know, so if you install the framework from CD5 as you say, it should work.
  22. There is no MaskEdit control in .NET.
  23. Are you making sure that ans is a Double or some other data type which supports decimals?
  24. There isn't one. You need to provide a TTS engine, which are generally fairly large.
  25. How about this: If TextBox1.Text.Length > 0 Then Dim lines(TextBox1.Lines.Length - 2) As String Array.Copy(TextBox1.Lines, lines, TextBox1.Lines.Length - 1) TextBox1.Lines = lines End If
×
×
  • Create New...