Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

SpeBeeTo

@SpeBeeTo
About
Posts
22
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I need help, please?
    S SpeBeeTo

    Hello everyone, I have a program that is almost finished. I am stuck at one point, and don't know how to get past this. I was wondering if anyone could take a look at my code and give me some pointers. A little bit about me: I am not a programmer, but like to try out my luck. I am making a pocket pc program for the medical field (I'm a physician), which basically shows radiological images. Since I don't have the sources for the SQL Server CE stuff, I programmed this in C# and used an XML file as my database. I know a lot of you would probably think this is not wise, but my limited programming skills made me go in this direction. So please, if you could help me out, I would most definitely appreciate it. I can email you the files (programming in Visual C#). Thanks everyone, M.

    Collaboration / Beta Testing database help csharp sql-server sysadmin

  • My code doesn't work. Help?
    S SpeBeeTo

    Hello, I've been having problems showing the images in my xml file. I can show the first image (kopf_ap.jpg) no prob, but it doesn't change when the other labels are bound/shown in their appropriate label. Thanks for any help! I've been stuck for a while on this one... :S //Bind the labels. ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["ca_bildurl1"].ToString())); ca_titel.DataBindings.Add("Text",dt,"ca_titel"); ca_alter.DataBindings.Add("Text",dt,"ca_alter"); ca_sex.DataBindings.Add("Text",dt,"ca_sex"); burl.DataBindings.Add("Text",dt,"ca_bildurl1"); } XML Snippet ------------------------------------------------ 4 head ap kopf_ap.jpg 0 999 unknown sex 7 head occipital kopf_occi.jpg 0 999 unknown sex

    XML / XSL help graphics xml question

  • SelectedItem not working??? I'm stumped!
    S SpeBeeTo

    As a side note, (for what it's worth) If I remove the 1st image listed (kopf.jpg) from the directory (i.e. I delete the jpg file), the whole program doesn't work. :S

    C# csharp database graphics xml json

  • SelectedItem not working??? I'm stumped!
    S SpeBeeTo

    Here's my XML code: 4 head ap kopf_ap.jpg 0 999 n And the cs code public ADONETDataBinding() { InitializeComponent(); fragenkatalogDS = new DataSet(); fragenkatalogDS.Locale = CultureInfo.CurrentCulture;string xmlFileName; xmlFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xml"; xsdFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xsd"; FileStream FsXML = new FileStream(xmlFileName,FileMode.Open); FileStream FsXSD = new FileStream(xsdFileName,FileMode.Open); XmlTextReader xtrXSD = new XmlTextReader(FsXSD); fragenkatalogDS.ReadXmlSchema(xtrXSD); xtrXSD.Close(); FsXSD.Close(); XmlTextReader xtrXML = new XmlTextReader(FsXML); fragenkatalogDS.ReadXml(xtrXML); xtrXML.Close(); FsXML.Close(); DataTable dt = fragenkatalogDS.Tables["fragenkatalog"]; ca_id.DataSource = dt; ca_id.DisplayMember = "ca_titel"; string root = "\\Program Files\\SmartDeviceApplication1\\"; DataRowView drv = (DataRowView)ca_id.SelectedItem; ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["ca_bildurl1"].ToString())); ca_titel.DataBindings.Add("Text",dt,"ca_titel"); ca_alter.DataBindings.Add("Text",dt,"ca_alter"); ca_sex.DataBindings.Add("Text",dt,"ca_sex"); burl.DataBindings.Add("Text",dt,"ca_bildurl1"); } /// /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { base.Dispose( disposing ); } Thanks again!

    C# csharp database graphics xml json

  • SelectedItem not working??? I'm stumped!
    S SpeBeeTo

    Hello, I have a C# program I'm working on, and I finally got over a large hurdle, only to encounter the next. :laugh: I finally am able to display an image in my form (Working on a PocketPC), as well as other info that is located in an XML file. The problem is, is that I think the SelectedItem Property isn't syncing with the rest of the items.... Could someone tell me where i'm going wrong? I'd really appreciate input. :) Here it goes: xmlFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xml"; xsdFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xsd"; FileStream FsXML = new FileStream(xmlFileName,FileMode.Open); FileStream FsXSD = new FileStream(xsdFileName,FileMode.Open); XmlTextReader xtrXSD = new XmlTextReader(FsXSD); fragenkatalogDS.ReadXmlSchema(xtrXSD); xtrXSD.Close(); FsXSD.Close(); XmlTextReader xtrXML = new XmlTextReader(FsXML); fragenkatalogDS.ReadXml(xtrXML); xtrXML.Close(); FsXML.Close(); DataTable dt = fragenkatalogDS.Tables["fragenkatalog"]; ca_id.DataSource = dt; ca_id.DisplayMember = "ca_titel"; string root = "\\Program Files\\SmartDeviceApplication1\\"; DataRowView drv = (DataRowView)ca_id.SelectedItem; ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["ca_bildurl1"].ToString())); ca_titel.DataBindings.Add("Text",dt,"ca_titel"); ca_alter.DataBindings.Add("Text",dt,"ca_alter"); ca_sex.DataBindings.Add("Text",dt,"ca_sex"); burl.DataBindings.Add("Text",dt,"ca_bildurl1"); } The problem I've been having (I think) is with this line: DataRowView drv = (DataRowView)ca_id.SelectedItem; It seems as though it's not displaying any other image other than the first one in the database. Any ideas? Thanks a million! Martina

    C# csharp database graphics xml json

  • Insert string to Bitmap path?
    S SpeBeeTo

    Thank you, I had tried that, but it didn't seem to work. I ended up doing this: string root = "\\Program Files\\SmartDeviceApplication1\\"; DataRowView drv = (DataRowView)ca_id.SelectedItem; ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["im"].ToString())); I now have another problem - the SelectedItem doesn't seem to work, but at least the first image is being shown. :laugh: Thanks for your reply, though!

    XML / XSL graphics question csharp xml help

  • Insert string to Bitmap path?
    S SpeBeeTo

    How can I do this? I simply want to add the "im" field (which is in the XML file) at the end of the path of the new Bitmap line of code, so that the correct jpg is shown. I've created filestreams and everything works fine for the the text fields. The images are located in the "Program Files\SmartDeviceApplication1" directory, as is the XML file. If I type in the actual name of an image, it works, but of course the image is shown for every entry. (So I know the directory path is correct) Right now I'm getting "cannot convert string to System.Drawing.Image" In the simplest sense, I want to do this: \\Program Files\\SmartDeviceApplication1\\<im> so that it reads: \\Program Files\\SmartDeviceApplication1\\kopf_ap.jpg Any help is appreciated! Martina Snippet XML file: <im>>kopf_ap.jpg</im> Snippet Code (C#) picbox.DataBindings.Add("Image",dt,"im"); Bitmap bmp= new Bitmap("\\Program Files\\SmartDeviceApplication1\\"); this.picbox.Image = bmp +"im";

    XML / XSL graphics question csharp xml help

  • directing to a root directory in xml
    S SpeBeeTo

    Sorry, very stupid question, but.... how do I specify paths in XML? In other words, I want to specify a "root directory" for image files. Thanks!

    XML / XSL question xml

  • Easy JPG question!
    S SpeBeeTo

    Ok, it's changed. :) Sorry about that.

    XML / XSL csharp database xml help question

  • Easy JPG question!
    S SpeBeeTo

    Hi everyone, I first would like to warn you that I'm a newbie programmer. So if I have left out important code for you guys to determine what I'm doing wrong, let me know. :) I am making a PocketPC application using C# and an XML file as a database. I would like to display the corresponding JPG image in a PictureBox, or somewhere on the main page. A sample of my xml file. The bolded line is the picture reference. <fragenkatalog> <ca_id>4</ca_id> <ca_titel>head ap</ca_titel> **<ca_bildurl1>kopf_ap.jpg</ca_bildurl1>** <ca_disabled>0</ca_disabled> <ca_alter>999</ca_alter> <ca_sex>n</ca_sex> </fragenkatalog> This is what I have, which doesn't work. //Bind image to picturebox ca_bildurl.DataBindings.Add("Image",dt,"ca_bildurl1"); The ID is chosen from a ListBox, and the corresponding data is displayed on the screen. Any help would be appreciated! Thanks! M. -- modified at 21:09 Friday 30th December, 2005

    XML / XSL csharp database xml help question

  • WIndows CE SQL
    S SpeBeeTo

    I am using .NET C# to program a database program. I am modifying a program that already exists, and it creates an "SDF" file on my Pocket PC. Be warned, I am a very big newbie, and I've been trying to read up on this question, but it seems the more I read, the less I am understanding it all. :sigh::doh::omg: I have tried to install and use Microsoft Server 2000 (with Server CE), but I keep getting error messages 1069 and no matter waht I do, it doesn't seem to help. So I was wondering if I could use a MySQL database for this program? Furthermore, I have the database (with images/blobs) currently in MS-Access format, which was made on my PC. This is the database I would like to have on my PocketPC (I don't want to be able to edit it or anything. Just show it, with the pictures that go with the ID #.) Thanks so much everyone. I'm really getting confused about this all.

    Database csharp database help question css

  • New Combobox Challenge!
    S SpeBeeTo

    I have another problem, errr, challenge now. I am using an SQL database to save the info the person chooses on one form (pedbone.cs). Here's the code to the Combobox I've got on the "main" form (pedbone.cs): // populate the list - gender m_cTypes = new ArrayList(); m_cTypes.Add("Unknown"); m_cTypes.Add("Male"); m_cTypes.Add("Female"); TypeCombo.DataSource = m_cTypes; These are listed in a ListView SqlCeCommand sqlLoadEvents = m_cConn.CreateCommand(); sqlLoadEvents.CommandText = szSQL; SqlCeDataReader rReader = sqlLoadEvents.ExecuteReader(); while ( rReader.Read() ) { lvItem.SubItems.Add(GetTypeFromNumber ((int)rReader.GetValue(rReader.GetOrdinal("MovieType"))));// Gender CollectionList.Items.Add( lvItem ); } } And here I got the Combobox text to show in the ListView, by using this code private string GetTypeFromNumber(int nTypeID) { return (m_cTypes[nTypeID].ToString()); } Now, when you click on the listview item, a new form opens up (AddEditMovieForm.cs) to view the file in more detail. And here's where I'm running into a bit of a bind. public AddEditMovieForm(SqlCeConnection cConn, int nMovieID) { InitializeComponent(); m_cConn = cConn; m_nMovieID = nMovieID; m_cTypes = new ArrayList(); if ( m_nMovieID != -1 ) { SqlCeCommand sqlCommand = m_cConn.CreateCommand(); sqlCommand.CommandText = "SELECT * FROM MOVIE_MNGR_TABLE where MovieID = "+m_nMovieID.ToString(); SqlCeDataReader rReader = sqlCommand.ExecuteReader(); if ( rReader.Read() ) { } { GenderLabel.Text = rReader.GetValue(rReader.GetOrdinal("MovieType")).ToString();// Gender { } } } } Any help would be appreciated. I would like to add "male" or "female" into the GenderLabel.Text field. If I neglected to add any important code, please let me know. Thanks guys, M.

    C# database help

  • Combobox
    S SpeBeeTo

    Well, it worked. :) Thanks again. I have another problem, errr, challenge now. I am using an SQL database to save the info the person chooses on one form (pedbone.cs). Here's the code to the Combobox I've got on the "main" form (pedbone.cs): // populate the list - gender m_cTypes = new ArrayList(); m_cTypes.Add("Unknown"); m_cTypes.Add("Male"); m_cTypes.Add("Female"); TypeCombo.DataSource = m_cTypes; These are listed in a ListView SqlCeCommand sqlLoadEvents = m_cConn.CreateCommand(); sqlLoadEvents.CommandText = szSQL; SqlCeDataReader rReader = sqlLoadEvents.ExecuteReader(); while ( rReader.Read() ) { lvItem.SubItems.Add(GetTypeFromNumber ((int)rReader.GetValue(rReader.GetOrdinal("MovieType"))));// Gender CollectionList.Items.Add( lvItem ); } } And here I got the Combobox text to show in the ListView, by using this code private string GetTypeFromNumber(int nTypeID) { return (m_cTypes[nTypeID].ToString()); } Now, when you click on the listview item, a new form opens up (AddEditMovieForm.cs) to view the file in more detail. And here's where I'm running into a bit of a bind. public AddEditMovieForm(SqlCeConnection cConn, int nMovieID) { InitializeComponent(); m_cConn = cConn; m_nMovieID = nMovieID; m_cTypes = new ArrayList(); if ( m_nMovieID != -1 ) { SqlCeCommand sqlCommand = m_cConn.CreateCommand(); sqlCommand.CommandText = "SELECT * FROM MOVIE_MNGR_TABLE where MovieID = "+m_nMovieID.ToString(); SqlCeDataReader rReader = sqlCommand.ExecuteReader(); if ( rReader.Read() ) { } { GenderLabel.Text = rReader.GetValue(rReader.GetOrdinal("MovieType")).ToString();// Gender { } } } }

    C# question csharp tutorial

  • Combobox
    S SpeBeeTo

    Thanks guys! Off to the new "challenge"!!!! :)

    C# question csharp tutorial

  • Combobox
    S SpeBeeTo

    Okay, I thought I understood what I'm doing, but it's not really working. :confused: I added this: this.GLabel.Text = this.TypeCombo.Text; To the Windows Form Designer generated code. I added this: OnTypeCombo_SelectedIndexChanged "1" write male; It gives me the following error: Invalid token "1" in class, struct, or interface member declaration. :((

    C# question csharp tutorial

  • Combobox
    S SpeBeeTo

    Thank you so much! I will try it out immediately and let you know! Thanks again! :-D

    C# question csharp tutorial

  • Combobox
    S SpeBeeTo

    Hi. I am a newbie in programming C#, and am having a mental block. I am programming for the pocketPC. I have a Combobox named "Type" and have a list there. I want to show the results of the entry from the combobox into a text label. For example, I pick "fruit" from the combobox. I want to display on the screen: "This food is a fruit" If I pick "vegetable" from the combobox, it should display: "This food is a vegetable" Right now, I'm getting: "This food is a 1" "This food is a 2" How can I make the 2 into vegetable? This is what I have, and I have a feeling it has to do with the GetValue and/or GetOrdinal.... I just can't seem to get it to work.... TypeLabel.Text = rReader.GetValue(rReader.GetOrdinal("MovieType")).ToString(); Thanks... Sorry for such a dumb question. :sigh: If I haven't given you enough code, let me know. I can always add more. :laugh:

    C# question csharp tutorial

  • ADOCE31.TLB
    S SpeBeeTo

    If you don't have adoce31.tlb, you can replace it with adoce31.dll: #import "C:\Windows CE Tools\wce300\Pocket PC 2002\dataaccess31\target\arm\adoce31.dll" rename_namespace("ADOCG") rename("EOF", "EndOfFile")using namespace ADOCG;

    Mobile com question

  • Installing a web app on PDA
    S SpeBeeTo

    pk123us wrote:

    Can it be done without any change to the existing application runing on my localhost?

    Doubtful. Try it and see and post your results! M.

    Mobile csharp help asp-net database sql-server

  • Combobox
    S SpeBeeTo

    Hi. I have a Combobox "Type" and have the list there. I want to show the results of the entry from the combobox into a text. For example, I pick "Fruit" from the combobox. I want to display on the screen: "This food is a Fruit" If I pick "Vegetable" from the combobox, it will display: "This food is a vegetable" Right now, I'm getting: "This food is a 2" How can I make the 2 into Vegetable? This is what I have, and I have a feeling it has to do with the GetValue and/or GetOrdinal.... I just can't seem to get it to work.... :( TypeLabel.Text = rReader.GetValue(rReader.GetOrdinal("MovieType")).ToString(); Thanks as always... Sorry for such a dumb question. :^)

    Mobile question tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups