|
Hey,
I have a status bar that I have made on my project that has a bunch of icons on it.
The problem is, that if I call my SetStatusIcon() function from another thread other than the UI thread, it will not draw the changes to the Form. The calls are all Invoked and are thread-safe. I have used watches to check the object it does change.
I have tried everything from changing the the image property to dynamically loading each image into its own PictureBox on load and changing its visibility to change the icon, but nothing seems to work.
Any help on why this even could be happening would be awesome.
Thanks in advance,
Michael.
EDIT:
My code for the 'SetStatusIcon()' is as follows. Each status icon has this function, with just the relevant variables changed.
<br />
Friend Sub SetStatusIcon(ByVal Status As StatusIconType)<br />
If Me.InvokeRequired Then<br />
Me.Invoke(New delSetStatus(AddressOf SetStatusIcon), Status)<br />
Else<br />
Select Case Status<br />
Case StatusIconType.Status0<br />
iconStatus.Image = New Bitmap("Status0.bmp")<br />
Case StatusIconType.Status1<br />
iconStatus.Image = New Bitmap("Status1.bmp")<br />
Case StatusIconType.Status2<br />
iconStatus.Image = New Bitmap("Status2.bmp")<br />
Case Else<br />
iconStatus.Image = Nothing<br />
End Select<br />
End If<br />
End Sub<br />
modified on Monday, March 29, 2010 4:28 AM
|
|
|
|
|
I would suggest you to send a message instead of calling the SetStatusIcon() from another thread. In the message handler you can call SetStatusIcon() function.
|
|
|
|
|
Hey thanks for the reply.
What do you mean by 'send a message'? I'm not exactly sure what that means. Could you please give me an example?
|
|
|
|
|
Take a look at the documentation: http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx
I don't know how to do this in .Net
|
|
|
|
|
hi
how to get Serial number from Windows CE ? (not Device ID) in C# ?
thank's in advance
|
|
|
|
|
|
I've been trying to convert an old app to run on Windows Phone 7. I hit a roadblock when the compiler didn't recognize XmlNode or XmlDocument. I've got a reference to System.Xml and a Using statement for System.Xml.
Am I missing something simple here or do they really not support XmlNode or XmlDocument on Windows Phone 7?
<br />
using System;<br />
using System.Net;<br />
using System.Xml;<br />
<br />
public class MyClass<br />
{<br />
public MyClass()<br />
{<br />
XmlNode test;
}<br />
}<br />
|
|
|
|
|
Have you tried XNode and XDocument?
|
|
|
|
|
|
Hi All,
Please provide some help.
I have a textarea where unicode characters are displayed. While executing the application in the mobile device, I want to save that to a text file. What encoding i have to use for that. I tried with UTF-8 and UTF-16. The created file when opened in desktop PC, looks fine. But when the file in opened in the mobile device, some junk characters are getting displayed. What i have to do so that i can view the characters corerctly? When the files created from desktop PC are transferred to mobile device and checked, i just have to open the file & select the appropriate font, the file will be displayed corerctly. But the files created within the mobile device, even after changing the font sahows only junk characters. What might be the problem? What encoding should i use for the mobile device. Please help.
|
|
|
|
|
May be you can compare the working file and the created file on a binary editor and see if anything like an encoding signature is missing.
|
|
|
|
|
Hi,
If i open the text file in the mobile device, it opens in word mobile. There i can see the 1st two characters which represent the starting of an unicode file (FE FF).
As per your suggestion, i transferred the text file created from the mobile device to PC and checked in a binary editor. This file and the one created in the desktop PC looks the same.
Any idea what encoding i have to use? Should i use any other encoding than UTF8 and UTF16?
|
|
|
|
|
I think the encoding to be used would be up to your requirements and preferences. I think UNICODE (UTF-16) might be easier to work with because it may not require converstions as Win Mobile/WinCE is an UNICODE (UTF-16) based OS. Working with UTF-8 usually requires a conversion using WideCharToMultiByte() API.
|
|
|
|
|
I had tried with UTF-16 also. I get the same result. (When i transfer the file to PC, i could see the characters. But when opend in mobile device, it appears as block block characters).
|
|
|
|
|
May be you need correct fonts on the mobile device.
|
|
|
|
|
I have placed the concerned font under \windows as well as \windos\fonts folders.
My doubt is whether the mobile devices have unicode support or do i have to do something to enable it? When i open the text file created, the 1st two characters are those for FE FF. Normally for any file on PC, we wont be able to see those characters when we open the text file. If we open in a binary editor only we could see them.Or is it any problem related to my writing into the file? I am using like below
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("FileS1.txt"), "UTF-16"));
|
|
|
|
|
Hi all,
I'm developing one C++ (EVC4) and one C# (VS2005) program on WinCE that need to communicate with each other and exchange small data packets. What would be the best mechanism to do this? I'm currently using sockets but wondered if there was anything better.
TIA.
|
|
|
|
|
|
Hi all, I'm currently using C# to run on Windows Mobile. May I seek some suggestions on how to perform reverse geocoding on Windows Mobile? Any help would be appreciated. Thanks in advance.
|
|
|
|
|
I need to fetch the screen dimensions of blackberry and align the screen accordingly in ASP.NET application.How to do that?
|
|
|
|
|
Does anyone have a source code for long Numbers or software? This should enable two ways messaging using a common sim card available from mobile phone operators. The mobile phone should be attached to a computer. This should be similar to short code (premium rate) but it should be Non-Premium Short Code, ie, it does not charge more than the normal sms charges but out-replies a pre-defined message and also charges normal sms charges for replying.
There should be admin and clients panel allowing many independent users and should be web based
-- Modified Sunday, March 21, 2010 3:12 PM
|
|
|
|
|
there is plenty of code around for 'long Numbers' - but I wonder if we are talking about the the same thing here - what do 'long numbers' have to do with this sms stuff you appear to be doing ?
Depending on what you're doing, decNumber http://speleotrove.com/decimal/decnumber.html[^] might help you - but there's not enough context in what you've written to say ..
'g'
|
|
|
|
|
All,
My boss wants to start investing in Mobile Device/Smartphone development. First requirement is that the applications should port to any type of Smartphone (iPhone, Droid, Blackberry, etc.), in other words one application can work on many different phones.
So, my first question would be what platform(s) is best that we can develop on that allows us to work on any phone?
We're primarily a .NET shop, but some of us have backgrounds in other languages, Java for example.
Thanks in advance.
Follow Up- I found this, anyone know or hear of these guys before?
http://www.mobilitywire.com/cascada-mobile/2009/09/09/921[^]
modified on Friday, March 19, 2010 8:02 AM
|
|
|
|
|
Hi,
We also have a product that runs on a couple of different smartphone platforms (Symbian S60 and Blackberry).
I'm sorry that this isn't the answer you want to hear, but unfortunately all smartphone platforms that are out there at the moment rely on their own custom frameworks and technologies in order to work. For example:
- Blackberry: Java (all applications rely on a Blackberry specific framework to do anything)
- Symbian S60: Java (relies on Symbian specific framework), native C++ and a Nokia-specific version of Qt for UI work, Python
- Symbian S80: Java (Symbian S60 applications won't run on an S80 handset and vise-versa)
- iPhone: Objective-C. Totally unlike anything else out there. Chance of code-reuse for other platforms is zero.
- Windows Phone 7: Looks like it's going to use .NET Compact with either XNA or Silverlight for a front end
To the best of our knowledge, there is no one language or series of libraries that would allow your application to run on all smartphone platforms without significant modification and customisation for each platform.
If anyone thinks I'm wrong and knows of a framework that would do this, then I'd be interested to hear about it
Cheers,
Russ-T
|
|
|
|
|