StarsFire

how do detrimen what day it is ..

monday, tuehusday, etc.. or with an integer with 1 = monday 2 = tuehusday ...

hehe just a way do deside the current day in the week . thanks :D



Re: Visual Basic Express Edition what day in week?

Mike Danes

DateTime has a DayOfWeek property so it's

Dim weekday As DayOfWeek = DateTime.Now.DayOfWeek





Re: Visual Basic Express Edition what day in week?

StarsFire

Not sure i understand how to use this

give me an ekample of how to see if its monday





Re: Visual Basic Express Edition what day in week?

Mike Danes

For example you can use it with an If to find out if it's weekend or not:

Dim isWeekend As Boolean

Dim weekday As DayOfWeek = DateTime.Now.DayOfWeek

If weekday = DayOfWeek.Saturday Or weekday = DayOfWeek.Sunday Then

isWeekend = True

Else

isWeekend = False

End If





Re: Visual Basic Express Edition what day in week?

StarsFire

oh i see :) .. thank you verry much xD

emm .. you should not know what could result in that when i add a label or anything to my current project in VB2005 express and then start debugging i cant see the new label button etc :S





Re: Visual Basic Express Edition what day in week?

Mike Danes

I don't understand, are you adding a label or a button



Re: Visual Basic Express Edition what day in week?

StarsFire

Hmm ..

When i eddit my program, change the button or add a label.. anything .. when i then press debugge it just look like it did before i changed it .. only when i build the application it looks right, but i resive an error :'-(





Re: Visual Basic Express Edition what day in week?

Mike Danes

What error





Re: Visual Basic Express Edition what day in week?

StarsFire

oh wait .. it looks like the program tryes to change a string to a boolean .. or that the error says .. its a date wtich is changed from a string to a boolean .. ill just need to look into it



Re: Visual Basic Express Edition what day in week?

StarsFire

hmm ... i think their is somekind of buge in VB .. i am not sure what the error was cursed by, i just commented out all the things with date involved. Now when i build it is workes okay .. but when i debuge it, it still not working, its showing me an old form.. ... also before i remove the error that i could only see when building and then launching the program was also not displayed in VB .. so i am pretty sure that is has a bug of some kind ... hmmm i am just going to try to send my project to my other pc.. just to check that it isen't this computer that has an error ..



Re: Visual Basic Express Edition what day in week?

StarsFire

my oter computer cant even open the file !!!! .. omfg

what am i gonna do





Re: Visual Basic Express Edition what day in week?

Mike Danes

What file What does it say when you try to open it





Re: Visual Basic Express Edition what day in week?

StarsFire

Ok . i solved the problem with the couldn't open the build file thing.

My problem is that when i press debugge it doesn't debugge as it should. The debugged program looks like it did some hours ago, before i changed some thinges in it. The only way i can see what i just eddited in the program is to build it and then run it.

I can post the project fole if you want to see it .. its abot 5 mb





Re: Visual Basic Express Edition what day in week?

Mike Danes

That sounds odd. Are you sure it builds without errors You can try post the project somewhere if you want, I have no problem downloading 5 mb.



Re: Visual Basic Express Edition what day in week?

StarsFire

it is odd.. ps. i tryed to the step in function when debugging i resived this error :

 

Source file: C:\...............\Visual Studio 2005\Projects\Lektie Stuff\Lektie Stuff\Form1.vb

Module: C:\....................\Visual Studio 2005\Projects\Lektie Stuff\Lektie Stuff\bin\Debuge\Lektie Stuff.exe

Process: [5724] Lektie Stuff.vshost.exe

The source file is diffrent from when the module was built. Would you like the debugger to use it anyway

[Yes] [No]

 

http://www.4shared.com/file/8861770/89a6e1aa/Lektie_Stuff.html

uploaded my project