Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. Why not just use (10 - opace) / 10? Also, you can't just create a new instance of the form as you are doing and change it. You need to modify the current instance of the form using the Me keyword. Try this (in the TrackBar change event):Me.Opacity = (10 - opace) / 10
  2. Note that all classes which are added to a combo must Overload the ToString function so that it adds the correct data. Otherwise, will simple add a whole bunch of lines that say "MyProject.CboItem" or something similar.
  3. If you set a label's size to AutoSize it won't wrap, but the label will not be a static size.
  4. What type of field is mainid? Verify that it's a string, and if it's not, remove the single quotes.
  5. You should use [api]PlaySound[/api] - sndPlaySound is deprecated.
  6. Don't use the import wizard. It generates very bad code. If you really want to port to .NET properly, rewriting your project is largely required.
  7. re: AndreRyan If you specify the FlagsAttribute attribute on the Enum and leave out the enum id for each element, it will do the expontential numbering for you. As far as I'm aware, the And method is the best way to do it.
  8. There is a list in the MSDN. [mshelp]ms-help://MS.VSCC/MS.MSDNVS/vbls7/html/vblrfVBSpec2_3.htm[/mshelp]
  9. You can use an If..EndIf block in this way.If e.Button Is tbrOptions Then 'Blah ElseIf e.Button is tbrConnect Them 'Blah 'etc End IfNot much different than a Select Case statement. This way you can reorder them without messing up the indexes.
  10. No, API is for the most part compatible with all Windows OS's (with exceptions). If he ever wants to port to another OS entirely, then he may have difficulty, since the same API probably wouldn't exist on it.
  11. You shouldn't even be using an InputBox, as it's part of the old VB compatability library. Make your own form with a textbox, and then set the PasswordChar to "*".
  12. Traditionally this is optional at the time of installation. If the user wants to add/remove them later, that's his or her responsibility.
  13. Use the WebClient and its DownloadData method to download the text from a URL. For more information, look in the MSDN. To write to it, you'll need to use Sockets, and learn the FTP protocol. It will involve logging into the site's FTP server and uploading a file to the server.
  14. If you really want to port it to .NET, rewriting the whole project will be largely necessary. Otherwise, leaving it in VB6 would be wisest. Also, I suggest you take a closer look at GDI+ - it can do far more natively than GDI32 can. It's far more flexible, and more imporantly, object oriented. :)
  15. What are you trying to accomplish?
  16. Also, I believe XP SP1 comes with the .NET Framework.
  17. If you mean the automatic double buffer functionality of AutoRedraw, in your form's constructor, put the following lines:SetStyle(ControlStyles.AllPaintingInWmPaint, True) SetStyle(ControlStyles.DoubleBuffer, True) SetStyle(ControlStyles.UserPaint, True)
  18. Good luck....it'll take months of hard work to create a web browser engine. I'd just use the COM one for now.
  19. As far as I know it's not possible using the AppSettingReader class or similar. I'd recommend making your own serializable class an then serializing/deserializing that with the System.Xml.Serialization namespace to read your settings. That's far more flexible than just simple strings.
  20. The Microsoft Web Browser Control is the IE engine, though it's COM so you need interop. Look in your 'Customize Toolbox' window under the COM tab for the "Microsoft Web Browser" control.
  21. Yes, but they are all different (properties of different objects or they return slightly different values, or something). An object with two properties that return exactly the same thing is unneeded. Different methods of doing things is fine, but duplication of any sort in programming is generally to be avoided. Especially when it is simply to cater to programmers who are used to old methods. [edit](Yay, 1337 posts. :D)[/edit] [edit]D'oh! Derek beat me. :p[/edit]
  22. That makes for messy coding and even more confusing situations, since there would be two properties to do exactly the same thing. Without change there is no progess.
  23. You need to make the last parameter an Object[] type, and use the ParamArrayAttribute attribute on the class. Look in the MSDN for more info.
  24. Oops, sorry. :o I misread, and thought you wanted to be able to click on a column header and select the entire column. Glad you worked it out though.
  25. A DataSource can be anything which implements the IList or IListSource interfaces - that includes Arrays/ArrayLists, DataSets, DataTables, many different kinds of collections, as well as any class you create yourself. Any class you create which inherits CollectionBase is a valid DataSource as well.
×
×
  • Create New...