Search results for query: *

  • Users: danyeungw
  • Content: Threads
  • Order by date
  1. D

    Can StringBuilder have columns?

    Can StringBuilder have columns? For example, the first column is comapny name and the second column is address. Instead of ABC Company 1234 Main Street XYZ Corp 789 San Diego Ave. Thanks. DanYeung
  2. D

    Format DateTime

    How do I format a date to "Tuesday March 18, 2008 11:02:30 AM"? Thanks. DanYeung
  3. D

    Do collections slow down the app performance?

    I am using .NET 2003. If an application uses many collections to store data from datasets (looping through the datasets to read data), does it slow down the application performance? If multiple users use the application, does it slow down the SQL server? Thanks. DanYeung
  4. D

    Application.DoEvents()

    Is Application.DoEvent() in ASP.NET or VB.NET? If it is for VB.NET, what is the syntex for ASP.NET 1.1? Thanks. DanYeung
  5. D

    How do I make the form stay at the same place after the page is postback?

    If a control with AutoPostBack set to true is at the bottom of the webform, how can I make the form stay at the bottom after the control is clicked and the page is postback? I am using .NET 1.1. Thanks. DanYeung
  6. D

    How to get data from multiple columns ListView?

    I tried If Me.ListView1.Items(3).Text = "D" Then and got an error InvalidArgument=Value of '3' is not valid for 'index'. Parameter name: index How am I supposed to get the data from particula column in the ListView? Thanks. DanYeung
  7. D

    How to add data to multiple column ListView?

    If the ListView has multiple columns, how do I add data to columns that are not in order? In the other word, how to choose a column in ListView to add data? For example, there are 4 columns and I want to add data to Column1 and Column3. Thanks. DanYeung
  8. D

    How to get each value out from the array of Reference?

    An array was declared as follow. How do I get each value out from transArray? Thanks. Private transArray() as Transaction Public MustInherit Class Transaction : Implements IComparable Protected _dateTransactionDate As Date ' Date of the transaction Protected _decimalAmount As Decimal '...
  9. D

    How to update the ProgressBar in the main form using a thread?

    I dropped a ProgressBar on a form. In the form button_click event, it uses a thread to update the ProgressBar. Please the code below. In the Worker1 class, Console.Write("A") worked but not objForm.ProgressBarMeter1.Value = i which means the ProgressBar did not updated. Any suggestion how the...
  10. D

    How to format currency with no decimal in a DataList textbox?

    To format an integer to currency with 2 decimals is String.Format("{0:c}", 12345578), with no decimal is 123456789.ToString("$#,##0;($#,##0);Zero"). It work for formating a textbox in DataList for 2 decimals by using String.Format("{0:c}",DataBinder.Eval(container, "DataItem.Allocaiton")), but...
  11. D

    InvalidOperationException before the form is loaded.

    I got the following message before the form was loaded. What was wrong? System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object." Source="Project1"...
  12. D

    Import SOAP Serialization

    All reference books refer to Imports System.Runtime.Serialization.Formatters.Soap when using serialization. I tried to import Soap but the IntelliSense after Formatters had only SoapFault and SoapMessage. Why? Thanks. DanYeung
  13. D

    How to resize the width but not the height in run time

    I created a form in VB.NET 2.0. The width was 477 and height was 255. I wanted the form can be resized at run time for the width but not the height. So I add 255 in Maximum Size for the height and left the width with 0. As soon as I added 255 to the height maximum size, the form width changed...
  14. D

    Error on SaveFileDialog

    It crashed on sw = New StreamWriter(fileName). The error message was "The process cannot access the file 'C:\test.txt' because it is being used by another process". Why was wrong? Dim fileName As String = Application.StartupPath & "\Test.txt" Dim myStream As Stream SaveFileDialog1.Filter =...
  15. D

    path.GetFullPath and form maximum height

    I have two questions: First, according to this link http://msdn2.microsoft.com/en-us/library/system.io.path.getfullpath.aspx, path.GetFullPath should get the full path where my application is located. But when I use path.GetFullPath("\") is my application, I got only "C:\". Why? Second, I...
  16. D

    Event Log Trace Listener

    The following code ran but I didn't find the Event Log named EventLog. Is EventLog supposed to be created with the Dim statement and the text "Write something to the EventLog" supposed to be written to EventLog? I am using VB.NET 2.0 here. Dim objListener As New...
  17. D

    To display month like 08.

    I wanted to get the month display as 08. Here is my code. I got "Arguments out of range exception" error on the second line. What was wrong? Me.TextBoxDateIn.Text = DateTime.Today.ToShortDateString.ToString() Me.TextBoxDateOut.Text = ("0" &...
  18. D

    Scheduled .exe worked on my local pc and failed on the server.

    I scheduled an .exe from Scheduled Tasks. It works on my local machine. When I scheduled it on a server, it ran without error, but didn't do the work. First I though it might be database connect failed from the server. I ping the database server from the scheduled server and it found the...
  19. D

    substring

    When I used "me.Textbox1.Text.Subtring" I got an error "Overload resolution failed because no accessible 'Substring' accepts this member of arguments." What did I miss? Thanks. DanYeung
  20. D

    Decimal Rounding in DataTable.

    I want to round the column in a DataTable to two decimals. Please refer to the following code. dsBarChart is the DataSet that contains columns Development, Research, and Sustaining. Dim dtGrid As New DataTable dtGrid = dsBarChart.Tables(0) ' Create column for the datatable Dim dtDevelop As...
Back
Top