|
Hi,
Anyone any idea how i can get the selected style from windows XP. (classic or XP style ?)
thx
kurt
|
|
|
|
|
Great,
declaration.
[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]<br />
public extern static Int32 GetCurrentThemeName(StringBuilder stringThemeName, int lengthThemeName, StringBuilder stringColorName, int lengthColorName, StringBuilder stringSizeName, int lengthSizeName);<br />
and the way to use
StringBuilder stringThemeName = new StringBuilder(260);<br />
int lengthThemeName = 260;<br />
StringBuilder stringColorName = new StringBuilder(260);<br />
int lengthColorName = 260;<br />
StringBuilder stringSizeName = new StringBuilder(260);<br />
int lengthSizeName = 260;<br />
if(GetCurrentThemeName(stringThemeName, lengthThemeName, stringColorName, lengthColorName, stringSizeName, lengthSizeName) == 0)<br />
{
Greetz
Kurt
|
|
|
|
|
I´m starting to build a windows wizard program using visual studio 2005. And I would like to know what’s the best way to do it.
I’m trying to use a different usercontrol for each scenario but I don’t know if it’s the better solution..
|
|
|
|
|
|
tank you mi friend, it was very helpfull....
|
|
|
|
|
You're welcome.
Standards are great! Everybody should have one!
|
|
|
|
|
hello everybody,
each cell in the excel file is character limited by 255 character, so when i arrive to the 255th character it's truncated and my program return a wrong string .
it's the first time i face this problem, please if somebody can help
thank you
|
|
|
|
|
Before you put the data in the cell check and see if it is longer than 255 characters, if so inform the user and stop inserting the data.
|
|
|
|
|
i alredy have a value exceed the 255 characters i just want to read it
is there any way to do that
thank u for replying
|
|
|
|
|
There is no way to magically get the data that was truncated. You either need to stop it from truncating when you do the insertion or at least notify the user that data has been truncated.
|
|
|
|
|
hi,
i'm creating ListviewItems and inserting them into a ListView
that works Like this :
<br />
ListViewItem lvi = new ListViewItem(itemsArray);
lstwBank.Items.Add(lvi);<br />
the funny thing is that when i'm trying to change on of the sub items in the ListViewItem
nothing happens
it goes something like this:
<br />
lvi.SubItems[0].ForeColor = Color.Red;<br />
i've enen tried to create a ListViewItem.ListViewSubItem
but still the property are not affected
Help Anyone!!!
THANKS
P.S
Oh almost foraget i'n using VS 2005 Express
Have Fun
Never forget it
|
|
|
|
|
half-life,
You need to Invalidate(); the control.
Regards,
Gareth.
|
|
|
|
|
it's not working
maybe i'm doing it wrong??
Here is the code :
<br />
lstwBank.Invalidate(lvi.SubItems[3].Bounds);<br />
and i'd tried the whole control:
<br />
lstwBank.Invalidate();<br />
Have Fun
Never forget it
|
|
|
|
|
Perhaps adding the line of code in bold will help.
<br />
ListViewItem lvi = new ListViewItem(itemsArray);
lvi.UseItemStyleForSubItems = true;<br />
lvi.SubItems[0].ForeColor = Color.Red;<br />
lstwBank.Items.Add(lvi);<br />
|
|
|
|
|
Sorry, not working
strange, where did i Go Wrong
THANKS a Lot anyway
Have Fun
Never forget it
|
|
|
|
|
Maybe you can post all of the relevant code as it is in your program. It would make it easier for others to help you out...
|
|
|
|
|
it is so simple
i've created a listview on an empty form
and did only this:
in the onLoad evnet
i can't figure why it's not working
when i do :
lvi.ForeColor = Color.Blue; the whole line will be in the color
but the the code below will not work!!!!!!
strange
Oh, and...
ListView.View is In Details mode
and i have four columns
thats all :
<br />
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication2<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
string[] array = { "A", "C", "D", "E" };<br />
ListViewItem lvi = new ListViewItem(array);<br />
lvi.UseItemStyleForSubItems = true;<br />
lvi.SubItems[2].ForeColor = Color.Blue;<br />
listView1.Items.Add(lvi);<br />
}<br />
}<br />
}<br />
<br />
Have Fun
Never forget it
|
|
|
|
|
Just created a new app, added a listview with 4 columns and set to details view as you said.
Pasted your code and altered the UseItemSytleForSubItems to false and it worked perfectly!
private void Form1_Load(object sender, EventArgs e)
{
string[] array = { "A", "C", "D", "E" };
ListViewItem lvi = new ListViewItem(array);
lvi.UseItemStyleForSubItems = false;
lvi.SubItems[2].ForeColor = Color.Blue;
listView1.Items.Add(lvi);
}
|
|
|
|
|
|
Hi,
I'd like to use the version of the installer-project (set in the project properties) as a general version of the whole application (as defined in the AssemblyInfo.cs). Is there an C#-object, which is able to read the visual-studio properties, in special the version of the installer project?
Thanks!
Ariadne
|
|
|
|
|
In vb.net
Dim strversion As String<br />
strversion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()<br />
MessageBox.Show(strversion)<br />
strversion = System.Reflection.Assembly.GetCallingAssembly().GetName().Version.ToString()<br />
MessageBox.Show(strversion)
|
|
|
|
|
Thanks sathish s!
Your solution shows the version of the actual running assembly.
But my question is related to VS-Enviroment: I need a link to the version of the installer-project property.
perhaps VS has a build-in variable [InstallerProjectVersion] or there is a way to investigate the running VS enviroment to get this version.
Ariadne
|
|
|
|
|
Yes there is a way, but a dirty one: read the file <installer-project>.vdproj
Ariadne
|
|
|
|
|
public abstract class BusinessBase<TYPE, KEY> : where TYPE : BusinessBase<TYPE, KEY>, new()
{
} What is the meaning of where TYPE : BusinessBase<TYPE, KEY>, new() and why it is used ? Will new() creates a new instance of BusinessBase again ?
|
|
|
|
|
Hi Navaneeth,
you can find from here.
link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|