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
  #71 (permalink)  
Old 11-19-2007, 02:45 PM
Newbie
 
Join Date: Aug 2007
Posts: 2
Default

Quote:
Originally Posted by dzt View Post
You can make b4ppc libraries with #develop.
...
Attached are scrollbar and vb-scrollbar examples for #develop.
Hi,

I downloaded your example and just compiled it with #develop (last version). The dll work correctly then I test it with b4ppc on my desctom computer. But when I try to add dll in a b4ppc project on my compact device, I get messagebox that "an error occured. NotSupportedException". Can you tell me what I do wrong.

Device: HTC Artemis, WM6

Thanks.
Reply With Quote
  #72 (permalink)  
Old 11-19-2007, 04:32 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi,

Menu->"Project"->"Project Options"
Click "Compiling" tab".
At "Target Framework" combo, select "Compact Framework 1.0" or "Compact Framework 2.0".

First you should install Compact Framework SDK.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #73 (permalink)  
Old 11-22-2007, 05:09 AM
Knows the basics
 
Join Date: May 2007
Posts: 86
Default

Hi. I code my DLLS in Vb.NET. If I have a class named "Const", and Const is a reserved keyword, and because this .net library is closed-source, how can I use this "Const" class? It has some unsined hexadecimal integers it returns that I need to use. If I convert these integers, they turn into signed integers and I get errors. Thanks.
Reply With Quote
  #74 (permalink)  
Old 11-22-2007, 04:08 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,382
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Can you explain what the problem is in some more detail as I don't understand it.
Reply With Quote
  #75 (permalink)  
Old 11-23-2007, 03:42 PM
Knows the basics
 
Join Date: May 2007
Posts: 86
Default

Hi. I am trying to wrap a c# class from within a VB.NET library, but the class from the C# dll is named Const. It returns unsigned Hexadecimals I nee to pass to a couple of other subs/functions. The problem is that in VB.NET Const is also used to declare Constants. So how can I use this kind of conflicting class? Thanks.
Reply With Quote
  #76 (permalink)  
Old 11-23-2007, 04:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,382
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

If it is a C# dll I presume you have a reference to it in your project rather than using DLLImport (aka Declare). The class Const should be in its' own namespace in that dll so try referring to it as "WhateverNamespace.Const"

Last edited by agraham : 11-23-2007 at 04:41 PM.
Reply With Quote
  #77 (permalink)  
Old 11-23-2007, 06:37 PM
Knows the basics
 
Join Date: May 2007
Posts: 86
Default

Hi, thanks but however when I do that, VB.NET says that Const must be used as declaring variable types and can't be a class. This C# dll I am trying to wrap is closed, but I'm making a wrapper for it in VB.NET for Basic4ppc. I guess I could try letting Basic4ppc deal with passing the Constance in the Const class to my wrapper? Thanks.
Reply With Quote
  #78 (permalink)  
Old 11-23-2007, 07:00 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,382
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

What are you using? This works for me in VS2005

Code:
C# DLL
-----------------------
namespace ClassLibrary1
{
    public class Const
    {
        public Const()
        {
        }

        public String Version
        { get { return "Const" ;}}
    }
}

-------------------
VB.NET
-------------------
Imports ClassLibrary1

Public Class Form1
    Dim Test As ClassLibrary1.Const = New ClassLibrary1.Const

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(Test.Version)
    End Sub
End Class
Reply With Quote
  #79 (permalink)  
Old 12-09-2007, 12:59 PM
Newbie
 
Join Date: Dec 2007
Posts: 1
Default

you are great!
Reply With Quote
  #80 (permalink)  
Old 03-11-2008, 04:54 AM
Knows the basics
 
Join Date: May 2007
Posts: 86
Default

Hi. I am having a hard time following the ScrollBar VB example for creating and raising events in a Basic4ppc library. Can someone show me a more simpler example of how I can raise events to activate in Basic4ppc maybe show an infinite loop of a counter being incremented by 1 and when it gets to 10 the loop raises an event to Basic4ppc and exits? Thanks.
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
How to create .cab file for Smartphone? RCC2k7 Questions & Help Needed 1 05-30-2008 07:02 AM
How to create a new appointment willisgt Questions & Help Needed 2 05-15-2008 08:21 PM
how to create a database ? gjoisa Questions & Help Needed 27 02-14-2008 05:38 PM
Can you help me create B4P lib? conf Questions & Help Needed 7 08-20-2007 07:41 PM
how to create spreadsheetlike function? Stellaferox Questions & Help Needed 10 06-30-2007 01:09 PM


All times are GMT. The time now is 07:07 PM.


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