Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

String in smartphone
Hello!

Well, I'm trying to do an application to smartphone in the VS 2005 that
changes an image from a picture box every time that you click in the menu.
I'm getting the image in the directory of application:

string path = @" c:\temp\DeviceApplication3\DeviceApplica
tion3\1.bmp";
Image img = new Bitmap(path);

I put the "@" before like I do in the Win App, but in all places that has
"\" is coming "\\", so, the string be like this:

path : @" c:\\temp\\DeviceApplication3\\DeviceAppl
ication3\\1.bmp";

I've tried other experiment, but i didn't get. Someone knows why this is
happening e how can i resolve??

Thanx!

Report this thread to moderator Post Follow-up to this message
Old Post
Cleyton
01-31-06 12:05 AM


Re: String in smartphone
First of all, Windows CE does not have drive letters and does not support
relative paths.



As to slashes, you either use verbatim strings with @ and get your string
exactly as you typed it or you do not use @ and escape special characters
like using '\' to get '' in actual string.



For example, the following strings are the same and represent correct path
on CE:



string foo = "\\Program Files\\My Application\\app.exe";



string bar = @"\Program Files\My Application\app.exe";



--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group... />
work?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Cleyton" <Cleyton@discussions.microsoft.com> wrote in message
news:D43F3CB0-792E-4AAF-AAD4-49DC399DAF9D@microsoft.com...
> Hello!
>
> Well, I'm trying to do an application to smartphone in the VS 2005 that
> changes an image from a picture box every time that you click in the menu.
> I'm getting the image in the directory of application:
>
> string path = @" c:\temp\DeviceApplication3\DeviceApplica
tion3\1.bmp";
> Image img = new Bitmap(path);
>
> I put the "@" before like I do in the Win App, but in all places that has
> "\" is coming "\\", so, the string be like this:
>
> path : @" c:\\temp\\DeviceApplication3\\DeviceAppl
ication3\\1.bmp";
>
> I've tried other experiment, but i didn't get. Someone knows why this is
> happening e how can i resolve??
>
> Thanx!



Report this thread to moderator Post Follow-up to this message
Old Post
Ilya Tumanov [MS]
01-31-06 12:05 AM


Re: String in smartphone
If you are doing an image browser then what you are doing is certainly
fine, but if you are dealing with a specific set of images you should
check the MSDN Library for information on using "embedded resources".
If that is what you want to do then you can skip the whole disk path
problem and get into a whole new world of problems with embedded
resource paths ;-)
-MSenne


Report this thread to moderator Post Follow-up to this message
Old Post
MSenne
02-01-06 12:08 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Smartphone Developer Forum archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:16 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.