|
And a second bag of WTF for you Mr. Simmons
|
|
|
|
|
Now that clarified STAThread. Could you please also explain MTAThread?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:34 AM
|
|
|
|
|
And now, for some haiku...
A thread semaphore
Ordered chaos is timely
Relinquished again
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
This site needs a literary forum now.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I know how to add the wmp component, but I want to add the following to the wmp (Two buttons):
* Slow motion function
* Zoom function
I looked this entire website and google, but I didn't found any answers. Who can help me out?
|
|
|
|
|
You'd have to write plugins to Meida Player yo pull something like this off. You'll find very few, if any, C# or VB.NET examples of doing anything like this though. The Media Player SDK is written for use with C++.
|
|
|
|
|
Hmm... That's too bad. Aren't there any other componments to download or media players with these two functions (Zoom and speed)?
|
|
|
|
|
You're going to have to research that yourself. I don't know of any myself.
|
|
|
|
|
Hello Everyone ...
I am a new member here in your website
and i hope you help me
in fact i'm almost done from programming [ RMS ] Restaurant E.Management System Project
but now i think about make my own theme By " XAML " and attach it to the project ...!?
i know how to make this XAML file, but i don't know how to use it in the project
|
|
|
|
|
Is your project a WPF or Silverlight project? If so, you can just add a ResourceDictionary file to your project and use it. If it's not, then good luck - you've got a lot of plumbing and resource management code to write on your own.
|
|
|
|
|
i'm afraid that it's not ,
but do you mean i need to build my own components from A to Z
Or there is some easy ways to make it done
Oh , really can you give me a little tips about [ WPF ] ...!?
Thank you
Best Regards
|
|
|
|
|
Hi,
I try to use Late Bound COM Objects to get pointer on Microsoft outlook.
When i use Type.GetTypeFromProgID i get ComType and its work find.
But after CreateInstance i get an exception with error code 80040111.
I google the error code and i did not find anything logically explanation.
this is the code ... only two lines ...
<br />
Type Comtype = Type.GetTypeFromProgID("Outlook.Application.11");<br />
<br />
object obj = Activator.CreateInstance(Comtype);
|
|
|
|
|
I don't consider myself an expert, but I use COM for different purposes. In my view the great advantage of late binding is version independency.
Therefore I make the reference to outlook without the version number, and that works fine by me and my clients who run different versions of Outlook.
Your code would be:
Type Comtype = Type.GetTypeFromProgID("Outlook.Application");
object obj = Activator.CreateInstance(Comtype); //The exception is here
I hope this helps.
Regards
|
|
|
|
|
I have been having this problem for some time and I believe it must steam from my misunderstanding of some basic concept. That said can someone please set me straight on the matter of usable form size.
In the below instance I am looking to create a line with a ten pixel boarder at the top and bottom. When the code is run as expected there is a 10 pixel gap at the top however the bottom of the line goes off the screen and needs an additional 35 pixels added for the desired effect. Can some kind person please tell me why and how I should measure the form height if not like this.
Jason
System.Drawing.Graphics graphicsObj = this.CreateGraphics();
graphicsObj.DrawLine(new Pen(Color.Blue, 4), new Point(110, 10), new Point(110, this.Height - 10));
|
|
|
|
|
Try this.Bottom, instead of this.Height, perhaps?
Forget it, i was wrong...
Sorry.
var question = (_2b || !(_2b));
|
|
|
|
|
Ok. This should work, I hope.
Instead of this.Height try this.ClientRectangle.Height
Seems to have worked for me
I guess when you do this.Height it takes into account the titlebar and all that.
And sorry for the "this.Bottom" post just above, but for some reason it was the first thing to have popped into my mind.
var question = (_2b || !(_2b));
|
|
|
|
|
Fantastic that’s exactly what I needed but didn’t have a handle on where to start looking.
Thank you very much.
|
|
|
|
|
assuming "this" is a form, you're not taking into account the window borders, and any other controls (toolbars, menus, etc)
Try using this.ClientSize.Height instead
|
|
|
|
|
thank you also even thought you were a whole minute slower
|
|
|
|
|
Dear all
I have Convert vs2005 code to vs2008 in c# it works fine in vs2005 but gives error in vs2008 it compiles but when i press f5 it give error while running project unable to start debugging . it is BHO project.
|
|
|
|
|
What's the error message and what's BHO?
Regards,
Rob Philpott.
|
|
|
|
|
The error is [Error while trying to run project: Unable to start debugging] and BHO mean A browser helper object. we get IE explorer events through BHO and gives our own functionality
|
|
|
|
|
|
Hi,
I have used the following code for the Tcp client server communication...
When i run the Client.cs, it gives me an error stating:
Error....at System.Net.Sockets.TcpClient.Connect<string int32="" port="">..What changes should i do for the ipaddress and port..please help me with this...
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Diagnostics;
using System.Runtime;
using System.Text;
public class Server
{
public Server()
{
}
public static void Main()
{
try
{
IPAddress ipAd = IPAddress.Parse("192.168.1.32");
TcpListener myList = new TcpListener(ipAd, 8006);
myList.Start();
Console.WriteLine("The server is running at port 8006...");
Console.WriteLine("The local End point is :" + myList.LocalEndpoint);
Console.WriteLine("Waiting for a connection.....");
Socket s = myList.AcceptSocket();
Console.WriteLine("Connection accepted from " + s.RemoteEndPoint);
byte[] b = new byte[100];
int k = s.Receive(b);
Console.WriteLine("Recieved...");
for (int i = 0; i < k; i++)
Console.Write(Convert.ToChar(b[i]));
ASCIIEncoding asen = new ASCIIEncoding();
s.Send(asen.GetBytes("The string was recieved by the server."));
Console.WriteLine("\\nSent Acknowledgement");
s.Close();
myList.Stop();
}
catch (Exception e)
{
Console.WriteLine("Error..... " + e.StackTrace);
}
}
}
|
|
|
|
|
Which line throws the exception - and what is the exception?
Regards,
Rob Philpott.
|
|
|
|