|
Hi,
I have written simple code in click event of button as below
MessageBox.Show("HI");
When I run the application, I got the blank messagebox means it doesn't have the message text "HI" and also doesn't display OK messagebox button. Anybody have any idea. Please guide. Any type of help is appreciated.
Himanshu Batavia
|
|
|
|
|
You only need to post your question once. Someone will answer eventually.
Your code should look something like this
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello");
}
I would seriously suggest buying a book and working through it to get started in programming before looking for help online. Learn the basics first.
I think I'm going to call my next project "Chuck Norris". It's a sure way to guarantee it's unbreakable.
• • •
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
|
Hello
I have written simple code like this :
MessageBox.Show("Hello");
in click event of Button1. But when I run the program and click on Button1, I get the messagebox but having no output means I don't get "Hello" text and also don't get OK messagebox button. Why it is so? Any type of help is appreciated
Himanshu Batavia
|
|
|
|
|
Sounds like your code isn't working right. Are you certain the button1.Click event is setup to be handled by your handler function? You should show us the appropriate code.
|
|
|
|
|
I want to know image dimension but I can't use Image.FromFile method to load image file because it is very slow and I want get image dimention quickly.
my image file format is JPEG
i will thank every one help me
(excuse me i can't speak english correctly)
|
|
|
|
|
You will need to read the header information from the file then. This link[^] takes you to the specification. Be aware though that there are *many* different versions of JPEG, so you will need to test this thoroughly.
|
|
|
|
|
thank you a lot.
but this site does not offer any C# code and I can't find image dimension obviously in it's jpeg header format.
thank you again.
if any one have more simple answer please send it. thank you again.
|
|
|
|
|
I answered this question a couple of days ago right here.[^]
|
|
|
|
|
thank you very much .
can i trust it completely that it work correctly in any jpeg file?
thank you again.
|
|
|
|
|
Only if you test it to death.
|
|
|
|
|
i dont understand what you say?
|
|
|
|
|
What's not to understand??!! The only way YOU can "trust" any code you use is if YOU exhaustively test it!
|
|
|
|
|
The site isn't intended to show you C# code. It's the jpeg format only.
What you need to do is read in the file, a byte at a time until you read in the Xdensity and Ydensity bytes (each of which is two bytes). If you read in the first 18 bytes, the 14th will tell you the JPEG unit, the next two will be the X density and the last two will be the Y density.
|
|
|
|
|
thank you .
but can you offer a formula between density and unit that result in the height and width in pixel.
if you do it i will thank you very much
|
|
|
|
|
Well, according to the link. If units is zero then Xdensity and Ydensity are already in pixels.
If it is 1 or 2 it is in dots per inch or cm respectively. You will then need to find out the dots per inch/cm on the output device and scale appropriately.
For example, if the image is a photo at 300dpi and it is to be displayed on a screen at 96dpi then you need to reduce the number of pixels by source/destination or 300/96 (3.125)
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
thank you very much .
|
|
|
|
|
it does not give me the height and width in pixel yet.
i want only height and width. unit and density does not help me
thank you again.
|
|
|
|
|
Hi,
I want to save the images into Access database in C#. Please give ne the sample piece of code if you have or give me the related links.
Thanks in Advance,
AR Reddy
|
|
|
|
|
Hi,
to save images in access first transform them in bytes and then insert them in access.
|
|
|
|
|
There's a bazillion examples out on the web. All you have to do is Google for "C# save image access database".
|
|
|
|
|
I looked at some of your previous posts and many are considered 'generic' questions and several people have already told you to try to use Google. This forum is more for people who write their own code and then need help fixing it.
______________________
stuff + cats = awesome
|
|
|
|
|
Has anyone got an example of how to drag and drop into a multi line textbox or rich textbox? I need to be able to drag an item from a listbox and drop that item on the box where the cursor is.
|
|
|
|
|
|
hi
i create an application that user can change design forms at run time.
how can i save a C# form at run time
tanks
|
|
|
|