haven't seen this one....

Discussion in 'Questions (Windows Mobile)' started by Ricky D, Nov 22, 2008.

  1. Ricky D

    Ricky D Well-Known Member Licensed User

    I have changed the internals of my autocomplete combo box to use a listbox instead of a normal combobox.

    I runs it fine in compiled C# on both my devices - Imate Jasjam and Touch pro.

    When I try it in b4ppc i get this on the desktop

    An error occurred on sub main.app_start.

    Line number 9


    Error description:
    URI formats are not supported

    does anyone know what this means?
  2. Cableguy

    Cableguy Expert Licensed User

    How are you adding your list box to the form in your c# code?

    Using your new declaration I asuume your constructor is something like:

    public class mycontrol( Control FormName, int Left, int Top, int Width, int Height)....

    so you should be adding it to the form like this...

    FormName.Controls.Add(mc) ,were mc is the name of your actual control(s)( 1 add line for each control that makes up your control..)

    This has never failled me and I have used this in my aboutpanel dll, wich contains about 6 diferent controls ...
  3. Ricky D

    Ricky D Well-Known Member Licensed User


    I already do that...

    regards, Ricky
  4. agraham

    agraham Expert Licensed User

    I think you are using VS2005. You can single step your library while it is running in the IDE to find out where the error arises. Change the Build to debug, add your dll as a component to your Basic4pcc from the Bin\Debug folder and do Debug->Attach to Process and find DBasic.exe in the process list. Set a breakpoint in your library source, run your app in the IDE and voila! :sign0008:

    Alternatively post the project and I will take a look. :)
  5. Ricky D

    Ricky D Well-Known Member Licensed User

    Attached is the code

    agraham, I've attached the code.

    I'd like to make PicDownArrow.bmp appear when Resolution is 0 and use PicDownArrowVGA.bmp when it's 1.

    I tried making the button a PictureBox and assigning the bmp to it with the commented out code.

    That all works if I create a C# smart device app and reference the dll.

    The code attached has the down button as a plain button. I thought maybe it didn't like PictureBox but that didn't change anything at B4PPC's side

    regards, Ricky
  6. agraham

    agraham Expert Licensed User

    I couldn't open your project directly as you are targeting a platform not installed in my CS2005 - WM6.0 maybe? I made a new WM2003 .NET 2.0 class library, added your code and it compiles and works fine in the IDE.

    Uncommenting your bitmap code causes a compile time error as Windows.Forms.Buttons don't have an Image property.

    What problem am I supposed to be seeing?
  7. Ricky D

    Ricky D Well-Known Member Licensed User

    what I'm trying to do

    I am trying to show the small bitmap on low res screens (Resolution = 0) and the large one when high res is in action - Resolution=1

    I am using vs2005. I tried changing the button to a PictureBox - it has an image property and is clickable. In trying to get anything to show I changed the picturebox back to a regular button thinking that the picturebox was causing the URI formats not supported message.

    I'll create a fresh project and add my class and see if that fixes it.

    Have you ever written anything to use in B4PPC that has embedded items?

    I don't know how to retrieve the .bmps to place on the picturebox.

    regards, Ricky

    P.S I just created a new project and now it works. Something is jamming up in the old project. I still need to get the images though.

    P.P.S I got it working by just referencing the bmp like this (btnDropDonw is now a PictureBox)

    if (Resolution == 0)
    { btnDropdown.Image = new Bitmap("PicDownArrow.bmp"); }
    btnDropdown.Image = new Bitmap("PicDownArrowVGA.bmp");

    this means that the bmps need to reside wherever the dll resides.
    I don't know how to embed them and reference them internally.

    //EDIT: I embedded the 2 bmps and can now access them internally.
    After more testing I'll be able to release it.
    Last edited: Nov 24, 2008
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice