|
|
|
Hello everyone. I've successfully managed to control the general wave volume of Windows.
However, since vista came out, it's now possible to control the volume for every single application in the windows mixer..
Since I didn't manage to find anything anywhere here comes my question: how i can control per-application volume?
What I wanted to do was to mute/lower the volume of all BUT ONE application. ( also via some sendmessage codes I'm not aware of.. )
Can anyone help?
|
|
|
|
|
Is there a free IDE for designing a Winforms gui for a C# program? I have a copy of VS 2008 that I got from school, would that work?
Also, is Visual C# the same as C#? VS 2008 only doesn't list "C#", only "Visual C#".
Thank you.
|
|
|
|
|
You can use VS 08.. yap my friend this are same.
Thanks
Md. Marufuzzaman
|
|
|
|
|
C# is a language. Visual C# is Microsoft's compiler for C#. Visual Studio can be used as an IDE for Visual C#, and is quite handy (but not required) when you need to implement a WinForms application. An Express version of Visual Studio is available for free. And a C#-only version of Visual Studio is (or was) also available, marketed as Visual C# Standard (if I recall correctly).
|
|
|
|
|
How can I use Vscroll for listview when Scrollable is false ?
|
|
|
|
|
Hello,
I'm looking for a way to query the pending applications I'm installing by group policies. I planning a C# class for a program, running on a client in a windows domain, which queries the applications to install by GPO, compare with the installed programs and discover this ones not yet installed.
I've absolute no idea how to discover the according GPOs and I've spend a lot time with Google by searching unsuccessfully for an approach.
Has someone a hint, how i could solve this problem? How do I discover the applied GPOs on a client machine?
Please excuse my bad English and greetings from Berlin
Costa
modified 13-Sep-21 21:01pm.
|
|
|
|
|
hi
how can i convert image that is 32bppArgb (png image) to jpg so if the image is Transparent
i don't get a black image, or if the image is semi Transparent (like red color and 50 % alpha) i get the color like the png image and not a full color?
|
|
|
|
|
The jpg format does not support an alpha mask, png does. Therefore, this will be lost when you convert to jpg.
The rest of your question makes no sense to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Nryk,
This response assumes you are not using WPF.
Well, if you want to do this outside your own code, any tool like ACDSee will convert your .png with transparency to a .jpg which looks okay : I have not experimented with this to any depth, but the default settings of ACDSee's .jpg conversion will produce a file with the transparent areas rendered in white.
I would guess it is possible in PhotoShop (I use CS4) to change the settings when you save as .png (while PhotoShop only shows a 24bpp option .png, in fact it does save the alpha) so that what color shows up in the .jpg (where the transparency was) trasformed by ACDSee varies, but that's a guess.
I have never tried making a .png in PhotoShop with partial transparency (unless this is a side-effect of "feathering," which I use often, that I am not aware of). But now that you mentioned it, I am curious to experiment.
If you are doing conversion at run-time in your own code, I would guess you are going to have to construct a new bitmap and interpolate the alpha values into tints of color (luminance values ?) in the rgb source. But I would certainly go and research this with Google, and on StackOverFlow, and, of course, right here on CP.
I would also advise you to check out Bob Powell's win forms and graphics for .NET sites (somewhat out of date, but still full of great hints and tips if you are using WinForms) :
Tips/Tricks[^]
GDI+ FAQ[^]
Check out the CP AlphaForm article[^], by Jeff Anderson, and his source code, for great information on transparency via Layered Windows. While it is not specificly targeted at .png, I think you'll find it valuable.
You can check out my raving about Jeff's article[^]; in that message I include a link to a very valuable on-line resource for understanding .png optimization.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
JPG doesn't have alpha layers
In C++, if you are willing to assume you would be drawing the PNG image on a black background, look up AlphaBlend. You could draw the PNG to a bitmap or just create a 24 bit image using the raw bytes. The BLENDFUNCTION documentation has a chart of the multipliers you need to use. It looks confusing, but is rather straightforward once you think about it.
I'm not sure the equivalent of AlphaBlend in C# (outside of the DirectX classes.) Again, if you assume the background, you could do it yourself.
http://msdn.microsoft.com/en-us/library/aa452889.aspx[^]
|
|
|
|
|
I am using a data grid view with an unbounded check box column. I am trying to delete those selected values from the grid that are checked through the check boxes only. Can any body plz give me the code for it. Currently I am using the following:
<code>
private void btnToDeleteSelectedRows_Click(object sender, EventArgs e)
{
DALHelper dH = new DALHelper();
List<int> rowsToDelete = new List<int>();
int[] array = new int[10];
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (Convert.ToBoolean(dataGridView1["column1", i].Value))
{
rowsToDelete.Add(i);
}
}
} </code>;
|
|
|
|
|
Omar, You can try this out,
foreach (dataGridView1 row in this.dataGridView1.Rows)
{
DataGridViewCheckBoxCell Checkedcell = row.Cells[1] as DataGridViewCheckBoxCell;
if (Checkedcell != null && row.IsNewRow != true)
{
this.dataGridView1.Rows.Remove(row);
}
}
Hope this will help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
for (int i = (dataGridView1.Rows.Count) - 1; i >= 0; i--)
if (Boolean.Parse(dataGridView1.Rows[i].Cells[2].Value.ToString()))
dataGridView1.Rows.RemoveAt(i);
______________________________________________________________
check box column = cell[2]
|
|
|
|
|
I know this sounds stupid, but I cannot seem to figure out how to get the first selected item from the list view? Its not the way you do it with the windows forms as WPF (I'm new to WPF). I'm trying to get the first selected item everytime the user selects an item (from code behind)
|
|
|
|
|
Jacob,
Just asked your question over WPF/WCF/WWF Forum
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Sorry, I was thinking since I was trying to do this in the code with C# it belonged here.
Thanks
|
|
|
|
|
|
Please Don't Cross Post. You have asked the same question just few min back
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
using c# how to disable keyboard functions particular minute.
I want to create a simple application program in c#,If the application is running for when the system was booting.The application run only 2 minutes,on the time disable an total keyboard functions(Including of Esc, Windows, Ctrl+Alt+Del of all Keys).If the time(2minute) finished, automatically enable keyboard,normally windows desktop Booting to appearing.how it's possible.
anybody please give me the sample code.
modified on Monday, July 27, 2009 9:36 AM
|
|
|
|
|
|
It can't be done, it shouldn't be done.
Just put a note on the computer not to press any keys for two minutes after booting.
|
|
|
|
|
I'm writing an app where you can input a lot of data in a lot of different controls (textboxes, updowns, etc.)
Now I want to implement a function you see in most other apps where you input information and save it: the moment the user changes a saved file or inputs something into a new file, the file is unsaved and upon closing it, the user will be prompted if he wants to save changes.
The only way I can think of to achieve this is to use each input control's change event (change text for textbox, change value for UpDown, etc.) and set an "unsaved" bool to true.
When the user wants to exit the app, check the bool and display a message box if necessary.
Is there an easier way other than using all the events (I have a lot of data, so that would be about half the code of each form or more)?
|
|
|
|
|
Yea, the most obvious solution is the tedious one: trap each input control's change event and set an isDirty type flag for the form to true.
But... you could think of this as a more general-purpose problem too. It wouldn't be difficult to write a separate controller class - one that could take a form as input, loop through all of its controls, and assign event handlers for the input control change events. This controller would have an Initialize(Form frm) method and an IsDirty read/write property. You would then instantiate this controller in the Load event for each winForm you wish to track this way. When you save a document from the winForm, you set the controller's IsDirty flag to false. Then whenever the input changes on the form, the controller has already established event handlers that sets its IsDirty flag to true.
Once the controller class is built, it becomes very simple to use in your winForm and reusable across multiple forms.
|
|
|
|