
King Erik I
Members-
Posts
24 -
Joined
-
Last visited
About King Erik I
- Birthday 05/07/1984
Personal Information
-
Occupation
Student, parttime in PC store
-
Visual Studio .NET Version
VS .NET 2003 Pro
-
.NET Preferred Language
VB.NET
King Erik I's Achievements
Newbie (1/14)
0
Reputation
-
No label.backcolor for Pocket PC? Or border....
King Erik I replied to King Erik I's topic in General
Errr.... I think if you use the .NET Compact Framework, yes. Becouse that is a standard for writing applications for a Pocket PC... Do you mean a Pocket PC with the operating system Pocket PC 2002/2003 or another type of PDA. -
No label.backcolor for Pocket PC? Or border....
King Erik I replied to King Erik I's topic in General
Thanks for the tip. -
Lol... I am going to write it from the beginning... the days should be clickable. Then there will be two other problems. How do I know which day is clicked and how can I see how many appointments are there on that day? (extra label on button?) :mad: :mad: :mad:
-
I know, Thanks... There are some problems which i can't solve i think becouse of the compact framework :( When I click a daynumber there should be a query triggered with the current date and show the appointments. Not possible with a label... Another problem is that the screen should be refreshed. I've got an idea, just create all the colums and first fill them with "" (nothing), after that fill them with the day number. Tomorrow another day. But then they arent still clickable... Maybe There will be a miracle this evening and I will get a solution for this prob :D [edit]My calendar is not slow on PPC :cool: :) :D [/edit]
-
Thank you very much for your reaction. I've added a screenshot of the calendar. The blue border is the first layer, a panel... The white background inside the blue border is the second layer, a panel The text is the third layer, a label So you will see the layout of it... thats the problem i've got. The position of the panels+labels who have to be re-positioned. :mad: Im going to check how my calendar acts on my pocket PC. :)
-
No label.backcolor for Pocket PC? Or border....
King Erik I replied to King Erik I's topic in General
It worked... only now i've got another problem... when i want to switch to another month the calendar is very slow and the days which have been created wont dissapear. Posted it on http://www.xtremedotnettalk.com/showthread.php?t=85224 :-( -
Hello, I've written a calendar for the pocket pc. The problem is that this one is very slow and when i jump a month back or forward, the created days from that previous month won't dissapear. Is there any way to remove all the created 'txt' labels? And what about the speed... I am just a simple beginnen, but i have to create it for my work... am a trainee :p Private Sub Calendar() 'ByVal iYear As Integer, ByVal iMonth As Integer, ByVal iDay As Integer) System.Windows.Forms.Cursor.Current.Current = System.Windows.Forms.Cursors.WaitCursor() Dim iDaysInMonth As Integer 'The number of days in a month Dim iCurrentDay As Integer = 1 'The current day... necessary for the loop Dim iDowStart As Integer 'Declare daysofweek from the 1st day of the month Dim iBoxDimension As Integer = 30 'The width of the text box with the day number in it. Dim iBoxPosX, iBoxPosY As Integer 'The position of the box which is going to be created Dim iTxtPoxX, iTxtPoxY As Integer 'The position where the day should be placed. iDaysInMonth = Now.DaysInMonth(iYear, iMonth) iDowStart = DateTime.Now.Parse(iYear & "/" & iMonth & "/01").DayOfWeek + 1 'The number of the Day Of Week for the 1st of the month iTxtPoxX = iDowStart 'Initize with the Day Of Week start iTxtPoxY = 1 'Initize with 1 Do Until iCurrentDay > iDaysInMonth Dim pnlBorder As Panel 'Create a panel for the border pnlBorder = New Panel Dim pnlBack As Panel 'Create a panel for the background pnlBack = New Panel Dim txt As Label 'Create a label txt = New Label txt.Refresh() iBoxPosX = ((iTxtPoxX * iBoxDimension) + (iTxtPoxX)) - iBoxDimension iBoxPosY = ((iTxtPoxY * iBoxDimension) + (iTxtPoxY)) - iBoxDimension With pnlBorder 'Panel is border for the label .Location = New Point(iBoxPosX, iBoxPosY) .Size = New Size(iBoxDimension + 2, iBoxDimension + 2) .BackColor = Color.DarkBlue .Visible = True End With With pnlBack 'Panel is background for the label .Location = New Point(1, 1) .Size = New Size(iBoxDimension, iBoxDimension) .BackColor = Color.White .Visible = True End With With txt 'Create label for the number of the day .Location = New Point(0, 0) .Size = New Size(iBoxDimension, iBoxDimension) .Text = iCurrentDay .Visible = True .ForeColor = Color.Firebrick End With Me.Controls.Add(pnlBorder) pnlBorder.Controls.Add(pnlBack) pnlBack.Controls.Add(txt) iCurrentDay += 1 iTxtPoxX += 1 If iTxtPoxX = 8 Then iTxtPoxX = 1 iTxtPoxY += 1 End If Loop System.Windows.Forms.Cursor.Current.Current = System.Windows.Forms.Cursors.Default() End Sub
-
No label.backcolor for Pocket PC? Or border....
King Erik I replied to King Erik I's topic in General
What i can do also is just create behind a label a panel... ;-) think im going to do that. A border around a calendar day is handy :-P -
Hello, does anyone knows how to get a border around a label or change the backcolor of it?? The property (backcolor) is there, but when I set it there is no result :-S lblTesting.BackColor = Color.Red
-
Great!! it's working :-D Thanks alot... Declare = Dim something... doh... stupid me sometimes :o)
-
Name 'txt' is not declared.... my VS 2003 .NET Pro says.... I Declare it under the Do Until loop txt = New Label ...Gmbl...
-
Hmmm... ok :) shall test it again
-
Hello, having a small problem.... Want to create my label dynamicly. Found another post on this forum where i have found the info with the With function, so that worked.... only now i've got another small problem. If I run my loop, the previous created label is gone! That is not what I want. How do I create something so that every created label stays? Under here my current code.... Dim iDaysInMonth As Integer 'The number of days in a month Dim iCurrentDay As Integer = 1 'The current day... necessary for the loop Dim iDowStart As Integer 'Declare daysofweek from the 1st day of the month Dim iTxtBoxWidth As Integer = 24 'The width of the text box with the day number in it. Dim iTxtBoxPos As Integer iDaysInMonth = Now.DaysInMonth(Now.Year, Now.Month) iDowStart = DateTime.Now.Parse(Now.Year & "/" & Now.Month & "/01").DayOfWeek + 1 ' MessageBox.Show(iDowStart) Do Until iCurrentDay = iDaysInMonth txt = New Label iTxtBoxPos = (iCurrentDay * iTxtBoxWidth) + (iCurrentDay) 'MessageBox.Show(iCurrentDay) With txt 'Not correct?? .Location = New Point(iTxtBoxPos, 15) .Size = New Size(24, 24) .Text = iCurrentDay .Visible = True .BackColor = Color.Red End With Me.Controls.Add(txt) iCurrentDay += 1 Loop
-
Aha.... i was very close to the solution. ;-) thanks a lot.
-
Typecasting (int) doen't work here. When i leave it, i will get the name of the day. int(date.DayOfWeek)) also doesn't work... I need the day number. p.s. date is reserved word :-)