Click here to Skip to main content
15,928,207 members
Home / Discussions / C#
   

C#

 
GeneralCustom Controls Pin
chettu7-Mar-05 2:24
chettu7-Mar-05 2:24 
QuestionHow to get the number of items in enum ? Pin
Andres Coder7-Mar-05 2:03
Andres Coder7-Mar-05 2:03 
AnswerRe: How to get the number of items in enum ? Pin
turbochimp7-Mar-05 3:05
turbochimp7-Mar-05 3:05 
AnswerRe: How to get the number of items in enum ? Pin
mav.northwind7-Mar-05 3:17
mav.northwind7-Mar-05 3:17 
GeneralScroll bar problem in PrintPreview control Pin
sachinkalse6-Mar-05 23:10
sachinkalse6-Mar-05 23:10 
Generalvalidator Pin
ABBASI_RA6-Mar-05 22:11
ABBASI_RA6-Mar-05 22:11 
GeneralRe: validator Pin
chettu7-Mar-05 2:43
chettu7-Mar-05 2:43 
GeneralRe: validator Pin
ABBASI_RA8-Mar-05 2:43
ABBASI_RA8-Mar-05 2:43 
GeneralRe: validator Pin
chettu8-Mar-05 3:19
chettu8-Mar-05 3:19 
GeneralQuestion on PDA Pin
RockRock6-Mar-05 20:08
RockRock6-Mar-05 20:08 
Generalcoloured lines in a multilined textbox Pin
maheshfour6-Mar-05 18:30
maheshfour6-Mar-05 18:30 
GeneralRe: coloured lines in a multilined textbox Pin
Anonymous6-Mar-05 19:33
Anonymous6-Mar-05 19:33 
GeneralRe: coloured lines in a multilined textbox Pin
Robert Rohde6-Mar-05 20:12
Robert Rohde6-Mar-05 20:12 
GeneralRe: coloured lines in a multilined textbox Pin
maheshfour6-Mar-05 20:38
maheshfour6-Mar-05 20:38 
GeneralRe: coloured lines in a multilined textbox Pin
Robert Rohde6-Mar-05 20:59
Robert Rohde6-Mar-05 20:59 
Generalblit question Pin
theDexter6-Mar-05 17:10
theDexter6-Mar-05 17:10 
GeneralRe: blit question Pin
Robert Rohde6-Mar-05 21:24
Robert Rohde6-Mar-05 21:24 
GeneralRe: blit question Pin
theDexter7-Mar-05 2:40
theDexter7-Mar-05 2:40 
GeneralRe: blit question Pin
Robert Rohde7-Mar-05 5:04
Robert Rohde7-Mar-05 5:04 
Ok now I got it.
Create a bimtap which is big enough to hold all your images, get a Graphics object from it, then draw all your images into that graphics and finally draw it onto your Graphics object:
<br />
Bitmap b = new Bitmap(totalWidth, totalHeight);<br />
using (Graphics g = Graphics.FromImage(b)) {<br />
string[] files = Directory.GetFiles("path", "*.gif");<br />
foreach(string file in files)<br />
{<br />
g.DrawImage(Image.FromFile(file), x, y, width, height);<br />
}<br />
}<br />
e.Graphics.DrawImageUnscaled(0, 0);<br />


But note that the total amount of time spent for this operation will not be shorter, because neverthless reading from CD or over network will consume some time. But if needed you could cache the whole bitmap to make the next drawing faster.
GeneralRe: blit question Pin
theDexter7-Mar-05 8:28
theDexter7-Mar-05 8:28 
GeneralRe: blit question Pin
theDexter7-Mar-05 9:32
theDexter7-Mar-05 9:32 
GeneralENTER key Pin
ABBASI_RA6-Mar-05 15:13
ABBASI_RA6-Mar-05 15:13 
GeneralRe: ENTER key Pin
Vasudevan Deepak Kumar6-Mar-05 19:30
Vasudevan Deepak Kumar6-Mar-05 19:30 
GeneralRe: ENTER key Pin
Gamya6-Mar-05 19:59
sussGamya6-Mar-05 19:59 
GeneralRe: ENTER key Pin
Bahadir Cambel7-Mar-05 4:48
Bahadir Cambel7-Mar-05 4:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.