Click here to Skip to main content
15,917,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Array data types issue Pin
DaveAuld25-Sep-11 4:36
professionalDaveAuld25-Sep-11 4:36 
GeneralRe: Array data types issue Pin
Luc Pattyn25-Sep-11 5:01
sitebuilderLuc Pattyn25-Sep-11 5:01 
JokeA new login form Pin
B. Giuliano24-Sep-11 6:01
B. Giuliano24-Sep-11 6:01 
GeneralRe: A new login form Pin
Dave Kreskowiak25-Sep-11 9:15
mveDave Kreskowiak25-Sep-11 9:15 
QuestionCopying one array element to another array Pin
Razanust24-Sep-11 4:56
Razanust24-Sep-11 4:56 
AnswerRe: Copying one array element to another array Pin
Luc Pattyn24-Sep-11 5:06
sitebuilderLuc Pattyn24-Sep-11 5:06 
AnswerRe: Copying one array element to another array Pin
DaveAuld24-Sep-11 22:30
professionalDaveAuld24-Sep-11 22:30 
QuestionWhy a sub is not loaded in form load but in a button it is? Pin
DeDelva24-Sep-11 3:13
DeDelva24-Sep-11 3:13 
Private Sub factuurZoeken_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Try
           m_SelectedStyle = New DataGridViewCellStyle()
           m_SelectedStyle.BackColor = Color.LightBlue
           m_SelectedStyle.BackColor = SystemColors.Highlight
           DataGridView1.ReadOnly = True
           Dim SQLString As String = "SELECT id, bedrijfsnaam, startdatum, vervaldatum, omschrijving, netto, bruto, opmerkingen FROM Facturen"
           Dim DataSet As New DataSet()
           Dim OleDbDataAdapter As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(SQLString, oleConn)
           oleConn.Open()
           OleDbDataAdapter.Fill(DataSet, "Facturen")
           DataGridView1.DataSource = DataSet.Tables("Facturen")
           'hier kleuren:
           DataGridView1.AutoResizeColumns()
           checkfactuurvervallen()
           oleConn.Close()
       Catch ex As Exception
           MessageBox.Show("Fout in Database : " & ex.Message)
           oleConn.Close()
       End Try

Then my sub factuurvervallen:
Private Sub checkfactuurvervallen()
        'kleur records indien vrij of niet(haal datum vandaag op)
        Try
            Dim vandaag As String = Today
            Dim i As Integer = 0
            For Each row As DataGridViewRow In DataGridView1.Rows
                If DataGridView1.Item(2, i).Value() > vandaag Then
                    DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.IndianRed
                ElseIf DataGridView1.Item(2, i).Value() < vandaag Then
                    DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.LightGreen
                End If
                i = i + 1
            Next
        Catch ex As Exception
            MessageBox.Show("Fout in kleuren aangeven : " & ex.Message)
        End Try
        'tot hier kleuren
    End Sub


If i pass the sub factuurvervallen() on a button it colors the rows but in my load after loading the rows it doesn't what am i overseeing??

thx in advance
AnswerRe: Why a sub is not loaded in form load but in a button it is? Pin
Luc Pattyn24-Sep-11 3:33
sitebuilderLuc Pattyn24-Sep-11 3:33 
AnswerRe: Why a sub is not loaded in form load but in a button it is? Pin
DaveAuld24-Sep-11 3:54
professionalDaveAuld24-Sep-11 3:54 
GeneralRe: Why a sub is not loaded in form load but in a button it is? Pin
Luc Pattyn24-Sep-11 4:04
sitebuilderLuc Pattyn24-Sep-11 4:04 
GeneralRe: Why a sub is not loaded in form load but in a button it is? Pin
DaveAuld24-Sep-11 5:37
professionalDaveAuld24-Sep-11 5:37 
QuestionDrawEllipse center on current cursor position? Pin
ChrisDScott9323-Sep-11 16:08
ChrisDScott9323-Sep-11 16:08 
AnswerRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 0:12
mveRichard MacCutchan24-Sep-11 0:12 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 6:36
ChrisDScott9324-Sep-11 6:36 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 6:47
mveRichard MacCutchan24-Sep-11 6:47 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:20
ChrisDScott9324-Sep-11 9:20 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 21:34
mveRichard MacCutchan24-Sep-11 21:34 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 4:26
sitebuilderLuc Pattyn24-Sep-11 4:26 
GeneralRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 6:38
ChrisDScott9324-Sep-11 6:38 
GeneralRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 6:45
mveRichard MacCutchan24-Sep-11 6:45 
QuestionRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 7:04
sitebuilderLuc Pattyn24-Sep-11 7:04 
AnswerRe: DrawEllipse center on current cursor position? Pin
ChrisDScott9324-Sep-11 9:09
ChrisDScott9324-Sep-11 9:09 
AnswerRe: DrawEllipse center on current cursor position? Pin
Richard MacCutchan24-Sep-11 21:36
mveRichard MacCutchan24-Sep-11 21:36 
AnswerRe: DrawEllipse center on current cursor position? Pin
Luc Pattyn24-Sep-11 7:02
sitebuilderLuc Pattyn24-Sep-11 7:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.