Click here to Skip to main content
15,920,629 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Populate TreeView on demand in VB Pin
Dave Kreskowiak16-Oct-08 10:05
mveDave Kreskowiak16-Oct-08 10:05 
NewsRe: Populate TreeView on demand in VB Pin
Sonhospa16-Oct-08 11:24
Sonhospa16-Oct-08 11:24 
GeneralRe: Populate TreeView on demand in VB Pin
Dave Kreskowiak16-Oct-08 12:07
mveDave Kreskowiak16-Oct-08 12:07 
QuestionRe: Populate TreeView on demand in VB Pin
Sonhospa16-Oct-08 12:35
Sonhospa16-Oct-08 12:35 
AnswerRe: Populate TreeView on demand in VB Pin
Dave Kreskowiak16-Oct-08 13:50
mveDave Kreskowiak16-Oct-08 13:50 
GeneralRe: Populate TreeView on demand in VB Pin
Sonhospa16-Oct-08 20:22
Sonhospa16-Oct-08 20:22 
GeneralRe: Populate TreeView on demand in VB Pin
Dave Kreskowiak17-Oct-08 1:54
mveDave Kreskowiak17-Oct-08 1:54 
QuestionProblems Calling A Function Pin
Phantom71516-Oct-08 7:47
Phantom71516-Oct-08 7:47 
Hello everyone!
Really confused by this problem. Usually I can search and find an answer, but I'm not even sure how to search for it. I have a function (obviously includes all days of the week, but shortened for shortness' sake):

Function getlabel(ByVal day As DayOfWeek, ByVal calendarRow As Integer) As System.Windows.Forms.Label
        Select Case day  'Get a label name
            Case DayOfWeek.Sunday
                Select Case calendarRow
                    Case 1
                        Return su1
                    Case 2
                        Return su2
                    Case 3
                        Return su3
                    Case 4
                        Return su4
                    Case 5
                        Return su5
                    Case 6
                        Return su6
                End Select
        End Select
    End Function


If I call it by:
Dim CurrentDayNum As Integer = CInt(getlabel(getCurrentDayOfWeek(dayShortName), CInt(ClickedLabel.Name.Substring(0, 4))).Name)
It returns nothing.

If I call it by a direct "DayOfWeek":
Dim CurrentDayNum As Integer = CInt(getlabel(DayOfWeek.Thursday, CInt(ClickedLabel.Name.Substring(0, 4))).Name)
It works fine, and returns the proper label.

When I type getCurrentDayOfWeek(dayShortName) into the debugger, it gives me: Thursday
getCurrentDayOfWeek is a Function As DayOfWeek

I hope that wasn't too confusing, I can be that way. Anybody have any suggestions? Confused | :confused:
AnswerRe: Problems Calling A Function Pin
nlarson1116-Oct-08 7:56
nlarson1116-Oct-08 7:56 
GeneralRe: Problems Calling A Function Pin
Phantom71516-Oct-08 8:01
Phantom71516-Oct-08 8:01 
GeneralRe: Problems Calling A Function Pin
nlarson1116-Oct-08 8:05
nlarson1116-Oct-08 8:05 
AnswerRe: Problems Calling A Function Pin
Caio Kinzel Filho16-Oct-08 8:28
Caio Kinzel Filho16-Oct-08 8:28 
GeneralRe: Problems Calling A Function Pin
Phantom71516-Oct-08 8:44
Phantom71516-Oct-08 8:44 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho16-Oct-08 9:01
Caio Kinzel Filho16-Oct-08 9:01 
GeneralRe: Problems Calling A Function Pin
Phantom71516-Oct-08 9:04
Phantom71516-Oct-08 9:04 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho16-Oct-08 9:15
Caio Kinzel Filho16-Oct-08 9:15 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho16-Oct-08 9:17
Caio Kinzel Filho16-Oct-08 9:17 
GeneralRe: Problems Calling A Function Pin
Phantom71516-Oct-08 9:37
Phantom71516-Oct-08 9:37 
GeneralRe: Problems Calling A Function Pin
Caio Kinzel Filho17-Oct-08 6:55
Caio Kinzel Filho17-Oct-08 6:55 
QuestionThreading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 5:56
Jim Buckley Barrett16-Oct-08 5:56 
QuestionRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 6:21
Jim Buckley Barrett16-Oct-08 6:21 
AnswerRe: Threading Problem in VB.NET Pin
Steven J Jowett16-Oct-08 6:29
Steven J Jowett16-Oct-08 6:29 
QuestionRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 6:51
Jim Buckley Barrett16-Oct-08 6:51 
AnswerRe: Threading Problem in VB.NET Pin
Dave Kreskowiak16-Oct-08 6:55
mveDave Kreskowiak16-Oct-08 6:55 
GeneralRe: Threading Problem in VB.NET Pin
Jim Buckley Barrett16-Oct-08 7:00
Jim Buckley Barrett16-Oct-08 7:00 

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.