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
U

Uber1

@Uber1
About
Posts
5
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • little bit of help needed
    U Uber1

    You have to change the following line of code. Change: listBox1.Text = openFileDialog1.FileName To: listBox1.Items.Add(openFileDialog1.FileName) Have a great day.

    Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

    Visual Basic csharp help

  • Ascii code
    U Uber1

    Create a new application and put a button on it and listbox on it. in the buttons click event create a for loop from 0 to 255 in the loop put listbox1.items.add("Chr(loop iterator) = " & Chr(loop iterator)) that will give you the ascii chart in a listbox. The characters that are not normal characters will show up as as box. (chr(13), chr(10), ect...) Hope this helps. :-D

    Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

    Visual Basic csharp question

  • Round to nearest quarter of hour
    U Uber1

    Here is an example of what I was talking about using the if elseif then statement. This assumes you have two labels on a form named Label2 and Label3.

    Private Sub Load_Time()
    'calculates the rounded time
    Dim newtime As DateTime
    Dim min As Integer = Now.Minute
    Label2.Text = Now.ToShortTimeString
    If min >= 0 And min <= 15 Then 'First Quarter
    If min > 7 Then
    'move up
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 15, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    Else
    'move down
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 0, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    End If
    ElseIf min > 15 And min <= 30 Then 'Second Quarter
    If min > 22 Then
    'move up
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 30, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    Else
    'move down
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 15, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    End If
    ElseIf min > 30 And min <= 45 Then 'Third Quarter
    If min > 37 Then
    'move up
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 45, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    Else
    'move down
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 30, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    End If
    ElseIf min > 45 And min <= 59 Then 'Fourth Quarter
    If min > 52 Then
    'move up
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour + 1, 0, 0)
    Label3.Text = newtime.ToShortTimeString
    Else
    'move down
    newtime = New DateTime(Now.Year, Now.Month, Now.Day, Now.Hour, 45, Now.Second)
    Label3.Text = newtime.ToShortTimeString
    End If

        End If
        newtime = Nothing
        min = Nothing
    End Sub
    

    Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are now.

    Visual Basic tutorial question

  • Round to nearest quarter of hour
    U Uber1

    you can use an if elseif then statement to accomplish this task or even a select case. Are you pulling the time from the Now function and if so then you will need another var to hold the rounded time value.

    Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are now.

    Visual Basic tutorial question

  • stop refresh of drawing
    U Uber1

    Putting the code in the event is one way of doing it and probably the best way if your pie chart is constantly changing. Another way would be to create a bitmap object and set the image propertie to the bitmap and it windows will handle the redrawing for you but you should really try doing it the correct way.

    Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

    Visual Basic graphics help
  • Login

  • Don't have an account? Register

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