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
Documentation Wiki Register Members List B4P 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
  #21 (permalink)  
Old 07-19-2007, 07:46 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

NO Problem....Thanks for you time and expertize....
I'm eagger to learn, and although internet HAS everything you'll ever whanted, is hard to find when you don't known what others call it...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #22 (permalink)  
Old 07-20-2007, 07:29 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Have a look here for step by step dll building. It's a start

http://www.c-sharpcorner.com/UploadF...058AM/dll.aspx
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #23 (permalink)  
Old 07-21-2007, 11:30 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Taximania, the thing about those tutorials is that they all base the assumption that you have the Visual Studio version of c#....And some of the options featured on these are not available, or are hard to find in other c# enviroments such as sharpdevelop...And they all only tell "do it this way" and "why things are done this way"....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #24 (permalink)  
Old 07-24-2007, 08:39 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

My last post has bit the dust.
DLL's can be created in SharpDevelop2.1.
I've done a very simple one based on the link to the example code from my previous post. Ask me if you want the code.

EDIT AGAIN:
Tried eVC++ :-(
Stick to Sharp Develop. eVC++ is way out
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk

Last edited by taximania : 07-25-2007 at 07:13 PM.
Reply With Quote
  #25 (permalink)  
Old 07-27-2007, 05:09 AM
Senior Member
 
Join Date: May 2007
Posts: 125
Default

Hi. What is the best way to build the .SLN files, or does SharpDevelop do this automatically whenever you select new Solution and then select .net CF application? Thanks.
Reply With Quote
  #26 (permalink)  
Old 07-27-2007, 10:20 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

Hi,

.sln files created automatically by SharpDevelop.

But I think, the best way to start is to use a template solution (I've posted earlier in this thread ScrollBar examples) and then from the project area rename solution, project, and class files.

Attached in this post is one more simple sample, I've made for this thread http://www.basic4ppc.com/forum/questions-windows-mobile/599-help-creating-dll.html

@taximania
I am amazed. Your passion to learn looks endless. C++ isn't an easy to learn programming language but on the other hand it delivers all the power.
With eVC++ you can't create .NET DLLs but only native ones. C# is a good choice (VB.NET too).
Attached Files
File Type: zip CableGuyAboutBox.zip (2.7 KB, 151 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr

Last edited by dzt : 07-27-2007 at 10:32 AM.
Reply With Quote
  #27 (permalink)  
Old 07-27-2007, 06:22 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

@DZT, I have qualifications in 'C' programming. C++ is just a bit more complex.

To use your example in Sharp Develop, what option do I chose when I click on new solution ? C#, VBNet, etc.

Sharp had arguments with this line,
frmAbout = new System.Windows.Forms.Form();
so I added a reference to system.windows.forms, it compiled to a dll but it wont work on my device.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #28 (permalink)  
Old 07-27-2007, 10:40 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

You shouldn't make new solution. Just open (from File->Open-> Project/Solution) .sln file with SharpDevelop 2.2 (yes there is an update). It has all the necessary references and at Project Options->Compiling has Target Framework: Compact Framework 1.0.

Then Build->Build Solution...

(Ohhh, now I see. I mean the attached zip file in my previous post at this thread, not the code I've posted at Questions and Help thread)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #29 (permalink)  
Old 07-27-2007, 11:26 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

dzt thanks for all your trouble helping me, and of course, all others who want to learn dll creation...

I built your code and it works fine except that, in the desktop, the inputbox is shown outside the form boundaries even when i set the position relatively to the form...

I haven't tryed it in my device yet...
Any clues?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing

Last edited by Cableguy : 07-27-2007 at 11:40 PM.
Reply With Quote
  #30 (permalink)  
Old 07-28-2007, 02:05 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

Hi cableguy,

Positioning forms at Desktop Windows is a bit tricky if you want to use the same DLL for both device and desktop. Didn't post anything because I had the device in my mind.

The workaround:
Add Left and Top properties to your AboutBox
Code:
<b><font size="2"><font color="#0000ff">public </font></font><font size="2"><font color="#ff0000">int </font></font></b><font size="2">Left</font>
<font size=
"2"><font color="#006400">{</font></font>
<font size=
"2"><font color="#8b4513">get </font></font><font size="2"><font color="#006400">{</font></font><font size="2"><font color="#000080">return </font></font><font size="2">frmAbout</font><font size="2"><font color="#006400">.</font></font><font size="2">Left</font><font size="2"><font color="#006400">;}</font></font>
<font size=
"2"><font color="#8b4513">set </font></font><font size="2"><font color="#006400">{</font></font><font size="2">frmAbout</font><font size="2"><font color="#006400">.</font></font><font size="2">Left </font><font size="2"><font color="#006400">= </font></font><b><font size="2">value</font></b><font size="2"><font color="#006400">;}</font></font>
 
<font size=
"2"><font color="#006400">}</font></font>
 
<b><font size=
"2"><font color="#0000ff">public </font></font><font size="2"><font color="#ff0000">int </font></font></b><font size="2">Top</font>
<font size=
"2"><font color="#006400">{</font></font>
<font size=
"2"><font color="#8b4513">get </font></font><font size="2"><font color="#006400">{</font></font><font size="2"><font color="#000080">return </font></font><font size="2">frmAbout</font><font size="2"><font color="#006400">.</font></font><font size="2">Top</font><font size="2"><font color="#006400">;}</font></font>
<font size=
"2"><font color="#8b4513">set </font></font><font size="2"><font color="#006400">{</font></font><font size="2">frmAbout</font><font size="2"><font color="#006400">.</font></font><font size="2">Top </font><font size="2"><font color="#006400">= </font></font><b><font size="2">value</font></b><font size="2"><font color="#006400">;}</font></font>
 
<font size=
"2"><font color="#006400">}</font></font>
case 1, using .Show
Position the AboutBox after the .show method

case2, using .ShowDialog
As nothing executed after .ShowDialog until the user presses OK you can't position your AboutBox after .ShowDialog. So to do the trick you should use a timer. Enable it before .ShowDialog and in the first tick (1 ms should be enough) disable the timer first and then position your AboutBox.

And a small notice about my posted c# code. If you use .ShowDialog to show the AboutBox then at btnOK_Click event is not enough to use frmAbout.Hide(). Instead of Hide use frmAbout.Close()
__________________
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
Can I use basic4ppc to create a Bluetooth middleware solution? Olav Questions (Windows Mobile) 1 09-22-2008 12:21 PM
How to create a new appointment willisgt Questions (Windows Mobile) 2 05-15-2008 09:21 PM
how to create a database ? gjoisa Questions (Windows Mobile) 27 02-14-2008 06:38 PM
Can you help me create B4P lib? conf Questions (Windows Mobile) 7 08-20-2007 08:41 PM
Table create with no data tvrman Questions (Windows Mobile) 4 06-25-2007 09:46 PM


All times are GMT. The time now is 02:59 AM.


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