Jump to content
Xtreme .Net Talk

Bucky

*Experts*
  • Posts

    803
  • Joined

  • Last visited

Everything posted by Bucky

  1. The VS.NET IDE is, in fact, processor-intensive. This is a given. One feature in particular that slows things down noticeably is Dynamic Help, usually found docked on the right side of the window where the Properties toolbar is. By closing the Dynamic Help toolbar or switching it for another toolbar, VS.NET's speed will improve.
  2. You should download and run a program like AdAware or similar, which will try to remove any spyware and advertising apps and settings on your computer. You may also have luck looking through the list of apps in Add/Remove Programs and removing anything you do not recognize.
  3. Hey, no problem. My name is actually a reference to R. Buckminster Fuller, although Get Fuzzy is one of my favorite comics. :)
  4. Process.Start is overloaded to also take two string parameters. When this overload is used, the second parameter of the function is arguments passed to the program being started. Dim filename As String = "C:\MyProgram.exe" Dim args As String = "option1 option2" System.Diagnostics.Process.Start(filename, args)
  5. Many VB.NET MSDN examples use CInt and CStr to convert, but it's better practice to use the static methods of the Convert class or the Parse methods of the types (like you used) to convert, because it makes the code independent from language-specific features. It also makes it easier to read for other .NET coders, and makes the code more easily ported to other .NET languages (if you had the urge). As for casting between different reference types, use DirectCast instead of CType.
  6. Okay, I added a DataGrid to a form in design mode and looked at the code generated in the InitializeComponent method. You need to add calls to BeginInit and EndInit: // Display Results System.Windows.Forms.DataGrid DGDisplay = new System.Windows.Forms.DataGrid(); ((System.ComponentModel.ISupportInitialize)(DGDisplay)).BeginInit(); DGDisplay.ReadOnly = true; DGDisplay.Location = new Point(100,100); DGDisplay.Size = new Size(100,100); ((System.ComponentModel.ISupportInitialize)(DGDisplay)).EndInit(); this.Controls.Add(DGDisplay); DGDisplay.Show();
  7. Using Parse is the correct way to do it. It looks fine.
  8. You forgot to set the grid's Size property.
  9. For playing sound files on Windows machines, you can use the [api]PlaySound[/api] API.
  10. For me, the checks in the listbox are maintained when changing tab pages. Are you creating the CheckedListBox control dynamically on the tabpage, or are you re-populating it every time the page is selected? Either of these scenarios would be cause for the problem.
  11. When you access a DateTime variable that has been set to Nothing, then it will initialize and return the default value. Instead of retrieving its value, just check to see if it's equal to Nothing. Here x is the DateTime variable: If x = Nothing Then ' x is set to default value End If Note that for reference types you use the Is keyword to compare objects. For comparing a value type (x, the DateTime) with a reference type (Nothing), as is the case here, you use =.
  12. Try this for disabling deletion and adding of new rows: DataView view = myDataTable.DefaultView view.AllowNew = False view.AllowDelete = False aDataGrid.DataSource = view As for the primary column's editability, just set the ReadOnly property to true: myDataTable.Columns(0).ReadOnly = True ' Here, 0 is the column index
  13. Because all value types resolve to reference types in the .NET Framework, you can just set the variable to Nothing (in VB) or null (in C#).
  14. You forgot XP. And XML. Although XML actually stands for something. You have to admit, it sounds cool. X X X.
  15. Yes, use the SelectionStart property.
  16. So, you're using a label to hide other controls behind it? Just set the DropDown control's visible property to false, or group all the controls you want to hide inside a Panel control, and then just set the Panel's Visible property to false.
  17. The ReDim statement does, in fact, clear the array in addition to resizing it. To maintain the values of the array when resizing, use ReDim Preserve.
  18. Dim colors(2) As Integer colors(0) = 255 ' Red colors(1) = 255 ' Green colors(2) = 255 ' Blue Dim ret() As Integer ' Return value ret = RGBColor.getComplement(colors) You could also define the getComplement function with three separate parameters for the red, green, and blue values: Public Function getComplement(ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer) As Integer() 'some code End Function Also, because a color value can't be more than 255, it makes sense to use a Byte type instead of Integer so that errors will be raised if the value is out of range.
  19. There sure is.
  20. Sure. To "log in", you post to the form using the [mshelp=ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemnetwebclientclassuploadvaluestopic.htm]UploadValues[/mshelp] method. There's an example following that link.
  21. If you're using a .NET language, you should really be using the WebClient class to post forms and download data. But, if you insist, the source code for the WebBrowser control can be obtained through obDC.documentElement.innerHTML
  22. If I understand correctly, you are trying to change the focus of the textboxes with the Enter key instead of Tab. This cannot be done with ASP.NET on the server side, because the visual display of the webpage is determined by the client application (the user's web browser). You will need to use JavaScript or VBScript, like kahlua001 mentioned, to accomplish this. Also, if you have AutoPostBack set to True on the TextBox control, the TextChanged event only fires when the textbox loses focus. If AutoPostBack is false, then the event fires when the form is posted to the server.
  23. Try using the Invalidate method of the form instead of Refresh. It is faster, and it may allow form 2 to keep focus.
  24. I don't know if this will make a difference at all, but there is a space after the "Eval" in the second code block, so it should be: <%# DataBinder.Eval(Container.DataItem,"idNum") %> Also make sure that you have the correct column name and capitalization for idNum.
  25. dynaimc_sysop, that will return a bunch of blank array elements, because the string will be split at any one of those character. So, for example, the array elements would be "", "Col1", " ", " ", etc. I believe the best method is to use the Split method of the Regex class. string[] columns = System.Text.RegularExpressions.Regex.Split("[Col1] : [Col2] : [Col3] : [ColX]", " : ") foreach (string column in columns) { // do whatever with column }
×
×
  • Create New...