Basic4ppc - Windows Mobile Development  

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

Code Samples & Tips Share your recent discoveries and ideas with other users.


How to create a Basic4ppc library


Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 07-28-2007, 05:50 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 237
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Your code gives me this error message when I open the project.

Error loading code-completion information for Microsoft.WindowsCE.Forms.dll from ?:
Could not find assembly file.

Any ideas ?
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #32 (permalink)  
Old 07-28-2007, 05:59 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

I'm not sure. I'm away now and can't check it. Your probably missing .NETCF developers package.
Anyway remove it from references. No needed for this project.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #33 (permalink)  
Old 07-28-2007, 07:50 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 237
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks for the reply.

Opened a new project, cut and pasted your code.
I got it to build after adding a reference to system.windows.forms and adding the line 'Using System.Windows.Forms'

Works on the desktop It's just not on the form as CableGuy stated

Device now errors with, (get ready)

An error occured.
File or assembly name
'System.Windows.Forms,
Version=2.0.0.0,
Culyure=neutral,
PublicKeyToken=B77A5C5
61934E089', or one of its
dependencies, was not
found.

If I try to reload the dll I get on the device,

InvalidProgramException on the device

Have I made a reference to windows system.windows.forms and not the .NET system.windows.forms ??

Just deleted the reference and added the .net reference to the file.
No change. Still the same errors.


Don't rush to reply. I'm in no hurry.

Many thanks all the same
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net

Last edited by taximania : 07-28-2007 at 08:02 PM.
Reply With Quote
  #34 (permalink)  
Old 07-28-2007, 08:22 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Taximania, I've come to notice that even when we change the c# code and Build the solution, sometimes,(idon't know why), the dll doesn't get built...and the first created dll is still there..

I alway check the date and time of the file present in the bin folder to make sure it's up to date...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #35 (permalink)  
Old 07-28-2007, 09:19 PM
Knows the basics
 
Join Date: May 2007
Posts: 98
Default

Hi. I am having trouble using my first very simple DLL with Basic4ppc on the device, though I haven't yet tested it on the desktop yet.
When I write and build the following code:

public class test
public function ShowMe() as string
return "This is a test to see if this really works!"
end function
end class

The project builds correctly when targetting .net CF 2.0 but Basic4ppc on the device is giving me an unclear error.
Basic4ppc Error Test.dll
It doesn't say what the error is. My device runs the .net CF 1.0 which I cannot find its SDK, so I assumed compatibility with the .net CF 2.0 and .net CF 1.0 when writing this simple code.
I am at least excited I got thus far, but can anyone tell me what's wrong? I'll try the same DLL using the desktop IDE and see if I can at least compile an app linked with this DLL.
Thanks all!
Well, the desktop references to it fine, but Basic4ppc sees no classes or objects to add.

Last edited by Louis : 07-28-2007 at 09:33 PM.
Reply With Quote
  #36 (permalink)  
Old 07-28-2007, 09:56 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Its the other way around...
If a dll target .NET CF 1.0, device running .NET CF 2.0 will run it, but if a dll targets the .NET CF 2.o the device MUST sbe running .NET CF 2.0 and the apropriate config file must be placed in the Basic4PPC folder...

In the BASIC4PPC web page there's a tutorial on how to "see" your cf version, and how to install the cf 2.0
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #37 (permalink)  
Old 07-29-2007, 12:25 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Some links about various .NET SDKs. Please Read carefully these pages and download the apropriate files.

http://www.microsoft.com/downloads/d...displaylang=en

http://www.microsoft.com/downloads/d...displaylang=en

http://msdn2.microsoft.com/en-us/library/ms172491.aspx

http://blogs.msdn.com/onoj/archive/2...01/124609.aspx

@taximania
Looks like you compiled your dll as a compact framework 2.0 dll and you didn't install .netcf 2.0 in your device. Don't forget to add YourApp.exe.config file.

@Louis
Cableguy is right. You can't run 2.0 dll in a device with .netcf 1.0. Look at links above for .netcf 1.0 sdk (I'm still not sure if it exists out of Visual Studio)

Quote:
Well, the desktop references to it fine, but Basic4ppc sees no classes or objects to add.
Your class must have a constructor (a New method for vb.net) and is good to have a Dispose method. See vb.net examples posted in this thread earlier.

Pure .Net development (especially with #develop) is by far more complicated than Basic4ppc. But don't give up, your libraries are coming!
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #38 (permalink)  
Old 07-29-2007, 12:20 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks to everyone's input, especially of DZT, I'm in the fast lane on my dll creation sprea....

I'm thinking about addind some sort of string manipulation controled by a timer, from one of my inputs...and maybe have it turn on/off by a boolean...
Where in the code do I place it?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #39 (permalink)  
Old 07-29-2007, 01:07 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Timer is one more control, like a button but without GUI. Add it and handle it's Tick event. Enable it or disable it, using a property like Left.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #40 (permalink)  
Old 07-29-2007, 08:04 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

HELP!!!

I have (hopefully) one more question...

In my custom form controls I have a picturebox, wich will receive its filename from a public property called "Logo"...
how to set it?

Picturebox.image=............Logo

please fill up the blanks...!
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
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
Can I use basic4ppc to create a Bluetooth middleware solution? Olav Questions & Help Needed 1 09-22-2008 12:21 PM
How to create a new appointment willisgt Questions & Help Needed 2 05-15-2008 09:21 PM
how to create a database ? gjoisa Questions & Help Needed 27 02-14-2008 06:38 PM
Can you help me create B4P lib? conf Questions & Help Needed 7 08-20-2007 08:41 PM
Table create with no data tvrman Questions & Help Needed 4 06-25-2007 09:46 PM


All times are GMT. The time now is 06:50 PM.


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