Click here to Skip to main content
15,916,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: returning strings from c to c# Pin
Luc Pattyn7-Apr-08 8:06
sitebuilderLuc Pattyn7-Apr-08 8:06 
GeneralRe: returning strings from c to c# Pin
half-life7-Apr-08 8:13
half-life7-Apr-08 8:13 
QuestionShould I always call the Disposal() method of a object after using it? Pin
Secret_Garden7-Apr-08 4:10
Secret_Garden7-Apr-08 4:10 
GeneralRe: Should I always call the Disposal() method of a object after using it? Pin
Pete O'Hanlon7-Apr-08 4:18
mvePete O'Hanlon7-Apr-08 4:18 
GeneralRe: Should I always call the Disposal() method of a object after using it? Pin
Mike Dimmick7-Apr-08 4:23
Mike Dimmick7-Apr-08 4:23 
GeneralRe: Should I always call the Disposal() method of a object after using it? Pin
Secret_Garden7-Apr-08 4:37
Secret_Garden7-Apr-08 4:37 
Generalexcel Pin
ellllllllie7-Apr-08 3:50
ellllllllie7-Apr-08 3:50 
GeneralStrang Error :( Pin
M Riaz Bashir7-Apr-08 3:41
M Riaz Bashir7-Apr-08 3:41 
Hi,

Kindly note, the problem is that, following commands works perfect only 5 to 10 times in loop
and after then shows error when cursor goes on
"Bitmap mybitmap = new Bitmap(pictureBox2.Image);" after 5 to 10 times in loop.

Error is : !NullReferenceExeption was unhandled
Object reference not set to an instance of an object

-----------------------------------------------
i am using:
-----------------------------------------------
class gp
{
bitmap gp1
{
GetDC(PlatformUSER32.GetDesktopWindow());
CreateCompatibleDC(hdc);
ShowWindow(hdc, 3);
size_.cx = PlatformUSER32.GetSystemMetrics(SM_CXSCREEN);
size_.cy = PlatformUSER32.GetSystemMetrics(SM_CYSCREEN);
CreateCompatibleBitmap(hdc, size_.cx, size_.cy);
}
}
----------------------------------------------

picturebox1.image = gp.gp1()

Bitmap mybitmap = new Bitmap(pictureBox1.Image); <<-- this works perfect 5 to 10 time in loop


after 5 to 10 times it is showing said error.

Kindly help me to solve this problem.


Thank you
(Riaz)
GeneralRe: Strang Error :( Pin
Mike Dimmick7-Apr-08 4:28
Mike Dimmick7-Apr-08 4:28 
GeneralRe: Strang Error :( Pin
Luc Pattyn7-Apr-08 4:36
sitebuilderLuc Pattyn7-Apr-08 4:36 
GeneralRe: Strang Error :( Pin
M Riaz Bashir7-Apr-08 4:56
M Riaz Bashir7-Apr-08 4:56 
General[Message Deleted] Pin
M Riaz Bashir7-Apr-08 4:58
M Riaz Bashir7-Apr-08 4:58 
GeneralRe: Here is my codes Pin
Luc Pattyn7-Apr-08 5:43
sitebuilderLuc Pattyn7-Apr-08 5:43 
GeneralRe: Here is my codes Pin
M Riaz Bashir7-Apr-08 5:46
M Riaz Bashir7-Apr-08 5:46 
GeneralEvent handler for menu populated from database Pin
random47-Apr-08 3:32
random47-Apr-08 3:32 
GeneralRe: Event handler for menu populated from database Pin
Mark J. Miller7-Apr-08 6:07
Mark J. Miller7-Apr-08 6:07 
GeneralRe: Event handler for menu populated from database Pin
random421-Apr-08 18:36
random421-Apr-08 18:36 
GeneralRe: Event handler for menu populated from database Pin
lsconyer7-Apr-08 6:51
lsconyer7-Apr-08 6:51 
Questionhow to access browser elements Pin
Senthil Palani7-Apr-08 3:06
Senthil Palani7-Apr-08 3:06 
QuestionFloating/Dockable form Pin
Noemi Katinka7-Apr-08 2:52
Noemi Katinka7-Apr-08 2:52 
GeneralRe: Floating/Dockable form Pin
lsconyer7-Apr-08 3:11
lsconyer7-Apr-08 3:11 
QuestionRegarding printing of Windows forms [modified] Pin
manikandanid7-Apr-08 2:23
manikandanid7-Apr-08 2:23 
GeneralDynamically add TabPages to my form depending on the number of worksheets in a spreadsheet Pin
Walaza7-Apr-08 2:18
Walaza7-Apr-08 2:18 
GeneralRe: Dynamically add TabPages to my form depending on the number of worksheets in a spreadsheet [modified] Pin
lsconyer7-Apr-08 2:32
lsconyer7-Apr-08 2:32 
GeneralRe: Dynamically add TabPages to my form depending on the number of worksheets in a spreadsheet Pin
darkelv7-Apr-08 4:14
darkelv7-Apr-08 4:14 

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.