Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


calender control option show/open ?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-20-2008, 03:19 PM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default calender control option show/open ?

Hallo to All,

does anyone know if it is possible to open the calender control
by any option like show or open ?

I want to realize by click on a textbox or a button to open the
calender view.

Michael
Reply With Quote
  #2 (permalink)  
Old 08-20-2008, 04:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You can send the 'click' message to the control with Hardware.SendMessageToControl:
Pressing Button1 will show the calendar or hide it if it is already opened.
Code:
Sub Globals
    'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    hardware.New1 'Hardware object
End Sub

Sub Button1_Click
    hardware.SendMessageToControl("Calendar1",513,0,0) 'Change Calendar1 to your calendar name.
    hardware.SendMessageToControl("Calendar1",514,0,0) 'Change Calendar1 to your calendar name.
End Sub
Reply With Quote
  #3 (permalink)  
Old 08-20-2008, 04:40 PM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default

Erel,

thanks, first step of showing calendar control works fine, but the event never
work for example

sub calendar1_ValueChanged
TextBox1.text=calendar1.value
end sub

do I have to work in this case also with hardware libary ?

From where I can get a list of all possible parameters for the calendar control working with sendmessagetocontrol ?

Michael

Last edited by mike2ppc : 08-20-2008 at 04:56 PM.
Reply With Quote
  #4 (permalink)  
Old 08-20-2008, 06:38 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Quote:
Originally Posted by mike2ppc View Post
Erel,

thanks, first step of showing calendar control works fine, but the event never
work for example

sub calendar1_ValueChanged
TextBox1.text=calendar1.value
end sub

do I have to work in this case also with hardware libary ?

From where I can get a list of all possible parameters for the calendar control working with sendmessagetocontrol ?

Michael
I'm not sure I understand the problem.
This event will be raised when the user changes the date value.
Reply With Quote
  #5 (permalink)  
Old 08-21-2008, 09:22 AM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default

Hi Erel,

attached you find a small example maybe helps for better
understanding of my problem.

In this example the control calendar1 is visible=false, when you click on the button1 control beside the
TextBox1 Control the Calender1 control opens and now I want to change the date and the result
should be display in the TextBox1 control. But no reaction after clicking in the calender control
on a different date to today the calender1 control only close but not move throu the event value_changes.

Did I something wrong ?

Thanks

Michael
Attached Files
File Type: sbp test_calender_send_click.sbp (859 Bytes, 9 views)

Last edited by mike2ppc : 08-21-2008 at 09:26 AM.
Reply With Quote
  #6 (permalink)  
Old 08-21-2008, 11:31 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You are missing the second message:
Code:
Sub Button1_Click
 hw1.SendMessageToControl("Calendar1",513,0,0)
 hw1.SendMessageToControl("Calendar1",514,0,0) 'was missing
End Sub
513 is the value of MouseDown and 514 is the value of MouseUp.
Both are required in order to properly show the calendar.
Reply With Quote
  #7 (permalink)  
Old 10-25-2008, 08:56 PM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default

Hi Erel,

now I'm developing on Vista and I got the error message
"System.Security.Permissions.SecurityPermissio n"
by using

hw1.SendMessageToControl("Calendar1",513,0,0)
hw1.SendMessageToControl("Calendar1",514,0,0)

Do you know about this problem and maybe have a solution for me ?

Best Regards

Michael
Reply With Quote
  #8 (permalink)  
Old 10-25-2008, 09:18 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Does it happen with the compiled executable?
I don't see any exception on my Vista computer, but our security settings may be different.
You can try to right click on the executable and choose Run As Administrator.
Reply With Quote
  #9 (permalink)  
Old 10-25-2008, 09:32 PM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default

it happens in the basic4ppc developing UI desktop and when I start the compiled executeable file then I got message shown in attached printscreen
Translation:
DE = Fehler bei der Anforderung des Berechtigungstyps
EN = Error by request the authority types
When I do right click on executable file and execute as admin it popup with same error message !
Attached Files
File Type: pdf printscreen.pdf (13.2 KB, 10 views)
Reply With Quote
  #10 (permalink)  
Old 10-27-2008, 06:47 PM
Newbie
 
Join Date: Feb 2008
Location: Germany
Posts: 9
Default

Problem solved, it was a authority situation, source folder
located on a seperate drive on physical maschine and I have tied to work with a mapped root from virtual maschine running on physical maschine where source folder. Now I have copied complete source folder directly on the virtual maschine and all works fine.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAX Option? Jonathon Basic4ppc Wishlist 3 06-25-2008 07:52 AM
Option Explicit badkarma Questions & Help Needed 6 06-21-2008 05:08 PM
after used showtodayscreen how to show again blackiice Questions & Help Needed 3 10-25-2007 04:26 AM
keyboard show bdiscount Questions & Help Needed 1 09-24-2007 03:21 PM
why doesn't my savefile option work? Stellaferox Questions & Help Needed 2 06-15-2007 09:15 PM


All times are GMT. The time now is 07:41 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0