|
I make a chart in steema tchart and convert it in EPS file.
and now showing it in Latex, but it not work because EPS file is not standard.
Anybody please tell me what should i have to do?
Tahnks
ArvindHaritus
|
|
|
|
|
Hey guys,
I display a tooltip whenever a mouse moves over an item in my listview control. However, the width/height of the tool tip is determined by the content inside the tool tip. is it possible to override this and display a fixed width tool tip?
|
|
|
|
|
I'm trying to build prototype and want some objects filled with random data. I've copied my production interfaces into the prototype project and built some dummy classes based on them.
In the load method of one class i've added a bit of code to populate the private members with data.
When i instantiate a few objects and put them in a collection they all end up containing the same data. When i put a break point in the code to see what's going wrong though, they all come out with different values.
Does Random.Next() or Random.NextDouble() use the system time? I don't really understand what could be happening here.
Any ideas would be greatly appreciated
Russ
|
|
|
|
|
Use a single Random object in the code instead of creating a separate one for each object. The Random object is seeded from the system time when created, so if you create Random objects to closely in time, the randomness will not be good.
Another possible reason is if you actually don't instantiate separate objects, but instantiate only one single object and fill if with data over and over again. When you add the object to the collection, the object isn't copied, it's only the reference to the object that is stored. When you are done you have a collection full of references to the same object, which of course will contain the same data regardless of which reference you use to look at it.
---
b { font-weight: normal; }
|
|
|
|
|
i've just found a solution.
I tried to initialize the Random object with a seed of Environment.TickCount and still had the same problem when i ran it, but the second time i noticed the repeated number changed half way through my list. Made me think that maybe the Random seed only changes every 1 ms. I've added a Thread.Sleep(1) to my code and it works. It's only for building a prototype so i'm not too bothered how it works as long as it works.
Thanks for getting back Guffa (I thought i'd managed to use the same object for a while there too, had a long look to make sure i hadn't)
Russ
|
|
|
|
|
Well, anything that works...
The proper way to solve it is of course to use a single instance of the Random class. If you don't want to pass around the reference, you can make a factory method that will create a single instance:
private static Random rnd = null;
public static Random GetRandomGenerator() {
if (rnd == null) rnd = new Random();
return rnd;
}
---
b { font-weight: normal; }
|
|
|
|
|
hi
i have a datagridview and i want to change the current row style, changing its background color to yellow. it`s ok when i react to CellClick, but i want to select a row also if the user press the up or down keyboard keys.
ok, but, when i react to CellEnter or RowEnter, it`s coloring all the datagrid rows when the program first runs. how can i solve this problem? i just want to color a entire row when the current row cell is selected.
the code to color an entire row i`m using is the following:
<br />
foreach (DataGridViewCell cell in dgvPedidoItem.Rows[e.RowIndex].Cells)<br />
{<br />
cell.Style.BackColor = System.Drawing.SystemColors.Info;<br />
}<br />
thanks everyone in advance... XD
|
|
|
|
|
add the CellEnter or RowEnter event handler once the form has been drawn and the datasource set.
public Form1()
{
InitializeComponent();
dataGridView1.DataSource = ............;
//IN HERE FOR EXAMPLE
dataGridView1.CellEnter +=new DataGridViewCellEventHandler(dataGridView1_CellEnter);
}
|
|
|
|
|
Hi guys,
What I am having very hard time to achieve is to build an "Article Layout".
This means to have : Title, related image, and body-text, just like we can see in CNN articles for example.
Doing this in HTML is easy using the CSS float property.
I can't find a way to do it well in winforms.
I don't mean to create 2 columns: 1 for the image and 1 for the text, because thats easy.
I want to have the body text to wrap around (float around) the image.
Any idea will be appreciated.
Thanks.
|
|
|
|
|
Do you have any experience rendering (painting/drawing)? That is what you would have to do to achieve your goal. It basically involves a lot of pixel math and GDI calls to do the painting.
led mike
|
|
|
|
|
Hi
can i call a webmethod from another webmethod in the same webservice?
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
... you can ... Why do ask?
SkyWalker
|
|
|
|
|
Hi folks,
I am new for .Net 2.0, i want to use the appsettings values now i have using
following code and i add reference for configuration component manually but its not working.
|
|
|
|
|
- English please
|
|
|
|
|
hi folks,
I am new to .net , Now i have work with Windows application and i want to read the file from specific path. I have using filestream object for file access but it shows following error.
Access to the path 'C:\\Program Files\\AAA' is denied."
my code is,
FileStream FS = new FileStream(@"C:/Program Files/Psis/Conf.xml", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
is anybody face this problem before plz tell me the solution.
|
|
|
|
|
You don't have permission to either read or write or both to that directory. Maybe you can't create a file in that directory, or that directory doesn't exist.
The most likely cause (if you're running as an Admin / Power User) is that the Directory "C:\Program Files\Psis" doesn't exists.
Ps. Not sure if it likes the forward slashes in the path, if the directory exists and you have permission to write to it then this maybe the cause, note that the @ symbol disables character escaping in the string so \ means \ rather than the prefix for an escaped character.
|
|
|
|
|
I'm wanna write a application that can control the iis,such as create virtual web site,set virtual directory,configure parameters,delete virtaul web site.
whether .net 2.0 have provide the such class??
where I can find such component??
have other method to finish such work??
whether you have wrote such application?can you teach me how to do??
KSCsoft
|
|
|
|
|
KSCsoft wrote: I'm wanna write a application that can control the iis,such as create virtual web site,set virtual directory,configure parameters,delete virtaul web site.
This is possible.
KSCsoft wrote: whether .net 2.0 have provide the such class??
Not sure but possibly available through some interop / WMI.
KSCsoft wrote: where I can find such component??
Here[^]KSCsoft wrote: have other method to finish such work??
Eh?
KSCsoft wrote: whether you have wrote such application?
No
KSCsoft wrote: can you teach me how to do??
Yes but no.
|
|
|
|
|
hey dude, you really go direct to the point! LOL
|
|
|
|
|
Well the way the question was asked deserved an appropriate response.
|
|
|
|
|
why? did he say: "hey, short answers please, cause i don`t like to read so much"?
|
|
|
|
|
No, basically just asking someone to write a program for him. If he wants someone to do that they he should visit RentACoder.
People here help out more if you ask specific questions, and show some initiative...
|
|
|
|
|
using MS Visiual Studio.NET 2003, I'm trying to deploy smart device project to PocketPC but deploy fails. I got only messagaes:
"Error: Cannot establish a connection. Be sure the device is physically connected to the development computer."
but the device is connected and I transfer data and files. What could be the reason for deployment failure?
thanks.
|
|
|
|
|
Hi! problem is - when I press the button in grid (see - private void AddButtonColumn()) for the first time, counter adds 1 to row nine, when I press it repeatedly it works only on every second click. I want it to work on every second click at all times! how can I fix that? as you can see - on a button click timer is trigered. Counters job is to count how many times timer has been started. But now - for the first time it counts when timer starts and ends, but later on it does the job right. Heres the code Im having trouble with:
...
namespace Bonuss
{
public partial class frmList : Form
{
public frmList()
{
InitializeComponent();
dataGridView1.CellClick += new DataGridViewCellEventHandler(dataGridView1_CellClick);
}
void frmList__myElapsed(object sender, long Ticks, DataGridViewRow row)
{
if (dataGridView1.Rows[row.Index].Tag != null)
{
dataGridView1[7, row.Index].Value = Ticks.ToString();
}
}
private void ReloadData()
{
for (int i = 0; i <= dataGridView1.Rows.Count-1; i++)
{
if (dataGridView1.Rows[i].Tag == null)
{
dataGridView1.Rows[i].Tag = new rowTag(dataGridView1.Rows[i]);
((rowTag)dataGridView1.Rows[i].Tag)._myElapsed += new rowTag.myElapsed(frmList__myElapsed);
}
else
{
int err = 0;
}
}
}
DataGridViewButtonColumn buttons;
private void AddButtonColumn()
{
buttons = new DataGridViewButtonColumn();
{
buttons.HeaderText = "Opcijas";
buttons.Text = "--";
buttons.UseColumnTextForButtonValue = false;
buttons.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
buttons.FlatStyle = FlatStyle.Standard;
buttons.CellTemplate.Style.BackColor = Color.Honeydew;
buttons.DisplayIndex = 8;
buttons.DefaultCellStyle.NullValue = "<+/->";
}
dataGridView1.Columns.Add(buttons);
}
public void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].HeaderText=="Opcijas" )
{
try
{
rowTag currentRowTag = ((rowTag)dataGridView1.Rows[e.RowIndex].Tag);
if (!currentRowTag.isRunning)
{
currentRowTag.Start();
}
else
{
currentRowTag.Finish();
}
}
catch (Exception)
{
int a = 0;
}
try
{
if (dataGridView1[7, e.RowIndex].Value == "X")
{
if (e.ColumnIndex == buttons.Index)
{
dataGridView1[7, e.RowIndex].Value = 0;
}
}
else if (dataGridView1[7, e.RowIndex].Value != "X" )
{
if (e.ColumnIndex == buttons.Index)
{
dataGridView1[7, e.RowIndex].Value = "X";
float ft_Counter = 0;
try
{
ft_Counter = Convert.ToSingle(dataGridView1[9, e.RowIndex].Value);
}
catch (Exception)
{
ft_Counter = 0;
}
dataGridView1[9, e.RowIndex].Value = ft_Counter + 1;
}
}
}
...
|
|
|
|
|
Use the pre tag when you post code, so that the indentation is preserved.
---
b { font-weight: normal; }
|
|
|
|