|
Go here[^] for how you can develop for a Nokia phone using .Net Framework.
|
|
|
|
|
Visual Studio 2005 does not ship with everything you need for targetting the Compact Framework. You will also need to install the Windows Mobile SDKs.
|
|
|
|
|
You may want to look at the IDE from ZHMICRO. It is based on C++, doesn't need SDK's, and the applications you write can run on other mobile OS's without having to change any code.
|
|
|
|
|
I'm new to WM development, but I know C (mostly embedded, but also LabWindows/CVI).
(I think I'm developing in MFC -- not exactly sure how that works even thought Joel gave me a good description in another forum.)
So, I'm all good with the straight C type stuff, I've opened and read a file, save the data from it in an array.
The problem I'm having is finding something to help get me going in a direction to display the data on the screen.
What I'd ultimately like to do is have a check box for each line and then two more columns of text from the file (two words, one for each column), sort of like a table. Like this:
Check Box First Second
x this that
x some something
I have searched MSDN, but I can't find anything that is straight forward (like CreateWindow(), CreateTable(), and FillCell()).
I've searched for a C++ sample, but nothing seems to spring out that is doing anything like this that I can find, everything I've found is displaying pictures, or is in C# or using Classes (which seems too complicated for what I am trying to do).
Any hints as to what I can look at to get going in the right direction, or some sample code that I can experiment, or even some functions I can search MSDN for would be greatly appreciated.
Thanks
|
|
|
|
|
I keep thinking what you are describing is best served by a ListView in detail mode with a checkbox, but I can't find my MFC reference to verify this. But I am sending this message just so that you know I will look into this question.
|
|
|
|
|
I found an example that I'm trying to use for a reference, but it is doing stuff with pictures, and I just want to display text.
It is using the following functions:
BeginPaint()
LoadString()
SHLoadImageResource()
CreateFontIndirect()
GetClientRect()
DrawText()
GetClientRect()
DrawText()
EndPaint()
There is a little more, but I think this is the gist of writing to the screen.
In tinkering with this example, I keep breaking it trying to figure out which parts are the parts that write just the text; while not displaying the image.
The code I'm using (I can't remember where I found it, it might have been here, but I can't find it again) displays a picture with a text caption under it.
I'm trying to see how the text part works byt removing the image part, so it just displays the caption.
When I do it, I get the caption with the first picture, but not the second picture. The screen is just blank.
|
|
|
|
|
FYI:
OK, I got through this, and I am drawing rectangles and filling with text
fbrush = CreateSolidBrush(bcol);
FillRect(ps.hdc, &rect, fbrush);
wsprintf(szLabel, TEXT("Remove"));
rect.top += 2;
rect.left += 2;
DrawText(ps.hdc, szLabel, -1, &rect, DT_LEFT | DT_NOPREFIX | DT_SINGLELINE);
This is creating a rectangle on the screen, filling it with a specified color, and writing the text "Remove" in the rectangle.
The problem I was having was the code I was refering to had an image that it was displaying with text under it. I had problems figuring out what was the image part and what was the text part. I basically just looked at the functions, and read about them at MSDN, and created what I have above.
The one thing I can't figure out is the background color for the text.
The rectangles I'm using are filled with a background color, but the text background fills with white.
I have not been able to find where to change that, there does not seem to be an option for DrawText.
Anyone know?
|
|
|
|
|
OK, a little more searching and I found this:
SetBkMode(ps.hdc, TRANSPARENT);
to make the text background transparent.
I thought it would be part of the Font or DrawText.
|
|
|
|
|
Please help.
I read this message
http://social.msdn.microsoft.com/forums/en-US/vssmartdevicesvbcs/thread/d5544b95-5fc2-46e8-8007-de8bfe3ada7a/
When wrote this code
program hello;<br />
{$apptype console}<br />
const<br />
SND_SYNC = $0000; { play synchronously (default) }<br />
SND_ASYNC = $0001; { play asynchronously }<br />
SND_NODEFAULT = $0002; { don't use default sound }<br />
SND_MEMORY = $0004; { lpszSoundName points to a memory file }<br />
SND_LOOP = $0008; { loop the sound until next sndPlaySound }<br />
SND_NOSTOP = $0010; { don't stop any currently playing sound }<br />
SND_NOWAIT = $00002000; { don't wait if the driver is busy }<br />
SND_ALIAS = $00010000; { name is a registry alias }<br />
SND_ALIAS_ID = $00110000; { alias is a predefined ID }<br />
SND_FILENAME = $00020000; { name is file name }<br />
SND_RESOURCE = $00040004; { name is resource name or atom }<br />
SND_PURGE = $0040; { purge non-static events for task }<br />
SND_APPLICATION = $0080; { look for application specific association }<br />
<br />
function PlaySound(pszSound: PChar; hmod: HMODULE; fdwSound: DWORD): BOOLean; stdcall; external 'Coredll.DLL' name 'PlaySound';<br />
<br />
var<br />
f:text;<br />
s:string;<br />
begin<br />
assign(f,'tex1.txt');<br />
rewrite(f);<br />
writeln(f,'Hello world');<br />
s:='tst1.wav';<br />
//playsound(@s[1],0, SND_FILENAME);<br />
playsound('tst1.wav',0, SND_FILENAME);<br />
writeln(f,'played');<br />
close(f);<br />
end.
and compiled with ppcrossarm (FreePascal).
As a result I got "hello.exe is not a valid PocketPC application", BUT
this is not compiler error. If comment the execution of playsound() all works fine. So, Coredll.DLL don't contains PlaySound function.
If packed by UPX just halts without any message.
Where I can find good description of all functions of dll's of WM5?
Or if exists an opensource program for windows Mobile 5.0 that plays wma or mp3 and controls the "speed dial" button... Google found nothing.
Thanks.
Sorry for my bad English.
|
|
|
|
|
Hello Everyone
I need to start up my application when user activates the PDA or on the start up event of the PDA.
Is there any way to make the application start at the activation or start up event of the WM6 based device.
Thanks in advance
Manoj Kaushik
|
|
|
|
|
just create a shortcut to app in windows\startup folder or put a registry entry that I don't quite remember but if u're still interested let me know in this thread i'll find out
greetings
|
|
|
|
|
Thanks for the help, I have successfully initiated my application at the start up event
Regards
Manoj Kaushik
|
|
|
|
|
|
Hello Joel
Thanks for the help, it really hepled
|
|
|
|
|
|
Dear Code Project,
i am currently developing a Management system for a university which can be used on mobile. Currently the company already have a Management system but it is desktop based. I am just putting few and important modules to be access via mobile.
It will be more likely a website which they can access through mobile. they will be able to take a picture and send it to database, able to view reports and perform certain tasks.
i am planning to use ASP.net Mobile for this.
Would like to hear your suggestion and feedbacks or any recommendations you have.
I really need certain technical information. Its for my final year project
Thanks.
Note: Admin, please do not hesitate to move this thread to another forum if suitable.
|
|
|
|
|
It sounds like you already know the direction in which you should go. But for the most part it sounds like you are describing a typical smart client that would have online and offline functionality. You may want to check out the Windows Mobile Line of Business Accelerator[^] as it will contain a lot of solutions for issues you may encounter.
|
|
|
|
|
Basically it will be more like a webpage which can be accessed through mobile device. I am planning to make it through ASP.NET with Access database. user can point the location through their browser and then they'll be able to perform certain task. Like generate reports, marketing statistics, upload picture.
Do you know any other mobile based management system which i can refer as my literature review.
Thanks.
|
|
|
|
|
|
Hi,
Our company has decided to use SQL Server compact Database for our mobile application. We want to use LINQ to SQL, but SSCE does not support dbml designer. Is it possible to SQLMetalBuilder tool to generate dbml code for SSCE? If it is possible, how to use the tool?
Also can sqlMetal.exe be used with SSCE to generate dbml code?
Thanks in advance,
Veena
|
|
|
|
|
hi.
i want to launch multiple instances of my .NET CF 3.5 application on a pocket pc. there were a solution for .NET CF 1.0 here[^], but it's not suitable for .NET CF 3.5 because now there is a window with class name #NETCF_AGL_PARK_<path-to-application>, and changing window text doesn't help...
do anyone know any other solutions of this problem?
De profundis clamat...
modified on Tuesday, January 13, 2009 6:46 AM
|
|
|
|
|
Would you mind describing why you need multiple instances of your program? There may be other work-arounds that will work for you but before we know if they are appropriate for consideration we would need to know what you are trying to do.
|
|
|
|
|
Hi all,
I written the following code to make "DPI-Aware" the ImageSize property of an ImageList Control in my application (V.B. .Net C.F.2) in V.S. 2005 environment:
Dim RK As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Drivers\Display\GPE")
Dim LPX As String = CType(RK.GetValue("LogicalPixelsX"), String)
Dim LPY As String = CType(RK.GetValue("LogicalPixelsY"), String)
If LPX = 96 And LPY = 96 Then
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Else
Me.ImageList1.ImageSize = New System.Drawing.Size(32, 32)
End If
Well, I placed it in the Form1_Load event, and it works.
But with doubt if that place was the "rigth place", I tryed to place it in the "Form1.Designer.vb" code (because I think it is the "more appropriate" place).
I placed the first 3 line in the begin of code:
<global.microsoft.visualbasic.compilerservices.designergenerated()> _
Partial Public Class Form1
Inherits System.Windows.Forms.Form
Dim RK As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Drivers\Display\GPE")
Dim LPX As String = CType(RK.GetValue("LogicalPixelsX"), String)
Dim LPY As String = CType(RK.GetValue("LogicalPixelsY"), String)
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
and the "If-Else" conditions immediately above the ImageList.Add property code:
If LPX = 96 And LPY = 96 Then
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
Else
Me.ImageList1.ImageSize = New System.Drawing.Size(32, 32)
End If
Me.ImageList1.Images.Clear()
Me.ImageList1.Images.Add(CType(resources.GetObject("resource"), System.Drawing.Image))
Me.ImageList1.Images.Add(CType(resources.GetObject("resource1"), System.Drawing.Image))
Me.ImageList1.Images.Add(CType(resources.GetObject("resource2"), System.Drawing.Image))
Also if it's recomanded to not write code-lines directly in .Designer.vb code, the code works correctly in both emulator and device, BUT sometime (I not understood why and in witch circumstances), only the If-Else conditions lines above are deleted and replaced with the single line:
Me.ImageList1.ImageSize = New System.Drawing.Size(32, 32)
And then I must replace it again,
Of course, the problem is only in the debug phase, while after compilation there is no problem on device.
I know that this is a "not easy" question but I hope that someone can help me to clear my ideas about where it's more appropriate to place above code.
Thanks
|
|
|
|
|
You had it right the first time with placing the code in Form_Load . The designer section of the code is "owned" by Visual Studio and as you've seen VS does not gaurantee that changes you make to it will be preserved. If you plan to have others use and modify your code then the designer area isn't idea because no one else would know to look there for your code. Other than the Form_Load method the other place to consider would be in the constructor of the form right after the InitializeComponent method is called.
|
|
|
|
|
Thank you very much Joel!
|
|
|
|