|
You can use the media player component to play a video. Just add it to your form and set its source as appropriate.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thanks for your help. i done it. now i want to take a snapshot image from a video file. then tell me how can i get a snapshot image from a video file programatically?
|
|
|
|
|
I have set the form border to FixedSingle and removed the max, and min buttons but the user is still able to re size the form by double clicking on the title bar..
how can I prevent that?
|
|
|
|
|
Have you set The form's boarder style property to one of the "Fixed" enumerations (e.g. "FixedDialog")?
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
|
|
|
|
|
it is set to fixed single as mentioned..
is there any way to prevent resizing using winapi & c#?
|
|
|
|
|
Set the Min and Max sizes?
|
|
|
|
|
You can disable title bar double click by using this technique:
public partial class MyForm : Form
{
const Int32 HTCAPTION = 0x2;
const Int32 WM_NCLBUTTONDBLCLK = 0xA3;
protected override void WndProc(ref Message msg)
{
switch (msg.Msg)
{
case WM_NCLBUTTONDBLCLK:
if (msg.WParam.ToInt32() == HTCAPTION)
return;
break;
};
base.WndProc(ref msg);
}
}
|
|
|
|
|
That's good work. I've just created a form, fixed single without min and max buttons and it definitely doesn't maximise on double clicking the titlebar.
Regards,
Rob Philpott.
|
|
|
|
|
I want to have my form title on the left side of the title bar as usual... but I also want to have a form ID like FRM123 on the right side on the form just beside the minimize button or right most if no buttons..
how can I do that?
|
|
|
|
|
jrahma wrote: form ID like FRM123
That will be a very unprofessional thing to do
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
can I ask why?
it will be easier to identify the form specially when supporting basic users on the phone..
|
|
|
|
|
String s ="";
int? nullint = s ( How to convert "String s" to "nullable int")
|
|
|
|
|
|
First, I'd avoid nulls unless absolutly neccesary, the can cause all sorts of problems if they are not coded against.
The exact code you need depends upon your desired "failure mode" (see comment in block) but here is an answer:
static int? Convert (string value)
{
if (string.IsNullOrEmpty(value))
return null;
int returnedInt;
if (int.TryParse(value, out returnedInt))
return returnedInt;
return null;
}
also IMO nullint is a shoud be renamed as it has both "null" and "int" in it, as well as not being very descriptive.
[Edit]
Nuri Ismails post (below) achieves the same as the above, but is more compact, so I'd use that in preference.
CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks
modified on Wednesday, January 20, 2010 9:00 AM
|
|
|
|
|
How about something like this:
public int? ToNullableInt32(string s)
{
int i;
return (Int32.TryParse(s, out i)) ? i : null;
}
String s ="";
int? nullint = ToNullableInt32(s);
|
|
|
|
|
Hi All,
I am trying to develop a .net framework v2 webservice suitable to receive a .pdf as a MIME attachment.
I have search the web but I can't find anything related.
Could you please assist
Tony
|
|
|
|
|
Hi,
In my program i'm trying to access a server drives details from my machine with different username and password, for this i'm using the connections options class in C#,
here is the code i'm using
try
{
ConnectionOptions opt = new ConnectionOptions("MS_409", "USERNAME", "PASSWORD", "ntdlmdomain:DOMAIN", ImpersonationLevel.Impersonate, AuthenticationLevel.Default,false, null, TimeSpan.MaxValue);
ObjectQuery query = new ObjectQuery("SELECT FreeSpace, Name FROM Win32_LogicalDisk WHERE DriveType = 3");
ManagementScope scope = new ManagementScope("\\\\" + "16.106.64.108" + "\\root\\cimv2", opt);
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection coll = searcher.Get();
foreach (ManagementObject ms in coll)
{
Console.WriteLine(ms["Name"]);
Console.WriteLine(Convert.ToDecimal(ms["FreeSpace"]) / 1024 / 1024 / 1024);
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
whenever i reach line "ManagementObjectCollection coll = searcher.Get();" i'm getting the "Invalid Parameter" error, i could not find a slution for this, please help.
Thanks,
D.Vinoth
|
|
|
|
|
You wrote:
... i'm trying to access a server drives details from my machine with different username and password for this ...
Don't you have to change the value "ntdlmdomain:DOMAIN" also to a valid domain on the remote machine?
Sorry thats the only idea I have. Everything else seems to be right and your query works also on my system.
Greetings
Covean
|
|
|
|
|
Thanks for your reply covean,
I changed the value from "ntdlmdomain:DOMAIN" to "ntdlmdomain:AMERICAS", but still it is also not working.
Thanks,
D.vinoth
|
|
|
|
|
Hi,
i want my installation to add a shortcut of my application to the desktop accordig to user preference.
(check box of - create a desktop shortcut).
i know how to add it automatically but i couldn't find how to make the checkbox.
can it be done?
thanks,
Samy
|
|
|
|
|
You may wish to customize your setup code a little, perhaps you can use this tutorial and add shortcut & checkbox yourself... link[^]
Dax Frost
There Are 10 Kinds Of People,
Those That Understand Binary,
And Those That Don't
|
|
|
|
|
I think that this[^] article is what you are looking for.
Cheers
|
|
|
|
|
Hi. I just need help on whats the most commonly used LISP programming software and where can i possibly find an installer for that. I just need it for my class that discusses about STRUCTURE OF PROGRAMMING LANGUAGES and our project is that we need to compare a program created in LISP and in C#. C# is the main programming language that is currently taught in our school and our professor's objective is to let us learn new programming languages besides C# and to see the advantages and disadvantages of both programming languages.
Can someone help me? I'm currently confused because when I tried to search for LISP programming languages I can't determine which is commonly used and what's not.
Please consider my post even if it's not really related to C# programming. Thank you.
|
|
|
|
|
|
i have to execute 3 *.exe using a project.
i used System.Diagnostics Process to run the existing exe.
i checked for running process since one exe cannot be run twice
now the problem i am havin is that i cannot bring already running process as Windows foreground after i switch to another window.
how can i set a running process as a foreground window??
SUCIL
|
|
|
|