|
Yes picture Box will display animated GIF. I have been doing this since Vis 2003.
|
|
|
|
|
But how can you help me how to display animated gif in picturebox for windows mobile 6 using C#
Thanks in advance
|
|
|
|
|
I have no experience with Windows Mobile 6.
|
|
|
|
|
Check out this article Strip Images From Animated Gif[^].The article shows how to access a specific frame in gif image. So what you need split the source into frames ,and show them separately using timer ...
|
|
|
|
|
I'm looking at implementing a Collection object for the objects exposed by my class, but I'm thinking: why not just offer a generic List<t> instead? Is there really any reason to offer a Collection anymore?
|
|
|
|
|
I guess not unless you want to add some sort of custom behaviour.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
|
|
How... odd. I am not getting this warning, although my public class definitely returns List<t>...
|
|
|
|
|
Wonders never cease. I had no idea the Code Analysis Tool for Managed Code was hidden there in Visual Studio.
Now I'm afraid to turn it on - the flurry of 'Don't's will surely set me back another week.
|
|
|
|
|
Never heard of that.
That article doesn't present any really compelling reasons why it should be followed.
And anyway it doesn't change the basic question.
Now to go review my code and see where I violate that rule...
|
|
|
|
|
It really depends on what you need to do. If you need to add custom behavior, then you do need to write your own collection. However, even by writing your own collection you can still derive from one of the generic collections. Also, the recommendation is to only use the List<T> class internally; instead you should return a Collection<T> or a ReadOnlyCollection (which you can get from List<T>.AsReadOnly).
|
|
|
|
|
I have a C# class, say PhoneControlX, which is compiled into one DLL and referenced by both managed .NET and Unmanaged COM client (C# Window form and VB6 respectively). Via COM Interop, PhoneControlX implements IPhoneControlX and IPhoneControlXEvents to expose a couple of methods and one event, CauseCallOffered, to VB6 event sink. The C# Window form invokes methods and receive the event without any problem, while the VB6 works fine on method invocation only but fails on event sinking.
Specifically, PhoneControlX registers itself to PhoneControlServer, a remote object gotten via Activator. When a call comes in, PhoneControlServer will invoke CauseCallback to fire the event, PhoneControlCallback and hence PhoneControlCallbackEventHandler. However, when the client is VB6, PhoneControlCallbackEventHandler is never invoked.
Part of the code is as follows:
===============================
[ClassInterface(ClassInterfaceType.None)]
[ComSourceInterfaces( typeof(IPhoneControlXEvents) )]
public class PhoneControlX : MarshalByRefObject, IPhoneControlX
{
public event PhoneControlXEventHandler OnCallOffered;
...
public bool Connect()
{
BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["name"] = "RemotingClient";
props["port"] = 0;
_HttpChannel = new HttpChannel(props, clientProvider, serverProvider);
ChannelServices.RegisterChannel(_HttpChannel);
_PhoneControlServer = (IPhoneControlServer) Activator.GetObject(typeof IPhoneControlServer),remotingURI);
_PhoneControlServer.RegisterCallback(this);
}
public void PhoneControlCallbackEventHandler(object sender, IPhoneControlEventArgs e)
{
PhoneControlXEventHandler xe = new PhoneControlXEventHandler(CauseCallOffered);
AsyncCallback acbCauseCallOfferedComplete = new AsyncCallback(CauseCallOfferedComplete);
xe.BeginInvoke(e,acbCauseCallOfferedComplete,PhoneControlOperation.CallOffered);
}
}
public class PhoneControlServer : MarshalByRefObject, IPhoneControlServer
{
public event PhoneControlEventHandler PhoneControlCallback;
...
public void RegisterCallback(IPhoneControlX x)
{
this.PhoneControlCallback += new PhoneControlEventHandler(x.PhoneControlCallbackEventHandler);
}
...
public void CauseCallback(IPhoneControlEventArgs e)
{
if(this.PhoneControlCallback != null)
PhoneControlCallback(this,e);
}
}
I've worked on this problem for almost one week.
Any hints, directions or help is highly appreciated.
modified on Saturday, December 22, 2007 3:13:18 PM
|
|
|
|
|
hi there,
i wanna know that how can i make sub properties in a property(something like this)??
for example:
we can see padding property have 5 sub properties(ALL, Left, Right, Bottom....)
and second question is how can i define the category of the property which i made(shows when categorized)?
third is, how can i write desciption that show at bottom when i click on that property?
thanks
Becoming Programmer...
|
|
|
|
|
1 - the way to do this is for your padding property to be a struct. The 'sub properties' are actually properties on the struct.
2 - Not sure, I know you can do it, but I'd only be googling for you, I don't use that stuff, so I don't know.
3 - If you type /// above a property, the IDE will fill out the shell of a comment, that's where that text comes from.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The first sounds like you want an enum .
The second is "Attributes".
The third was answered already.
|
|
|
|
|
1. You can use a class or struct. But you will need to make your own TypeEditor if you want to change the value on IDE/Designer and persist i the InitializeComponent part, aka WinForm designing. Search Code Project for an article on this.
2. If you mean showed in property grid, I believe it's in System.ComponentModel.Category. Just add it before the public property defination.
3. Same, it's in System.ComponentMode.Description.
Sorry didn't have my work computer so it's all from my memory :p
A sample from an article here.[^]
|
|
|
|
|
thank you very much, thanks to others too
Becoming Programmer...
modified on Sunday, December 23, 2007 12:08:31 AM
|
|
|
|
|
|
darkelv wrote: Or you can have your own UI editor
http://www.codeproject.com/KB/cs/propertyeditor.aspx[^]
thanks so much, it have all which i required
Becoming Programmer...
|
|
|
|
|
hi
how to format numbers of my app to arabic with NumberFormatInfo class?
thanks
|
|
|
|
|
Has google turned up any examples?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Hi,
I have a problem with Crystal report and I don't know if I am in the correct forum but
this is my problem :
How Can I add a runtime value to the report?
I mean I want to create a page for print and I want to put the entered data into the report.
or after the data is added to the DB , how can i read that ?
PLEASE HELP ME
|
|
|
|