|
I just thought it was overkill as I know only one row will be rerurned (I could have used find I guess).
Linq is probably the answer of course.
Thanks for your input - much appreciated.
Glen Harvy
|
|
|
|
|
How to create controls dynamically?
|
|
|
|
|
Control c = new Control();
All the best,
Martin
|
|
|
|
|
Thanks....
I have developed a datagrid control dynamically with pre defined number of columns and rows and docked it to a new form form2. But the form2 comes in usual form size i.e small and all the cells of the datagrid are not visible as it has scrollbars. I want to see all the cells within the form so I need to increase the size of the form2. Please help me...
Sangram
|
|
|
|
|
Hello,
I would suggest, to handle the SizeChanged event of the Control and modify the Forms Size.
this.Size = new System.Drawing.Size(x,y);
Or modify seperate:
this.Width
this.Height
All the best,
Martin
|
|
|
|
|
I think i answered this question in asp.NET forum
Please google it Google is your best friend
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi all
I am working in an image processing project and need a help in converting formats to .gif
When I convert any file to gif by the following way:
Bitmap bm =new Bitmap(FileName);
bm.Save(targetfilename, ImageFormat.Gif);
the resulting image from the previous code will be bad and has background.
Can anyone help me in this problem?
Mostafa Sayed
Software Developer
|
|
|
|
|
|
I am reading a page abc.txt
by following code::
StreamReader re= File.OpenText("abc.txt"
string input = null;
string str = null;
while ((input = re.ReadLine()) != null)
{
str = str + input;
}
But the formatting of page is breaking.
How can I read the page in the same format as it is???
please give me ans. it is very urgent..
hiiiiii
|
|
|
|
|
The result if this function will be one long string. You need to insert newline character after every line you read. Also, use StringBuilder they are faster
|
|
|
|
|
If you are using .NET 2.0 you can just use
string contents = System.IO.File.ReadAllText("abc.txt");
|
|
|
|
|
NO, I am using 1.1
hiiiiii
|
|
|
|
|
Eew, you do know we are already at .NET 3.0 and 3.5 is comming in a few months.
Oh well you should so something like:
StringBuilder sb = new StringBuilder();
using (StreamReader re = File.OpenText("abc.txt"))
{
string input = null;
while ((input = re.ReadLine()) != null)
{
sb.AppendLine(input);
}
}
string result = sb.ToString();
Oh StreamReader has a ReadToEnd() which does what I did here :P
string result = null;
using (StreamReader re = File.OpenText("abc.txt"))
{
result = re.ReadToEnd();
}
|
|
|
|
|
Thanks a lot!!!!!
hiiiiii
|
|
|
|
|
hkchauhan wrote: But the formatting of page is breaking.
hwat do you mean ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi,
is there any way to disable show pop-up window in top left corner on form when <f10> key pressed?
Thanks, Jure
|
|
|
|
|
Ops!
I mean when key F10 pressed.
|
|
|
|
|
|
When I press F10 and then up or down arrow key there appear a box with options Restore, Move, Size, Minimize, Maximize and Close. I think that comes from system, because many windows has similar box (like properties on desktop).
|
|
|
|
|
I think it's the system menu.
|
|
|
|
|
Problem solved, thanks to Hans Passant.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.F10) return true;
return base.ProcessCmdKey(ref msg, keyData);
}
|
|
|
|
|
Is it possible to integrate a function over a parametre for example: integral[a,b](f(x))*dx;
Thanks.
|
|
|
|
|
Hello,
Maybe you find some help in this articles![^]
All the best,
noch einen schönen Tag,
Martin
|
|
|
|
|
my requirement is that when I click on a cell of a datagridview the cell number with respect to the row number and column number should be stored in a label control separated by commas or in a combobox collection items. Somebody please help me how to acheive this.
|
|
|
|
|
Hi! Here's the problem:
I have an exe (no source code) wish for it to run only when it finds a valid license on the pc. Therefore I wish to modify it somehow (wrap,modify, etc) so that it will check for certain criterii such as hardware id before launching itself.
What I've found out so far:
I know I can create another exe that embeds the exe using Visual Studio. However, running the exe from memory only applies to .Net exe. I wish to cover non .Net too. And I know that running non .Net exe from memory is very hard.
Question:
How do i do this? Is there a way to modify the exe so that I can insert checking codes before the exe launches normally?
Thanks!
"Long is the way, and hard, that out of hell leads up to light."
|
|
|
|