Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

ControlEvents library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-04-2007, 11:09 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default ControlEvents library

There are some events "missing" from the built-in controls in B4PPC. This library enables them to be used if anyone so wants. The included help file gives details.


This library is built for .NET 2.0 as I cannot target .NET 1.1 or CF 1.0. However I have included the source in the zip so maybe some kind person can recompile it for .NET 1.1 and repost it as (say) ControlEvents1.dll so that anyone who want to use doesn't need .NET 2.0.
Attached Files
File Type: zip ControlEvents.zip (9.2 KB, 131 views)
Reply With Quote
  #2 (permalink)  
Old 10-04-2007, 11:58 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default



I'm a kind person too, but it seems not so fast person
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #3 (permalink)  
Old 10-04-2007, 12:01 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Thanks guys.
Reply With Quote
  #4 (permalink)  
Old 10-04-2007, 04:56 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It may not be obvious but you can add the events in this library to the controls in the ControlEx library although it may not be useful or work for some of them. For example - A TrackBar

Code:
' assuming a ControlEvents Object called TrkBrEvents
'
 and a TrackBar object called TrkBr

Sub App_Start
    Form1.Show
    TrkBr.New1(
"Form1",10,10,100,30,false' new TrackBar Control
    TrkBrEvents.New1(TrkBr.ControlRef)      ' add the new events
End Sub

Sub TrkBrEvents_GotFocus
    
' do something 
End Sub
You can also add the events to controls added at runtime by just specifying their name -
Code:
    AddButton("Form1","RunTimeButton",10,10,60,30,"ClickMe"
BtnEvents.New1(
"RunTimeButton")
Reply With Quote
Old 10-05-2007, 11:32 AM
agraham
This message has been deleted by agraham. Reason: Wrong attachment
  #5 (permalink)  
Old 10-05-2007, 11:51 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Apologies if anyone saw this post come and (rapidly) go a bit earlier. I posted a zip that had the wrong help file. Helpmaker may be free but it is also very idiosyncratic and it seems to be easy to get it confused in several different ways - I ended up reposting the original help. Hopefully all is well this time.

Second and final (hopefully) version of the library with modified help and source. Again compiled for .NET 2.0 - dzt's opportunity to get in fast!

The Key events have been added so this, together with the built-in events in B4PPC, gives access to just about all the meaningful control events in the Compact Framework.

A ControlRef property is added for completeness but is probably of no use to anyone.

Dispose has been improved to unhook the added events from the enhanced control but you don't need to worry about this..
Attached Files
File Type: zip ControlEvents.zip (11.6 KB, 63 views)
Reply With Quote
  #6 (permalink)  
Old 10-05-2007, 12:39 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Ready. .Net CF 1.0 attached.

Thanks for the opportunity.

It was not so easy as
Ctrl.EnabledChanged -= EnabledChangedEvent;
does not compile for .NETCF 1.0 so I changed it to
Ctrl.EnabledChanged -= newEventHandler(EnabledChangedEvent);

Cheers
Attached Files
File Type: zip ControlEvents1.zip (11.7 KB, 70 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr

Last edited by dzt : 10-05-2007 at 12:43 PM.
Reply With Quote
  #7 (permalink)  
Old 10-05-2007, 01:09 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Thanks dzt.
Quote:
Originally Posted by dzt View Post
It was not so easy as
Ctrl.EnabledChanged -= EnabledChangedEvent
Sorry - C# version 2.0 syntax "improvement" that isn't backwards compatible.

I'm really a VB man but libraries are better in C# because of all the baggage that VS2005 VB puts in a module and becomes visible in B4PPC, and I have only ever used version 2 as I only have .NET 2.0 on my machine.
Reply With Quote
  #8 (permalink)  
Old 10-10-2007, 10:21 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hello agraham (multithreading contact),

Quote:
I'm really a VB man but libraries are better in C# because of all the baggage that VS2005 VB puts in a module and becomes visible in B4PPC
Compiling with #develop you can avoid all that baggage. SharpDevelop also has a built-in VB.NET to C#.NET and vice versa, convertion tool.
__________________
Dimitris Zacharakis
http://www.terracom.gr
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


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


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0