Jump to content
Xtreme .Net Talk

Bucky

*Experts*
  • Posts

    803
  • Joined

  • Last visited

Everything posted by Bucky

  1. To answer your question (I assume the question is still standing), you can pass whatever you like in the parameters. If you're not using them within the sub, then just pass Nothing to the sender and a new instance of the EventArgs class to e. Button1_Click(null, New EventArgs())
  2. Wow. That's amazing. I'd even venture to say these apes are more adept at programming than some members of this forum. (no names!) I guess that just shows you what we're coming from. I liked this quote: Well, I guess that makes three of us.
  3. How about the calCalAddBoldedDate() (and RemoveBoldedDate) method? :) Stick that in your loop and you're good to go. It looks like the MSDN help links aren't working properly... sorry about that.
  4. Ah yes, nothing like a little cheesy hack to save some coding time. :) Great idea.
  5. Are you sure that the button's click event handler is firing properly?
  6. You can't inherit from the String class; as you noted, it is declared NonInheritable (sealed in C#). To overload or override a method, you must first inherit the class that contains it. Because you can't do this, you cannot overload the method. If you are really serious about this, you could create your own class that exposes all the properties and methods of a string variable, but that means writing wrappers for every member of the String class. If you are looking to greatly extend the functionality of the String class, then by all means go for it.
  7. Per the newewst HTML documentation, the <center> tag is obselete. Instead, use <div align="center"> and </div>. To prevent messy line breaks and such, I'd reccomend declaring a table with a predefined width (say, 700-800 pixels) that most monitors would be able to fit. Then you can work with that and not have to worry about how it will look. Sure, there will be some white space, but the page will look nicer and more compact.
  8. The BackColor and BorderStyle properties are not supported by the .NET Compact Framework (as you have no doubt noticed). Your best bet is to draw the text, background, and border manually using GDI+.
  9. [mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemDateTimeClassParseTopic.htm]DateTime.Parse()[/mshelp] calCal.BoldedDates = New Date() {Date.Parse("4/1/2004")}
  10. Couldn't you use a meta refresh?
  11. The Declare statement works similarly in VB.NET as in VB6, but there are some important differences; any Longs from VB6 must be changed to Integers (they're 32-bit), and structures are handled in a special way. There is also the [mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemruntimeinteropservicesdllimportattributeclasstopic.htm]DllImport attribute[/mshelp], which accomplishes the same task as the Declare statement. [mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/vbcn7/html/vaconCallingWindowsAPIs.htm]Read me![/mshelp]
  12. This might be a little obvious, but since this in the ASP.NET forum I'll point out that Web Applications developed in ASP.NET (once hosted) can be accessed from any system that has a web browser. This is also the beauty of XML Web Services: they are inherently platform-independent.
  13. This method is not incorrect, but in .NET languages it is generally more acceptable to use a property to get and set variable values. If the value is going to be modified before it is set or retrieved, then it might be more proper to use a method, but if you're strictly getting and setting the value, stick to a public property.
  14. Use DateTime.Parse() to turn your string into a DateTime variable, and then use the ToShortDateString() to return a string of just the date. <%# DateTime.Parse(DataBinder.Eval(Container.DataItem, "phone_date")).ToShortDateString() %>
  15. Bucky

    Exit if

    If you're just going to have series of If...ElseIf statements, then maybe a Select Case statement might fit the situation better. Only one Case is ever executed, and the Select statement is "exited" after the first true case is found.
  16. Application.DoEvents() allows other actions to be executed by the system. Make a loop that continusously calls this and exits when the time is up. Dim startTime As Integer = Environment.TickCount Do Application.DoEvents() Loop Until Environment.TickCount - startTime >= 1000 ' Exit when the time elapsed is one second Note that you will probably have to add a project reference to System.Windows.Forms, and include this namespace in your code file.
  17. I believe if you declare the parameter as the IntPtr type, you can just pass the method directly to the DLL and marshalling will convert the method into a pointer.
  18. Make sure that you add some If statements to make sure that you don't set SelectedIndex too low (below 0) or too high (more than the highest index).
  19. Does it always take that long to load, or is it only when you run the app without debugging? Does your app contain large images or large painting subroutines?
  20. Creating new controls is easy, just do something like this: For each letter Dim lbl As New Label() Set the label's positions (based on the message #) and size Set the label's text Me.Controls.Add(lbl) Next If you want scrollbars to be added automatically, create a Panel control (at design-time) and set its AutoScroll property to True. Then just add each Label to your Panel's Controls collection, and if they're "out of bounds" of the label's boundaries, the user can scroll.
  21. Distributing an application with the .NET redistributable is no different than distributing a VB6 (or any other language) app with its runtimes, it's just the fact that the framework is rather large (20+ megs) that makes it difficult to tote around with having the app on a CD. I believe the redistributable is one of the Windows XP updates, so many more computers have/will have it.
  22. Actually, this will create an array with 102 elements, ranging from 0 to 101. If you wanted 100 elements, you would declare myArray as Dim myArray(99) As Integer You can use a For-Each loop to loop through an array, so just do that, take the user's input, convert it to an Integer, and move on. Dim myArray(99) As Integer Dim grade As Integer For Each grade in myArray grade = Convert.ToInt32(InputBox("Grade?")) Next Keep in mind this loop doesn't account for when a user enters a value that is not an integer. You should also create your own form for inputting values, as InputBox is one of those old VB6 functions that should be avoided in .NET.
  23. Just stick the two items inside a <span> tag: <tr> <td><span style="style goes here"><%# Container.DataItem( "FirstName" )%> <%# Container.DataItem( "LastName" )%></span> </td> </tr>
  24. Bucky

    Advice

    An ASP.NET web application sounds like a good idea. Is the server hosting the database the same as the server that the web application will be served from, or are they different servers? If they are different, then an XML web service could be set up on the database server to hand out information in the database to the ASP.NET application. If the web and databases servers are one and the same, then you shouldn't need the web service (unless you have plans for outsiders to design apps that can access this database). Web services are not difficult to learn and use in VS.NET at all, but learning ASP.NET may have a bit of a learning curve.
  25. What a coincidence! Someone on our sister forum, with the same name as you, posted the exact same thing! And the solution was the same, too! ;) Anyway, check it out: http://www.visualbasicforum.com/showthread.php?threadid=148485 Please limit your posts to either one of the forums. If you're going to use VB.NET from now on, you might as well stay here.
×
×
  • Create New...