|
Sorry But Please Explain It to finding Err.Number.
If you can think then I Can.
|
|
|
|
|
Hey Anubhava...
did you got the solution to find error number in c#.net???
i have the same requirement i tried so much but i did not found solution
please pass solution if you got
tnx in advance
|
|
|
|
|
Hello,
I am developing a application, in which, i have a domain server like ITES.COM, approx 100 systems connected to this server. i have entered login details & path of Domain by using DIRECTORYENTRY. then i have got all local computer name. when user click on any computer name then display hardware configuration according to computer name.
i used WMI for fetch Hardware Configuration, but its through exception "Access Denied". when i paas login details of individual machine.. then its work perfectly.
So, how i authenticate Domain Login Details on local machine for get hardware Configuration.
|
|
|
|
|
Hi Experts
i using Visual Studio 2005.
I Fill a grid using Dataview in C#.NET winForms.
I Filter it with Dataview RowFilter then the result Come After Row Filter
Show in Different Grid now i want to Filter The Data from Second Grid not from first grid.
I mean to say that suppose e.g I Have Grid Result first Time
ID Name
1 Hello How R
2 i am fine
3 this is my book
4 this is C# Book
5 this is C# Example
6 Book is black
now i apply Row Filter on the 'this is'
dvs.RowFilter =Name like '%this is %'
now Result Come
ID Name
3 this is my book
4 this is C# Book
5 this is C# Example
Now i am again apply Row Filter not on the first case but apply on the second case.
now i apply Row Filter on the 'this is'
dvs.RowFilter =Name like '%Book%'
now Result Come this
I want this result set
ID Name
3 this is my book
4 this is C# Book
but result come
ID Name
3 this is my book
4 this is C# Book
6 Book is black
then how to fix this problem
this search within search in n time untill zero result is come....
Thank u
Dinesh
|
|
|
|
|
Do not Re post the same question,you already get a reply for your previous post.
|
|
|
|
|
i got a method i need to run that method automatically when run my application without pressing any button or without any user interupt.
A S E L A
|
|
|
|
|
umm ok so on your load event, throw a call to that method. If it is a console application, throw it in the main method...
|
|
|
|
|
when my application run allthe time i need to run this code....
pl help me to post some example codeing related to this...
thankss..
IntPtr hWnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
ShowWindow(hWnd, 0);
int intReturn = FindWindow("Shell_traywnd", "");
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);
A S E L A
|
|
|
|
|
I just puked a little bit.
|
|
|
|
|
|
S K Y wrote: IntPtr hWnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null);
ShowWindow(hWnd, 0);
int intReturn = FindWindow("Shell_traywnd", "");
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW);
It is really surprising that you can understand this code and then ask such questions.
|
|
|
|
|
He's obviously copying and pasting code from all over the web, and yet has no idea what he's doing. Remember the barcode login fiasco ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Maybe it's some sort of experimental bot that's picking up code fragments from around the net, pasting them together, and then using keywords in them to post questions here...
It's some sort of intellignece intelligence test
There are three kinds of people in the world - those who can count and those who can't...
modified on Saturday, July 4, 2009 6:41 AM
|
|
|
|
|
No, it's outsourcing.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
That code snippet is horrible. You try to hide the ProgMan and Taskbar windows, mix up ints and IntPtrs, and use zero instead of a constant in the ShowWindow call. To answer your question, you put the startup code in the Main() method. But please, make that code cleaner. It burns my eyes
By the way, this seems to be a little threatening to a user. You should try to find a way to do whatever you're doing without hiding the taskbar (and desktop IIRC), because whatever code you use to re-show them again won't be executed if your program's process is killed by Task Manager or some other unorthodox method
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
how to hide MaximizeBox ?
|
|
|
|
|
Hi,
Form.MaximizeBox=false; almost hides it. Chosing another FormBorderStyle may hide it completely (as well as other parts of the title bar).
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
ERROR: An object reference is required for the nonstatic field, method, or property 'System.Windows.Forms.Form.MaximizeBox.get'
|
|
|
|
|
I hope that was a joke - if so, it's not bad
But otherwise..
|
|
|
|
|
hi...
i am saving images in a DB
when i try to open them from the database i have an error
the code:
SqlConnection con1 = new SqlConnection("DATA SOURCE = MAX_TOSHIBA ;Initial Catalog= nodule ; Integrated security = True");
SqlDataAdapter adp1 = new SqlDataAdapter();
SqlCommand com1 = new SqlCommand("SELECT the_pic FROM pic where pic_id='" + chos_pic_id.ToString() + "' and pic_no='" + chos_pic_no.ToString() + "'",con1);
adp1.SelectCommand = com1;
DataTable t__1 = new DataTable();
adp1.Fill(t__1);
byte[] by_ = (byte[])t__1.Rows[0][0];
FileStream FS1 = new FileStream("image.jpg", FileMode.Create);
FS1.Write(by_, 0, by_.Length);
FS1.Flush();
FS1.Close();
pictureBox1.Image = Image.FromFile("image.jpg");
the error appear in the last line saying "out of memory"
thanks in advance
|
|
|
|
|
Hi,
some comments:
1. you are not running out of memory: GDI/GDI+ and .NET generate an "Out-of-Memory" condition when the data is not a valid image.
2. the problem can equally well be in the piece of code that puts the image in the database; you really should compare those two snippets for almost identity.
3. I suggest you log your SQL commands, and the length of the byte arrays
4. you don't need to create an image file to get it from database to PictureBox; a MemoryStream and Image.FromStream() should suffice.
5. Flush and Close does not make much sense, since Close implies a Flush; Flush is useful sometimes when you do not want to close right away.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
hi, thank you for your reply..
i tryed the memorystream ,and i did not work ,it give me the same error !!
the intresting thing i found that the byte numbers it give the error after is 13!! i realy dont know why
i have tryed many images but the same error with the same number 13!!
any way you wanted me to check the input method, i do not find any thing in it , here it is
byte[] data = null;
FileInfo fInfo = new FileInfo(sPath);
long numBytes = fInfo.Length;
MessageBox.Show(numBytes.ToString());
FileStream fStream = new FileStream(sPath, FileMode.Open,FileAccess.Read);
BinaryReader br = new BinaryReader(fStream);
data = br.ReadBytes((int)numBytes);
thank you verey much for your time and effort
|
|
|
|
|
Hi,
there is no need for you to show us how a MessageBox.Show statement looks like.
What YOU should do is compare all the different length/size informations you have, and make sure they are all the same, the first to deviate will point you at the (first) problem. Here are all the lengths:
- the file size as shown by Windows Explorer
- the byte[] length when you have read it in in the code that will put it in the database
- the database tools you use should allow you to investigate the size of a specific record and field
- the byte[] length when you get it back out of the database
If all the above are the same, chances are good your last byte[] really contains an image, and you will be able to convert.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
all the images that i load have 13 bytes (where i use the above code)
i do not know how to check the no. of bytes in the (sql 2005)
thanks
|
|
|
|
|
A_A wrote: all the images that i load have 13 bytes
which is clearly wrong. How many image files do you own that small?
Probably none.
A_A wrote: i do not know how to check the no. of bytes in the (sql 2005)
Neither do I, I know how to use PhpMyAdmin to watch fields and field sizes on MySQL tables, I don't have SQL Server where I am right now.
Suggestions:
-dump those 13 bytes in hex, fat chance they form an ASCII string because you called ToString() somewhere, possibly implicitly.
-check your code, try to figure out whether save-to-DB or load-from-DB are the culprit.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|