|
You're showing ALL The pixel values ? Must be a small bitmap, perhaps GetPixel is all you need.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
erm it is a big one but will be cropping out a certain part of the picture to see the values.
|
|
|
|
|
Same deal - if you only want to pull out a small number of values, you may decide to use getpixel, to simplify the code.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok thanx i will work on it
|
|
|
|
|
i am doing a quiz web page using visual studio.net
i want to show 1 question per page
but i having trouble displaying the row of data i want.
For my database i created, i having 4 columns
- QnC --- Contains my questions and choices (text)
- QID --- questions identity number
- Choice --- choices identity number
- Ans --- answer (not that important, i havent reach this part)
this is my code for sql:
Cmd.CommandText = "SELECT [QnC] FROM Quiz " +
"WHERE [Choice]= " + i + " and " + "[QID]= " + i + "";
"i" is an integer i declared.
i wanna to display the question and choices but i only get to display question even if i use this code:
Cmd.CommandText = "SELECT [QnC] FROM Quiz " +
" WHERE [Choice]= " + i + "";
For this part the column is empty for the row contain questions.
Please tell me where i goes wrong...
fire85
|
|
|
|
|
You don't have a column called Choice, not that I can see. If you did, it would have the same value as QID ?
What does 'select QnC from Quiz' return you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry i typed wrongly, i modified it.
for what i expected from 'select QnC from Quiz'
is the Questions and choices that stored in that column.
fire85
|
|
|
|
|
What's the point of having two columns (Choice and QID), if they always contain the same value ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
For another webpage, I wanted to display only the questions in datagrid.
So i seperated it into 2 columns to make it more simple for me to call.
fire85
|
|
|
|
|
None of this makes any sense. You have two columns, but when you do a query, they both get checked for the SAME value ( the value of i ). how does that make it simple ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
But if put together in 1 column i dont know how to seperate it out when i need to display just question only. So i make it in this way.
But now think of it, when calling the questions will also be troublesome too
I will work on my database for better calling
Thanks alots, Sir Christian Graus.
|
|
|
|
|
fire85 wrote:
But if put together in 1 column i dont know how to seperate it out when i need to display just question only. So i make it in this way.
ARGH !!!!!
IF THE CODE YOU POSTED IS CORRECT, THEN THESE COLUMNS ALWAYS HAVE THE SAME VALUE FOR EACH ROW, SO THE SEPERATION IS WORTHLESS !!!!!!
Now. If you do a SELECT * from this table, do those two columns always have the same value per row ? If not, then your code is wrong. If so, then your database design is ridiculous.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry just found out is because of the design of my database (just did some testing) so i cant display others data.
Thanks alot for your time
fire85.
|
|
|
|
|
how do i add advanced properties in a usercontrol ?
someting like
ImageList.Images shows Image Collection Editor
or ListBox.Items shows string collection editor...
|
|
|
|
|
CiNN wrote:
how do i add advanced properties in a usercontrol ?
The more advanced they are, the more code you need to write. You're completely in control, and completely responsible for writing the implimentation. If you want more specific info, ask a more specific question.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i need access to store some images in an imagelist in my usercontrol
|
|
|
|
|
Oh, OK. Can't you just add a property that exposes the images in the imagelist ? Or are they not there as a collection ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
I'm trying to run g++ using process.start, but it fails to wait for it to exit. what need I do?
cheers
|
|
|
|
|
thepersonof wrote:
I'm trying to run g++ using process.start, but it fails to wait for it to exit. what need I do?
Have you tried Process.WaitForExit[^]?
|
|
|
|
|
thanks
atm i'm using:
ProcessStartInfo oStartInfo = new ProcessStartInfo();
oStartInfo.FileName = dir+"g++.exe";
oStartInfo.CreateNoWindow = true;
oStartInfo.UseShellExecute = false;
oStartInfo.Arguments = ".......";
Process p1 = Process.Start(oStartInfo);
p1.WaitForExit();
cheers
|
|
|
|
|
Since you're hiding the window and not using ShellExecute, you have no way of knowing if the app actually launched properly. Some applications don't tolerate NoWindow and/or must be executed using the Shell.
Also, some applications will start with their own "wrapper", where you launch one .EXE and it in turn, launches a second one to do the actual work while the one you launched quits.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks, the same thing happens, though, even when they are not used.
cheers
|
|
|
|
|
Ok I'm new to Windows development. I have a project that has 2 forms. A button on form1 opens an instance of form2. Form2 has a textbox that receives some data. I try to make that data available to form1. I have tried several things but keep running into problems. What is the proper way of making data inputted on different forms available to all forms?
|
|
|
|
|
Hi,
The best way is probably to have form 2 raise an event, whose argument will contain that piece of data you are trying to transfer. Then you will have form 1 subscribe to that event.
Hope that helps,
Yigal
|
|
|
|
|
This event stuff may be overkill unless you want the first form to display live updates of what is going on on the second form. Also, it would be a bit of a mess to onroll all the changes if the user ended up clicking "cancel" after a lot of changes.
More likely, you just want the same kind of behavior you get with the OpenFileDialog, SaveFileDialog, FontDialog, etc. In that case, you just add some public properties to your second form that can be initialized and retrieved from the first. You'll probably care about whether the user clicked "ok" or "cancel" on the second form, so you'll probably want to use the DialogResult stuff. (unless your second form has some other idiom, like those dialogs that only have a "close" button).
Hopefully this is enough info to get you started. This question is asked so often, I was thinking of writing a little article to describe a couple ways to do it simply, as well as the more advanced event method mentioned above. Or probably there is already an introductory forms article that covers it...
Matt Gerrans
|
|
|
|