|
Thanks...
I just tried it both ways (fully qualified and just the iexplore) followed by:
Console.WriteLine("IE Instance started... PID= " + myProc.Id + myProc.MainWindowHandle);
I get an unhandled exception on the myProcess.MainWindowHandle no matter how much of a sleep or if i loop looking for the process id. Again, it works find if there is only 1 instance of the target app (iexplor in this case) open.
|
|
|
|
|
I run an indoor sports facility.
Our receptionist uses some media player for background music in our foyer.
What I need is a way to mute that media player, to play my own .wav file to remind players to be ready 10 minutes before events start, (triggered by system time) then resume the background media player.
If that makes sense?
My application is in C# and uses AXVLC.
Im also considering making it a Service instead, so the receptionist doesnt close it.
|
|
|
|
|
Uhm what is your question, does it make sense, yes. There aeems to be plenty of support for this process on Google.
I would not make it a service, what happens if you want to interrupt the announcement or make an adhoc announcement. You actually need a PA system and should probably look around for a package before attempting to build your own (this assumes you are into running the sports centre and are not a developer).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I've been a hobbyist developer for much longer than I've been working at the centre. But theyve just made me a manager, so now looking at making some cool new toys. We've got a PA system, but I want to make things as automated as possible as Im getting busy doing other things.
|
|
|
|
|
el_stupey wrote: Im also considering making it a Service instead, so the receptionist doesnt close it. That's not what a service is for; and yes, the user can close services. Using services also introduces a new problem - they usually run under a system-account, and should not be messing with the users' desk.
Simplest solution; get a list of MP3's to play. Play them yourself (from code), then it becomes quite easy to interrupt the song at a predefined time and to play "something else".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Maybe a service isnt what I need. Was just a thought.
Thanks for the suggestion, I might try that out.
Also found another answer here. Only problem with that is it claims win7 and later which means finally upgrade from vista.
|
|
|
|
|
how to edit in crystal report
|
|
|
|
|
Reports are effectively read-only views of your data and should not be used for editing the data
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Edit what exactly? The criteria?
Can you edit your question please, it isn't clear.
|
|
|
|
|
|
IIRC you can add comments to a report, not the same as editing which is not possible.
I might be completely wrong as I have not used that pile of crap for over a decade. One of the worst apps even inflicted on the development community.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
What do you mean exactly ?
Usually you work from a template and assign data to it, either by passing parameters so the report generates itself or by passing a datasource.
So do you want to change the template or the generated report itself.
In case of the former, to do it properly you'll need the crystal reports editor application (VS is limited).
In case of the latter, please define better what you want to achieve, because that's not entirely the purpose of Crystal Reports.
|
|
|
|
|
i have developed a small win apps which is suppose to capture skype conversation. my main concern is that i have define the
WndProc() here is the code a bit
protected override void WndProc(ref Message m)
{
Boolean handled = false;
if (m.Msg == NativeCalls.APIAttach && (uint) m.LParam == NativeCalls.SKYPECONTROLAPI_ATTACH_SUCCESS)
{
NativeCalls.HWND_BROADCAST = m.WParam;
handled = true;
m.Result = new IntPtr(1);
}
if (m.Msg == NativeCalls.WM_COPYDATA && m.WParam == NativeCalls.HWND_BROADCAST)
{
COPYDATASTRUCT data = (COPYDATASTRUCT)Marshal.PtrToStructure(m.LParam, typeof(COPYDATASTRUCT));
StatusTextBox.Items.Add(data.lpData + Environment.NewLine);
IsCallInProgress(data.lpData);
handled = true;
m.Result = new IntPtr(1);
}
m.Result = IntPtr.Zero;
if (handled) DefWndProc(ref m); else base.WndProc(ref m);
}
but controls is not coming in this
if (m.Msg == NativeCalls.WM_COPYDATA && m.WParam == NativeCalls.HWND_BROADCAST) block that is main problem.
here i attach the link of my win application and that is https://onedrive.live.com/#cid=C4A6F16F34D7540A&id=C4A6F16F34D7540A!126 just download the skypecalltest and run it.
before run my apps just login to skype and then run my apps where you put a phone no and click on call button then you can see the controls is not coming repeatedly to the second if block.
so what i need to change in my code as a result control will come to second if block repeatedly .
in the same link there is another same kind of apps which is based on wpf and that is working where wndproc is calling repeatedly. if possible check that code too and guide me what i am missing or making mistake. thanks
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: i have developed a small win apps Like this[^] one?
Did the application connect to skype? Does the demo from that website work?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i develop my win apps following that application whose link you refer but that application is wpf based apps and working fine but my one is not working properly. if possible please download my apps from this link and run at your end to capture the problem. here is link from https://onedrive.live.com/#cid=C4A6F16F34D7540A&id=C4A6F16F34D7540A!126 just download the skypecalltest and run it and definitely notice that WndProc() function is calling repeatedly for getting message from Skype.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: i develop my win apps following that application whose link you refer but that application is wpf based apps and working fine but my one is not working
properly A Windows Forms application? Try running it as an admin
Tridip Bhattacharjee wrote: if possible please download my apps I'm not going to download a complete project, especially not one that hooks into my Skype. You might want to add in some code that logs *each* WM_BROADCAST and each WM_COPYDATA going trough the WndProc; see if they get called.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
you asked me to log WM_BROADCAST and each WM_COPYDATA that is the main problem because when i run my apps then controls only come to this if block only once
if (m.Msg == NativeCalls.WM_COPYDATA && m.WParam == NativeCalls.HWND_BROADCAST)
so i think if try to log WM_BROADCAST and WM_COPYDATA then only once it will be logged. any better idea?
tbhattacharjee
|
|
|
|
|
Does it stop painting the form after that message is received?
if (handled) DefWndProc(ref m); else base.WndProc(ref m);
Why is the DefWndProc there?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i am not trying to paint my form. i am trying to receive message from skype window. if i write only
base.WndProc(ref m); then also same thing happen.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: i am not trying to paint my form I know; Windows tries that - it's the fastest way of checking whether the handler is still processing messages.
Did you try to run it as an admin? I can imagine UAC blocking the broadcast
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
yes i run apps as admin but problem still exist. thanks
tbhattacharjee
|
|
|
|
|
Hello EveryOne
, i m getting the inforamtion of SelectAllUser from DB and shown it into DATAGRIDVIEW , now i want to edit perticuler coulm of DGV after editing the desired value should be updated .how it will done i dont know ,any HELP WILL BE appreciated...
Here is code
private void cbxUserStatus_SelectedIndexChanged(object sender, EventArgs e)
{
if (cbxUserStatus.SelectedIndex==0)
{
string constr = ConfigurationManager.ConnectionStrings["RegistrationDB"].ConnectionString;
SqlConnection objcon = new SqlConnection(constr);
SqlDataAdapter da = new SqlDataAdapter("select * from tblRegistration where tblRegistration.userSta='1'", objcon);
DataTable dt = new DataTable();
da.Fill(dt);
dgvRegistration.DataSource = dt;
dgvRegistration.Show();
}
}
Note : please be precise while code as i m new to coding . |Code should be simple and fully functional
mubasit sultan
|
|
|
|
|
mubasit wrote: please be precise while code as i m new to coding . |Code should be simple and fully functional There are enough examples on updating a row in a database.
How to: Update Records in a Database[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to capture all the Internet Explorer instances on a PC and
then read source code of a web page if it was opened by any instance.
it seems that "Document.ActiveElement.InnerText;" is the key but i always receive this error before debugging the code :
object' does not contain a definition for 'ActiveElement' and no extension method 'ActiveElement' accepting a first argument of type 'object' could be found
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();
string filename;
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
if (Condition)
{
textBox1.Text = ie.Document.ActiveElement.InnerText;
}
}
can any one help me if what do ?
thanks
|
|
|
|
|
I've never worked with that SHDocVw library . From the error message, I can see that the Document property of SHDocVw.InternetExplorer is an object only. Before you can navigate further to its ActiveElement property, you have to cast it to an appropriate type (and likely again for ActiveElement ). For that purpose, you have to read the documentation for that library - I do not know it!
Your code should then be something like (replace the dummy types I used!):
DocumentType document = ie.Document as DocumentType;
ActiveElementType activeElement = document.ActiveElement as ActiveElementType;
textBox1.Text = activeElement.InnerText;
|
|
|
|