|
hello everyone. i believe u have seen the apps that put some christmas lights on ur screen that keep blinking while u use ur desktop or whatever. i am planning to write a similar app. i have quite a good programming experience but i am not sure how to achieve this thing, i mean how to i make a bulb appear on desktop while the desktop can be used by the user aswell. btw i am working in c#.
|
|
|
|
|
Create a transparent[^] form, and make sure that the border isn't transparent.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
but that transparent form will recieve click events rather than desktop itself, right?
|
|
|
|
|
Johnny English wrote: but that transparent form will recieve click events rather than desktop itself, right? Wrong. Alternatively, you can set a specific color to become transparent.
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections.Generic;
static class Program
{
public static void Main()
{
using (var f = new Form())
{
var b = new Button();
b.Text = "Hello world";
f.Controls.Add(b);
f.BackColor = Color.Red;
f.TransparencyKey = Color.Red;
f.AllowTransparency = true;
f.WindowState = FormWindowState.Maximized;
f.ShowDialog();
}
}
}
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
well using ur technique if i draw something on form that is red, it wont appear.
|
|
|
|
|
I'd recommend using a different transparency-key than red. Pick one that's not in use yet.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i am making an app that will display lots of light bulbs of different colors, so i dont think this transparency key thing will work.
|
|
|
|
|
Anytime there is a completely transparent item in WPF it is basically invisibile. I often will have a minimum transparency when I actually want to be able to interact with a control.
|
|
|
|
|
You are looking at widget development.
Developing a gadget for Windows Sidebar[^] should help you get started.
This will help you create a widget which can run in the background while you can continue and work on the desktop.
|
|
|
|
|
not a widget, have u seen twinkle bulbs app?
|
|
|
|
|
|
Sooooo what is this post about again??
I'm not clicking that link.
|
|
|
|
|
C'mon Dave, where's your sense of adventure...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I'm married. My sense of adventure was killed about 7 years ago.
|
|
|
|
|
About time to think about divorce, Seven year itch, right.
|
|
|
|
|
No question to be found, only a (suspicious) download.
Post a question and the relevant code, and you'll have more chance to receive useful answers.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i have a task to show phone number on application when any calls come.scenario is, there is a restaurant where customer calling for order. when call comes there phone number show on our .net application.
Please tell me how i achieve this task.
|
|
|
|
|
have you checked to see if there is an API for the phone?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
If I were you, I'd start by downloading JulMar's ATAPI[^] source. This wraps the unmanaged TAPI 2.x functionality. Then it's a simple matter of hooking into the TE_CALLINFOCHANGE event in the Tapi class.
|
|
|
|
|
Hi all,
I've a strange problem on my app.
I have one app that works fine and uses this instruction:
<pre lang="c#"> xlWorkbook = excelApp.Workbooks.Open();
</pre>
This works fine and all is ok.
The problem occurs when I run the .exe from another program, I execute (Process myProcess = Process.Start(myProcessInfo);) and the program start correctly, but crash on the instruction xlWorkbook = excelApp.Workbooks.Open();.
Is very strange because if I run the .exe via command line all works fine... The app that execute the other one run with administrator privileges...
Someone can help me?
Thank you very much!
|
|
|
|
|
Is the app used to start your .exe a .Net application? If so, are the framework versions the same? Different framework versions can cause strange effects.
Does the app run from a non-local disk? If so, security mechanisms may cause trouble.
Furthermore, when you call a .exe from some other program, it inherits the environment variables of that other program - also check here for differences.
And of course, different users (administrator vs. "normal" user is equivalent to different users) have different environments.
|
|
|
|
|
Thank you for you reply.
Yes, both have been developed by .Net and the freamework is the same (4.0).
Both running on the local disk.
The two application doesn't need to share any variables, the "runner" application reads from DB and executes the associate app with specified (on db) parameters.
The "runner" can starts the other one without problem, the app start fine and does some actions, but when call the instruction xlWorkbook = excelApp.Workbooks.Open(); crash reporting an exception that the file (specified in the function) is in use or doesn't exists, but I checked, the file exists, is readable and works fine, in fact if I run the app via command line all works fine...
Is very strange...
Any idea?
|
|
|
|
|
Devis Meroni wrote: rash reporting an exception that the file (specified in the function) is in use or doesn't exists,
Do you have the file open in Excel? If yes, then it's in use. Open the task-manager; is there a child-process of your application that did not terminate after debugging? If yes, then it's in use.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
No... and the problem is only when I run the .exe from the launcher.
The problem is not in the code, if is a code problem I would have the same problem when I run it from console, instead if I run from console all works fine...
|
|
|
|
|
Devis Meroni wrote: The problem is not in the code, if is a code problem I would have the same problem when I run it from console
That's not guaranteed; as the first answer already noted, there could be subtle differences in the environment.
Devis Meroni wrote: instead if I run from console all works fine..
Did you check whether there was another process in memory?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|