|
i am looking for some examples on Lame encoder to capture a sound from my sound card and save it as Byte[]...and then play it
i did some search but found nothing ...
and if there any other solution better than Lame encoder or any other idea.
any thing to start with...
thanks allot
|
|
|
|
|
Hello,
I need a little feedback about how to make a little app in Net v1.1.
I need to find form with caption "<...>", find a button with caption "<...>" and press it.
Any ideas how to make it?
|
|
|
|
|
Hello,
Need more info about your program!
Do you have all the form instances in the class where you whant to find your form?
All the best,
Martin
|
|
|
|
|
There is running procces, which runs Form probrably writen in C++. Not managed.
Anyway, i need to find that window, and find a button with some text on in, and press it.
|
|
|
|
|
Hello,
OK,
Here is an example for an "OK" button.
using System.Runtime.InteropServices;
private const int BN_CLICKED = 245;
[DllImport("User32.dll")]
public static extern Int32 FindWindow(String lpClassName,String lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int SendMessage(int hWnd, int msg, int wParam, IntPtr lParam);
int hwnd=0;
IntPtr hwndChild=IntPtr.Zero;
hwnd=FindWindow(null,"XXX");
if(hwnd != 0)
{
hwndChild = FindWindowEx((IntPtr)hwnd,IntPtr.Zero,"Button","OK");
Thread.Sleep(1000);
SendMessage((int)hwndChild,BN_CLICKED,0,IntPtr.Zero);
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Oh, it is possible to write only in managed code?
|
|
|
|
|
Hello,
Jefis wrote: possible to write only in managed code?
Not that I know! sorry
If you find a way, let us know!
All the best,
Martin
|
|
|
|
|
Mark T. wrote: Hi Martin, 27 Feb 2007
First, thanks for posting sample code. I have needed to do this same sort of thing in the past, and would like to learn how. (Pressing a button on a running program, or inserting text, or...)
I wrote a test program with a couple buttons on it, and then I tried your sample code. It successfully identified the other program's window (non-zero pointer), but could not find the button.
This call:
hwndChild = FindWindowEx((IntPtr)hwnd,IntPtr.Zero,"Button","A");
returned zero.
1. Any idea what may have gone wrong with this particular case.
2. Where can I learn more about this? For instance, I don't know where you found the value for BN_CLICKED = 245. I searched online and came up blank.
Thanks for any help.
Mark
Hello Mark,
Mark T. wrote: 1. Any idea what may have gone wrong with this particular case.
Is the Text Of your button really "A"?
Mark T. wrote: 2. Where can I learn more about this?
This is a good link:
http://www.codeproject.com/csharp/WindowsAPIsFromCS.asp[^]
P.S.: I'm not answering direct on e-mail questions.
All the best,
Martin
|
|
|
|
|
Hi all
I have Visual studio 2003 with just c# installed I have to read in a access database and show it using the smart device application. I sort of know how to do it on a normal app but as soon as i enter using System.Data.OleDb It cannot find on the smart device library. Is there way to read in a database and show it using a smart device app.
i.e. is there something else i can use apart from OleDb that can be found in smart device library. Oh if this stupid question or it in the wrong form can you tell me that as well
Can any one help
Thanks in advance
James_Bond
|
|
|
|
|
Hi,
I have an application in which there there is an MDI form and all other are its child. But when i try to show one specific form as its child, it does not appear. And also its Load event also does not fire. This form gets appeared from one location but not from any other location.
Can you please give me hint why it is so? Your help would be highly appreciated.
Regards,
Wasif Ehsan.
|
|
|
|
|
set the MdiParent property of the childforms to the mainform..
ChForm frm = new ChForm();<br />
frm.MdiParent = this;<br />
frm.Show();
life is study!!!
|
|
|
|
|
Good day,
How can I make a UserControl inherits from a Form?
I've tried to do this:
public partial class UserControl1 : Form
{
..
}
But when I add a the dll to my test program, I could not find UserControl1 from the listed control and a message appears indicating the no control exist.
Thanks.
-- modified at 5:09 Tuesday 27th February, 2007
|
|
|
|
|
If you want to use your UserControl1 as a UserControl, then you must inherits it from Class UserControl. You cannot create a new usercontrol inherits from a Form.
|
|
|
|
|
The reasoN why i want to create a usercontrol that is derived from a form because i want to create customable panel, that can be minimize or maximize. i've made a usercontrol which is derived from Panel but the problem is when the backcolor of the control is transparent and that control is placed inside my usercontrolpanel, the transparency goes through all the way to the form, that is why i thought i should derived my usercontrol from a form. Please refer to the image linke below for sample output of my usercontrol:
http://www.geocities.com/fritzjeran/SAMPLEOUTPUT.JPG
Any suggestion is appreciated.
Thanks.
|
|
|
|
|
fjlv2005 wrote: customable panel, that can be minimize or maximize
That's easy, you just set the dock style of the control to all, to maximise on the form. Set it to none and the size to 0,0 to minimise.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how to select a particular erroritem in the errolist and also it description
|
|
|
|
|
kalyanit wrote: how to select a particular erroritem in the errolist and also it description
Sorry, there is some context missing. What are you talking about? Where is this error list?
|
|
|
|
|
Hi All,
I have 2 exe's.What I have to do is to call one exe from the second one with some arguments.How to do it??
NEHA GUPTA
|
|
|
|
|
|
Take a look at the Process.Start method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hello,
In the namespace System.Diagnostics you will find Process and ProcessStartInfo.
ProcessStartInfo psi= new ProcessStartInfo();
psi.UseShellExecute = false;
psi.FileName = ???;
psi.WorkingDirectory = ???;
psi.Arguments = @"xxx";
using(Process YourProcess= Process.Start(psi))
{
YourProcess.???;
}
All the best,
Martin
|
|
|
|
|
I need to load large string into RichTextBox.This string is RTF formatted text.If I try passing that string to RichTextBox like:
RichTextBox.Rtf=that string
RichTextBox freeze for several secounds.
I search over internet for solution,and i found article that describe how to load file that is a few megs in size using EM_STREAMIN message.
Unfortunatelly,that article is for VB6 and use file for loading while I have to use RTF formatted string.
Does anybody knows how to implement loading string into RTB using EM_STREAMIN message in C#?
|
|
|
|
|
use threads to solve ut problem
|
|
|
|
|
use threads to solve your problem
|
|
|
|
|
Sorry to say but did you think about this reply before posting?
The original poster claims that the RichTextBox itself is freezing.
If you can tell us how to use threads to keep this from happening (don't forget the UIThread has to render the RichTextBox!), you're my hero...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|