Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

chrismerrill

@chrismerrill
About
Posts
13
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to convert Integer value to Datetime value?
    C chrismerrill

    You can create a DateTime object and then use a Custom DateTime Format String. For Example, this generates the output you want: DateTime d = new DateTime (2006,3,5,1,3,2); d.ToString ("yyyyMMddhhmmss"); MSDN Custom DateTime Format Strings Hope this Helps, Chris

    C# database help tutorial question

  • Slipstream XP SP2 Question...
    C chrismerrill

    Here is one of the best guides for Slipstreaming WinXP SP2: http://unattended.msfn.org/unattended.xp/ As for burning, I've had perfect success with Nero 6.x and ImgBurn.

    The Lounge question

  • Another Fraudulent PayPal scam...
    C chrismerrill

    It's better but they still messed up on the following line: "Dear valued PayPal® member,"

    The Lounge security business announcement

  • .NET v1.1 for NON DEVELOPERS
    C chrismerrill

    All you need is .NET Framework Version 1.1 Redistributable Package. http://www.microsoft.com/downloads/details.aspx?FamilyID=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

    .NET (Core and Framework) csharp

  • Is .NET that much better than VB6?
    C chrismerrill

    Well, it's cause I started learning C++ at the beginning of my senior year of high school and when I got to UCSD I had to start with C and work my way up. After some time at UCSD I just wasn't cutting it so I left for a community college and they had Java. After Java the only other computer programming class was VB6, so I did that and loved how simple it was. I could whip up a quick GUI to go with my code; stuff that would have taken forever in the other languages (at least for me since the classes and books covered concepts and the console window but not how to make your own GUI). Then VS2002 came out, I saw VB.NET and C# and said this is what I've been waiting for :) So I tried a bunch of languages in about a 2.5 year period and finally decided that .NET is the way I want to go. I mainly use VB.NET because it has better intellisense support than C#; for the moment anyways. I also like C# because it has the GUI creation of VB with the coding style of C/C++. Can't wait for VS2005 Final. Maybe if the intellisense is better for C# I'll make the final switch and just stick with C#. It wasn't till I started learning .NET that I was finally offered a job as a programmer. It started as a normal convert our old apps to new apps but has now gone to custom control creation (fun), database interaction (ok), controlling office through com (hate it), ASP.NET (hate it, VS is always messing up my pretty html code so I have to be careful when switching between webform view and html view so that I can undo it's auto-format), gdi+ graphics rendering (lots of fun), and creating pdf files (was fun at first, but now becoming a pain since the company wants EVERYTHING to go directly to pdf and with minimal user effort, which means WAY MORE work on my part). Hope that explains my odd migration path :)

    Visual Basic csharp question discussion

  • Is .NET that much better than VB6?
    C chrismerrill

    Go with VB.NET :) I went from C++ --> C --> Java --> VB6 --> VB.NET and C# I kept jumpping around till about VB6. In VB6 I was able to make quick and simple apps with a GUI. The minute I tried VB.NET I pretty much forgot everything about VB6 and have never looked back. The new .NET languages just make it so much easier to create a user interface and then have more time to work on backend things like data storage, validation, and reports. Plus, VB.NET and C# are pretty similar, so once you learn one you'll be able to understand the other :) So, give it a shot and see what you think.

    Visual Basic csharp question discussion

  • Display Date
    C chrismerrill

    Are you still having trouble getting the year from the date? Have you tried the following (this will get the current year): num.text = Date.Now.Year.ToString For example, today is May 23, 2005 Date.Now.Year.ToString --> will print 2005 Date.Now.Month.ToString --> will print 5 Date.Now.Day.ToString --> will print 23 If you want some other year (let's say you're parsing a date string) dim DateItem as Date = Date.Parse(dateString) num.text = DateItem.Year.ToString or num.text = Date.Parse(dateString).Year.ToString Hope this helps, Chris

    Visual Basic question

  • Display Date
    C chrismerrill

    'this would get today's year num.text = Date.Now.Year.ToString so you need to set DateItem to a date before using it. dim DateItem as new date(2005,05,23) num.text = DateItem.Year.ToString

    Visual Basic question

  • Seperate decimal from whole number
    C chrismerrill

    What about using "mod" to get the remainder then working with that? mod = Divides two numbers and returns only the remainder. For Example: 40 mod 1 = 0 40.25 mod 1 = .25 So you could write something like this to get the decimal(remainder) part of any number entered: dim d as single = input mod 1 if d = .25 then 'do something end if

    Visual Basic question

  • Brain Cramp... this should be simple, but I'm going nuts
    C chrismerrill

    My best guess is that there is a variable in FG.someMethod that is causing the problem. Have you tried running your code in debug mode then stepping through line by line with the F11 key till you get to the line causing the error?

    Visual Basic help

  • if statement
    C chrismerrill

    Or doesn't work like that. Below is how or works. if text = "pufta" or text = "demel" then 'do stuff end if if case doesn't matter (D and d are the same), I would use the following: if string.compare(text, "pufta", true) = 0 _ or string.compare(text, "demel", true) = 0 then 'do stuff end if

    Visual Basic question

  • Export a Dataset to a csv file.
    C chrismerrill

    Here is one possible method to write a DataTable to a csv file. If you want to write out a whole DataSet to csv files, then you could loop through each table in your DataSet and produce a file for each table. Hope this helps :)

    Public Sub WriteCsv(dt as datatable, filename as string, delimiter as char)

     dim writer as System.IO.StreamWriter
    
     try
          writer = new System.IO.StreamWriter(filename)
    
          'write the column names
          for i as integer = 0 to dt.Columns.Count - 1
               writer.write(dt.Columns(i).ColumnName)
               if i <> dt.Columns.Count - 1 then writer.write (delimiter)
          next
    
          writer.write(controlchars.newline)
    
          'write the data
          For i As Integer = 0 To dt.Rows.Count - 1
               For j As Integer = 0 To dt.Columns.Count - 1
                    writer.Write(dt.Rows(i).Item(j))
                    If j <> dt.Columns.Count - 1 Then writer.Write(delimiter)
               Next
               if i <> dt.Rows.Count - 1 then writer.Write(ControlChars.NewLine)
          Next
    
          writer.Flush()
          writer.Close()
          writer = Nothing
     Catch ex As Exception
          If Not writer Is Nothing Then
               writer = Nothing
          End If
    End Try
    

    End Sub

    Visual Basic

  • Monitor Size Dilemma
    C chrismerrill

    I had almsot the same thing happen a few months ago. I went for the Dell UltraSharp 20.1 2001FP LCD. Works great, perfect for coding, and even games like Unreal Tournment 2004 run perfect on it. Dell is currently having a sale on it. Normal price is $899 but it's on sale for $674 w/ free shipping right now. Check out www.slickdeals.net for more info on the price and discount code. Good luck finding a replacement :)

    The Lounge csharp question discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups