|
Shiv5 wrote: Please send me the MCP QUESTION FOR C#
Learn the damn stuff yourself - I worked hard for my certification and I will not have it devalued by a bunch of lazy idiots that don't want to spend the time learning the required course material.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Dude I recomand you to learn books by urself cuz it;s the best way to understand programming........
|
|
|
|
|
Hi guys,
I am currently writing a small app that contains an editable ListView based on the one detailed here:
http://www.c-sharpcorner.com/Code/2002/July/EditableListView.asp
I noticed a small bug in the code in case your interested, to correctly work out the column to edit from the x,y values of your mouse the code totals up the column widths to find an x value that matches entry of the bounds for the editable box your mouse clicked in. However, the first column width is already checked before it continues, when it continues it adds the first column width again before checking and therefore messes up if you have different column widths, so the line:
epos += this.Columns[i].Width;
simply needs changed to:
epos += this.Columns[i+1].Width;
Anyway, I have a small problem that has been bugging me for hours now and hope you can help. If the said ListView or any form control for that matter is larger than the size of the form, a scrollbar appears. Therefore when the user clicks on the screen you recieve the x,y coordinates from the top left of the form or part of the control that is visable (not sure myself) so.. is there a way to get the scrollbar offset so you can correctly determine the x,y coordinates even though a portion of the control is not visible?
Any help would be great and thanks for your time
Darren
|
|
|
|
|
Dear All,
How do i read and Execute a bunch of .Sql at the same time using C#
Send me sample code for that
GreatRegards,
Sivakumar Lakshmanan.
|
|
|
|
|
I am not sure what exactly you are trying to do with the .Sql but may I suggest that you look at the Database Application Block from Microsoft. The Application Block abstracts much of the database work into a series of static methods that are very useful.
Not withstanding the application block I would suggest that you explore the Data namespace and use the SqlCommand object. You will have to set the commandtext then execute the command. As a side note I would strongly suggest that you use stored procedures if you have a "bunch" of scripts to run.
Hope it helps
|
|
|
|
|
Hi All!
Could some one help me how to add a control on menu bar?
It looks like Microsoft Word, it has a combo box in top right corner.
Thanks
|
|
|
|
|
if you are using Visual Studio 2005 then you can simply insert a menustrip which allows you to include a combo box on the menustrip itself.
|
|
|
|
|
I'm working on a bible project. Part of it is to display bible verses on screen. Given that the bible text are in different formats (some are italics, some are in red, ...).
I tried using labels to display them. But if one chapter has 80 verses, I would have to create at least 80 labels. This is very slow - could take 15-20 seconds to display.
Apart from using labels, is there any other efficient way to handle text display?
Thanks!!
|
|
|
|
|
Graphics.DrawString()
Here is something to get you started:
class CustomDrawControl : Control
{
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawString("blah blah", Font, Brushes.Red, e.ClipRectangle);
}
}
|
|
|
|
|
Thanks! Since I'm new to C#, can you be more specific?
Do I use graphics instead for each text in those labels I created?
|
|
|
|
|
I have taken a look at it. But how can the drawstring be changed?
How is the "tabPage1.paint += new System.Windows.Forms.PaintEventHandler(tabPage1_paint)" triggered?
-- modified at 3:58 Tuesday 30th May, 2006
|
|
|
|
|
You could use the RichTextBox[^] control. It supports formatting.
|
|
|
|
|
But would RichTextBox control be as slow as label control?
Someone suggested using paint control. Do you know how to do that?
|
|
|
|
|
The rtb should be much faster than dynamically creating a mess of labels.
Paint isn't a control, it's an event for your form. It's more flexible, but if you're a beginner the price in increased effort needed to use is probably not worth it.
|
|
|
|
|
I managed to displayed text by using graphic object.
g = tabPage1.CreateGraphics();
g.DrawString(text, fnt, brsh, x, y);
g.Dispose();
I used labels before and the tabPage was scrollable (tabPage.AutoScroll = true). But now it is not scrollable any more and thus those text at the bottom are missing from the tabPage. Do you know why?
-- modified at 11:48 Tuesday 30th May, 2006
|
|
|
|
|
how to use atan2()? please help and show some example of it...thanks alot
|
|
|
|
|
Why do you want to use a function, that you dont know what it does?
|
|
|
|
|
char s[7];
long x,y,z;
float rad2;
sprintf(string,"%c", buffer1[0]);
x=atol(string);
printf(lcd_putc,"X=%ld", x);
sprintf(string,"%c", buffer1[9]);
y=atol(string);
printf(lcd_putc,"Y=%ld", y);
rad2 = atan2(x,y);
printf(lcd_putc,"%3.2f", rad2);
This is my program. I wanted to use the arc tangent formula to calculate the degree. I would really appreciate if anyone can tell me what's wrong with my program and what can i do to solve it. Thankx..
|
|
|
|
|
|
Then where should i post this?
|
|
|
|
|
|
i need help urgently..can someone point out the mistake in that code? thanks alot
|
|
|
|
|
hi all,
is it possible to search (parsing source of site) jpgs in a web-site and save them in a folder on my computer ?
let's say website is : www.blablabla.com i want to give this address as the url and get all the images in that site ?
any suggestions ? or a document explaning this source code searching methods ?
thanks in advance,
bye.
|
|
|
|
|
|
Hello Mehmet
You could write a program that access the folders of the site directly, enumerate its content and choosing jpg files to download. The problem is that you'll get an "unauthorized access" thrown at your program, and to get around it this will be hacking, and you may get busted for this.
Another more complicated and less effecient way -which is used by almost all site downloader programs-, is to parse the source code of the page as html text. search for jpg files in the text, and extract the link and download it. the algorithm may look like this:
1- IndexOf("jpg")
2- GoBackToIndexOF("<ahref>") -or whaterver is the begining of the image link-
3- Read what's between as ImgLink
4- Download ImgLink
If you want to download images in subpages do the same algorithm to access these pages and parse them.
|
|
|
|