Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
Questionhow to display colorful cursors or *.ani in the c#? Pin
dxhdxh5-Mar-05 4:12
dxhdxh5-Mar-05 4:12 
AnswerRe: how to display colorful cursors or *.ani in the c#? Pin
Judah Gabriel Himango5-Mar-05 10:20
sponsorJudah Gabriel Himango5-Mar-05 10:20 
GeneralRe: how to display colorful cursors or *.ani in the c#? Pin
dxhdxh5-Mar-05 13:32
dxhdxh5-Mar-05 13:32 
GeneralDiffrence between DataSet & DataReader Pin
X20405-Mar-05 1:48
X20405-Mar-05 1:48 
GeneralRe: Diffrence between DataSet & DataReader Pin
SimonS5-Mar-05 5:47
SimonS5-Mar-05 5:47 
Generalprinter related code Pin
cishi_us5-Mar-05 0:23
cishi_us5-Mar-05 0:23 
GeneralRe: printer related code Pin
Dave Kreskowiak5-Mar-05 6:21
mveDave Kreskowiak5-Mar-05 6:21 
GeneralRe: printer related code Pin
cishi_us7-Mar-05 1:21
cishi_us7-Mar-05 1:21 
well sir sure i like to take urs help...i have just reaced to my destiny as well but some problems occuring in it.....
i m writing here u code and plz try to help me...The problem occuring on following places..please read code i m writing where the problem is occuring..



///////////////////////////////////////////////////////////////////



try
{


PropertyDataCollection __gc *pdc = e->NewEvent->get_Properties();
PropertyDataCollection::PropertyDataEnumerator __gc *pdce = pdc->GetEnumerator();
while(pdce->MoveNext())
{
PropertyData __gc *pd = pdce->get_Current();
ManagementBaseObject __gc *mbo = dynamic_cast<managementbaseobject *="">(pd->get_Value());
1) problem***************problem occuring on the below if statement.not all time but some time the mbo variable does not declare and by using watches i see that mbo is undeclared value.its some time ... and printer does not pause..***********************************

if( mbo != NULL && mbo->ClassPath->ToString()->ToUpper()->EndsWith(S"WIN32_PRINTJOB") )
{
/////

//pause job
long a=0;
long *hprinter = &a;
for(int i=0 ; i<this->printersname->Length ; i++)
{
try
{

int result = PrinterAPIs::OpenPrinter(this->printersname[i], hprinter, NULL);
bool resultf = PrinterAPIs::SetJob(*hprinter, (long)Int64::Parse( mbo->Properties->get_Item(S"Jobid")->Value->ToString() ), 0, NULL, 1);
PrinterAPIs::ClosePrinter(*hprinter);
MessageBox::Show(this, mbo->Properties->get_Item(S"Owner")->Value->ToString());
*****************************************************************************
2) Below message box is not showing the correct number of pages that comes from print status that come in task bar when a pages are going to print.***************************************
MessageBox::Show(this, mbo->Properties->get_Item(S"TotalPages")->Value->ToString());


if(resultf == true)
break;
}

catch(Exception __gc *ex)
{
MessageBox::Show(this, ex->ToString());
ex = NULL;
}
GeneralRe: printer related code Pin
Dave Kreskowiak7-Mar-05 11:11
mveDave Kreskowiak7-Mar-05 11:11 
Generalregistry editing: NullReferenceException driving me crazy... Pin
markali5-Mar-05 0:01
markali5-Mar-05 0:01 
GeneralRe: registry editing: NullReferenceException driving me crazy... Pin
mav.northwind5-Mar-05 0:17
mav.northwind5-Mar-05 0:17 
GeneralRe: registry editing: NullReferenceException driving me crazy... Pin
markali5-Mar-05 0:33
markali5-Mar-05 0:33 
GeneralRe: registry editing: NullReferenceException driving me crazy... Pin
Bahadir Cambel5-Mar-05 4:57
Bahadir Cambel5-Mar-05 4:57 
GeneralSercurity question Pin
oohungoo4-Mar-05 22:47
oohungoo4-Mar-05 22:47 
GeneralRe: Sercurity question Pin
mav.northwind4-Mar-05 23:00
mav.northwind4-Mar-05 23:00 
GeneralRe: Sercurity question Pin
Dave Kreskowiak5-Mar-05 9:46
mveDave Kreskowiak5-Mar-05 9:46 
GeneralRe: Sercurity question Pin
oohungoo6-Mar-05 0:24
oohungoo6-Mar-05 0:24 
GeneralRe: Sercurity question Pin
J4amieC6-Mar-05 22:37
J4amieC6-Mar-05 22:37 
GeneralVS.NET error or my error: if(a&lt;0) a = -a; Pin
dstang20004-Mar-05 20:12
dstang20004-Mar-05 20:12 
GeneralRe: VS.NET error or my error: if(a&lt;0) a = -a; Pin
mav.northwind4-Mar-05 23:17
mav.northwind4-Mar-05 23:17 
GeneralRe: VS.NET error or my error: if(a&lt;0) a = -a; Pin
Luis Alonso Ramos5-Mar-05 19:12
Luis Alonso Ramos5-Mar-05 19:12 
GeneralRe: VS.NET error or my error: if(a&lt;0) a = -a; Pin
dstang20005-Mar-05 20:59
dstang20005-Mar-05 20:59 
Generallogically linked array Pin
lindiwe4-Mar-05 19:36
lindiwe4-Mar-05 19:36 
GeneralRe: logically linked array Pin
mav.northwind4-Mar-05 21:45
mav.northwind4-Mar-05 21:45 
GeneralRe: logically linked array Pin
Dave Kreskowiak5-Mar-05 9:45
mveDave Kreskowiak5-Mar-05 9:45 

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.