|
I don't think that IDE is robust enough to allow you to do that with it's resource editors. But you can certainly do that in code. Try reading over this[^]. You could adjust the window and control styles and even draw your own control on WM_PAINT.
I'll try to scrounge up a code snip if I can find it.
ɹǝʌo ɹoʇıuoɯ ɹnoʎ dılɟ sıɥʇ pɐǝɹ ʇ,uɐɔ noʎ ɟı
|
|
|
|
|
i have seen too much demo show how to use the hibernate. just access the only one talbe. i need set up the multiple relationship tables .
so i need the demo to show how to step across to access other talbe.
please contact me ,thanks!
|
|
|
|
|
If you are trying to get your database to behave properly you might want to try the database forum: Here[^]
ɹǝʌo ɹoʇıuoɯ ɹnoʎ dılɟ sıɥʇ pɐǝɹ ʇ,uɐɔ noʎ ɟı
|
|
|
|
|
I need to create a Excel Sheet from a cf application. I'm doing a "mobile version" of an PC program, and the result is sent to a server processing the data, so a csv file is not good enougth.
Since pocet Excel don't have any API like the "PC version" has, I cant do it in the same way as I have in my PC program.
Bacicly I have a DataGrid, that I need to dump to a excel file.
Does anyone have an idea on how to do it?
Same link to the big mysterius MSDN, that I havent found...?
Or perhaps someone know that there is'nt any good way to do it?
Myabe someone knows about the file spec for an Excel file, so I can write my own "ExcelWriter"??
Thanksfull for any answer...
|
|
|
|
|
|
WM6 programming...
How do I detect that my program is already running and switch to it instead of creating an new instance?
Thanks!
ggg
|
|
|
|
|
I am assuming you are writing using a native language (c/c++) since this is less of an issue with managed programs. I can think of two options. One involves using events, the other using the FindWindow function .
You can make use of named events so that a program knows
- Whethere or not it is the first instance
- If it is not the first instance the event can be used to notify the already existing instance to take focus
To use the event to detect whether or not a starting instance is the first instance all you have to do is look at the return result from a call to CreateEvent . If the return value is SUCCESS then this is the first instance of the program. If the return value is ERROR_ALREADY_EXISTS then this is a secondary instance of the program. ERROR_ALREADY_EXISTS is a successful error code and what is returned to you when this occurs is a handle to the same underlying event object that the first instance of the program is using. A full discussion of events isn't something that I can put in this reply but that is what you may want to look at.
You other option is to use the FindWindow function to see if another instance of your application is already running. If a window is found then use SetForegroundWindows to give it focus. This is far easier than using events but has drawbacks.
With the event solution you will have to make use of multiple threads. So it's more complex but also more reliable. With the FindWindow/SetForegroundWindow solution if two instances of your application are started in rapid succession then they could both check for the existence of a window before either instance has actually created a window. So neither instance will find the other. Since event creation is atomic this problem would never occurr.
|
|
|
|
|
Hi.
I try to Run the fallow pice of code above on my xbox 360 and I get a Compact Framework error saying the XBOX 360 is not compatibily with Asynchronous Calls.
Probably my code has some kide of error because the xbox has the method Guide.BeginShowKeyboardInput and Guide.BeginShowStorageDeviceSelector who as Asynchronous.
What I'm doing wrong?
CODE:
------------------------------
using System;
using System.Threading;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Storage;
namespace GameTest
{
public class GameTestProgram : Game
{
private bool flag = false;
private event EventHandler AsyncEvent;
public GameTestProgram()
{
AsyncEvent += new EventHandler(GameTestProgram_douglas);
flag = true;
}
void GameTestProgram_douglas(object sender, EventArgs e)
{
throw new NotImplementedException("Finaly BeginInvoke Works");
}
protected override void Update(GameTime gameTime)
{
base.Update(gameTime);
if (flag)
if (AsyncEvent != null)
AsyncEvent.BeginInvoke(null, null, null, this);
flag = false;
}
}
static class Program
{
static void Main(string[] args)
{
using (GameTestProgram game = new GameTestProgram())
{
game.Run();
}
}
}
}
Thx for help
|
|
|
|
|
The implementation of the compact framework used on Windows CE based devices defines BeginInvoke and EndInvoke only to provide interface compatibility but these methods are not implemented on delegates and as such throw NotImplementedExceptions. I can only assume that same behaviour is present in the compact framework for the xbox 360.
Other methods that you encounter that contain the word Begin and End are not implemented as compiler generated delegates and thus don't fall under the same usage restrictions. The Begin and End exists in these methods because of a coding pattern and naming that Microsoft is conforming to. But adherence to these patterns is independent of the absence of the compiler generated Begin/End Invoke methods on delegates.
Keep in mind I am writing this based on assumptions from the Windows CE compact framework.
|
|
|
|
|
Hello,
I have installed VS.net 2005 and i want to know the additional softwares required for developing mobile applications using VB.net 2005.
When i try to create any sample application, it shows message to install .NET Framework 1.0.
but When i try to install .NET Framework 1.0 it says that Framework 1.1 should be installed first.
Please anyone can list the softwares required, also please can give me some idea or sample code to start developing for my Nokia 3230.
Thanks In Advance.
|
|
|
|
|
Perhaps i am wrong, but i am not thinking that you can develop applications for Nokia phones, using V.S. 2005 and .NET Framework (or .NET Compact Framework).
With these tools you can only develop for Windows Mobile /Windows CE based Phones.
I have not a Nokia phone and then I can't suggest more.
|
|
|
|
|
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
|
|
|
|