|
Hello,
I'm adding a custom action to my deployment project I want to know how to get the application folder in the target machine to associate an icon to my project files.
How can I get the path of the application on the target machine?
Thanks.
Dad
|
|
|
|
|
Hi hadad ...
Environment.CurrentDirectory
....
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
hi guys!! here is the thing: i want to change the visual setting of my win app. i don't mean by changing the fonts or by doing bold the letters. i mean different visual object. is there any plug in that it could help?
thanks you in advance!!
P.S.: sorry for my English :P
|
|
|
|
|
dianikol wrote: different visual object
More explaination equired I'm afraid. A form is a form is a form. You set the properties and it's displayed using those. What more do you want to see?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
for example i have two buttons next and previous, i want them round shape and not square shape.i think that studio doesn't has options like these.
|
|
|
|
|
It has nothing to do with Visual Studio. You just have to find and use the control set you want. Microsoft doesn't provide any themselves. THere are strictly third party, or, if you're confident enough, you can make your own.
You could also rewrite the UI of your app and use WPF to do this. There, you've got a multitude more options for creating your own controls.
|
|
|
|
|
The controls that are presented within the Visual Studio IDE are the general ones that are part of the .net framework. Most (if not all) controls can be drawn however you want, but if you don't want the default - you'll need to draw it yourself or create your own control from scratch (or download/buy one that someone else has already done).
Round buttons, aren't very difficult to do. Google, and you'll find some ready made solutions.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hi,
look at following code:
Hashtable objHash = new Hashtable();
ArrayList objList = new ArrayList();
foreach (DataRowView obj in listBox1.Items)
{
objHash = new Hashtable();
objHash.Add("FirstName",obj[1]);
objHash.Add("EmployeeID", obj[0]);
objList.Add(obj[0]);
}
comboBox1.DisplayMember = "FirstName";
comboBox1.ValueMember = "EmployeeID";
comboBox1.DataSource = objList;
-------
objList has 10 items ,although combobox filled with 10 items but display these items as "[Collection]"...........then how can get the display member from these "[Collection]"
|
|
|
|
|
Try this :
Hashtable objHash = new Hashtable();
ArrayList objList = new ArrayList();
foreach (var obj in listBox1.Items)
{
objHash = new Hashtable();
objHash.Add("FirstName", obj);
objHash.Add("EmployeeID", obj);
objList.Add(obj);
}
comboBox1.DisplayMember = "FirstName";
comboBox1.ValueMember = "EmployeeID";
comboBox1.DataSource = objList;
|
|
|
|
|
Hi all,
I have been trying to change the backcolor of specific rows depending on a condition,but when the condition is met the entire grid color changes.
I already tried this and many more like this but none of them work,
DataGridViewCellStyle style2 = new dataGridViewCellStyle()
style2.BackColor = Color.Red;
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
There is something which I am doing wrong. Please help me to fix this.
|
|
|
|
|
dataGridView1.RowsDefaultCellStyle.BackColor = Color.Red;
dataGridView1.Rows[index].DefaultCellStyle.BackColor = Color.Red;
And your index can change depending on your condition.
[Edit]
And if you want to change multiple rows BackColor:
DataGridViewSelectedRowCollection coll = dataGridView1.SelectedRows;
foreach (DataGridViewRow row in coll)
row.DefaultCellStyle.BackColor = Color.Red;
[/Edit]
When you're alone in the Dark, Fear will protect you...
modified on Sunday, November 2, 2008 8:41 AM
|
|
|
|
|
Hi Pedram ,
I tried this as well it does not work,
first I selected all rows which meet the specified condition
This is just to show the selection, Its alternate rows here
but in real scenario its any random row.
int yyy = 0;
foreach (DataGridViewRow rowss in dataGridView1.Rows)
{
if (yyy % 2 == 0)
{
rowss.Selected = true;
}
else
{
}
yyy++;
}
, then I used your or each statement but still I get the same results. There is no color on the datagridview. This Datagridview is placed on a user Object and It is added on a form at the run time.Does it make any difference ?
Regards
Omer
|
|
|
|
|
But following completely worked for me:
int y = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (y % 2 == 0)
row.Selected = true;
y++;
}
DataGridViewSelectedRowCollection coll = dataGridView1.SelectedRows;
foreach (DataGridViewRow row in coll)
row.DefaultCellStyle.BackColor = Color.Red;
But why did you act like that? It's O(n) = 2n
You can:
int y = 0;
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (y % 2 == 0)
row.DefaultCellStyle.BackColor = Color.Red;
y++;
}
DataGridViewSelectedRowCollection coll = dataGridView1.SelectedRows;
foreach (DataGridViewRow row in coll)
row.DefaultCellStyle.BackColor = Color.Red;
Member 3953856 wrote: .Does it make any difference ?
I don't think so. You should just point to your DataGridView correctly.
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
Put your code into the cellformat event of the datagridview
|
|
|
|
|
Yes ,
putting the code on the cell formatting event of the datagridview worked, I mentioned that I was using a user control. The data grid was on the User control.
If not a user control then the other stuff works fine.
thanks
|
|
|
|
|
I have a data gridview on my form. Some Columns have format specification as N2, means that
numeric format with 2 decimal spaces.
I set my thread CurrentCulture to German locale then fill the datagridview with data,
trough dataset offcourse.
Setting the current culture as follws
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-de");
I expect to see the formatted colon in German locale setting, decimal values with "," separator,
but I don't. I still see them in Enlish locale.
Those columns are defined as DOUBLE in MySQL database as well.
What is the reason?
Thanks to everybody,
Muharrem
|
|
|
|
|
hi all,
I have ListBox where are 10 items. i set
ListBox.DisplayMember = "FirstName";
ListBox.ValueMember = "EmployeeID";
then ListBox shows the Employee's FirstName.My problem is that how do i get the all EmployeeID from ListBox?
|
|
|
|
|
|
Hi ...
I think it's good for you:
List<int> val = new List<int>();
for (int i = 0; i < listBox1.Items.Count; i++)
{
lst.SelectedIndex = i;
val.Add((Int32)lst.SelectedValue);
}</int></int>
In val you have All EmployeeIDs ...
But this code is not logical code ...
if(Human.live)
{
Human.peaceful = false;
while(true)
{
Human.love(Human girl, Human Boy);
}
}
|
|
|
|
|
i found
ArrayList objList = new ArrayList();
foreach (DataRowView obj in listBox1.Items)
{
objList.Add(obj[0]);
}
|
|
|
|
|
You should rather use a generic list (The ArrayList class is practically deprecated):
List<object> objList = new List<object>(listBox1.Items);
or just get a reference to the Items collection:
ListBox.ObjectCollection objList = listBox1.Items;
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi
I want use DFS algorithm for maze (with all paths).
Please write for me one sample DFS code.
with many thanks...
|
|
|
|
|
|
Are bhai yahan be code nahi dete he.... bahat bure log he.
|
|
|
|
|
sitnet wrote: Please write for me one sample DFS code.
This isn't the way this site works. You seem to be mistaking us for rentacoder. Here's how it works - you work out what you need to do, you type in some code and we help you with the bits you can't get. We don't write assignments for you.
|
|
|
|