|
Hi,
I am developing a windows application. In this I have a list box which should be populated with a list of categories in the form load event.I've used a DataReader to do this. when I add a new category it should be automatically added to the list box also.I should use a seperate form to add a new category.If it's a Web appl it's very easy as the page will be refereshed every time.
|
|
|
|
|
I need to create such type of application through which i increase and decrease the volume of the system.
and mute and mute the sound from the application.
both master volume and wave volume handles.
|
|
|
|
|
|
Hello,
I am trying to cnvert a WORD file into a PDF in C#.NET. For that I am using GhostScript. It folows two steps.
1) Conversion of WORD TO PS
2) Conversion of PS TO PDF.
I can get the PS Fromat, but then I have to manually double click on PS File to get the PDF format. How do I get it automatically?
Help needed...
Thanks in advance
Vruddhi
|
|
|
|
|
I have made a small software which requires .Net framework 2.0 and Sql server Express.I want to make a setup file which automatically installs these two components.
How can i achieve this??
|
|
|
|
|
Make a setup project in your same application then
Right Click on your setup project and go to properties
by doing this a new window opens, on that window there is a button
with the name of prerequisites click on it
and it will solve your problem
|
|
|
|
|
|
Someone told me that the method needs memory ,is this true? In this way,does the static method can share their memories?
Thanks!
|
|
|
|
|
|
Uhh, every method needs memory to execute.
Having said that, a static method does not need memory to be allocated for an object (aka instance) to be executed; as opposed to a non-static method.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
Is it possible to throw an exception in any of the drag/drop events? Whenever I try to throw one (on purpose) code execution returns at the point of the exception, but no exception dialog appears and my application doesn't halt.
Is something interceding on my behalf because throwing an exception in any of these events is a bad move, or is this a bug of some sort?
VS2008 Pro/C#3.0/.Net 3.5/Vista x64.
PS Dragging stuff from a different domain (Outlook) on to my app.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
Hi all,
I have two datatables.
dt1 has the columns: nr, name, address, tel, mobile, fax
dt2 has the columns: name, address, mobile
How can i make from those two datatable one datatable? i have to set the result later in a datagrid.
thanx.
|
|
|
|
|
Just make a third table that has the columns of the other two in it. You can pull the column names out of the two tables and insert them into the third. Populate the third with the data and bind the third table to the datagrid. It's easy, just involves a couple steps.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi Paul, thanx for your response.
how do i populate the third datatable with the data of dt1 and dt2???
can u write some code pls?
|
|
|
|
|
|
Giorgi,
Thanx a lot, it realy helped
|
|
|
|
|
You are welcome
|
|
|
|
|
I'd just do a select that joins the two tables on name, or if you do that often enough, create a view that does it. Don't do it in memory, get the database to do what it's good at.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
let's assume this...
bt is a Button;
<br />
bt.Click += delegate( object sender, EventArgs e )<br />
{<br />
MessageBox.Show( "something" );<br />
};<br />
I also know that we can do this:
<br />
string s = "something";<br />
bt.Click += delegate( object sender, EventArgs e )<br />
{<br />
MessageBox.Show( s );<br />
};<br />
But.. what if I wanted to put inside the delegate some code that is stored in a string?
like...
<br />
string code ="MessageBox.Show( \"something\" );";<br />
bt.Click += delegate( object sender, EventArgs e )<br />
{<br />
??? code ????<br />
};<br />
is there anyway one can do something similar to this? I thought of reflection, but... the context would be missing. Any thoughts? thanks...
Gonçalo A.
|
|
|
|
|
No you can't use a string for the body of the delegate. If you need to take different actions when the button is clicked, then create a handler and branch the code accordingly.
only two letters away from being an asset
|
|
|
|
|
Even though... if I create an EventHandler, I'll still have the same problem. If the inner code is coming from another source, I still don't have a way to "reflect" that code. Am I right?
Thanks for the reply, btw
Gonçalo A.
|
|
|
|
|
So, if I understand correctly, you have an object, call it B, who has the code (in string format) to run when some event in object A is fired, right? I don't understand why you can't have obj B simply add an event listener to the event of obj A. It sounds like you want to dynamically run some annonymous code from B that you won't know until runtime, but if at runtime you know the code, then why can't you just do A.Click += new ClickEventHandler(B.DoWhatever);? If this is not what you need (or want), then please explain a bit more on why exactly you need to have the php exec command in C#.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Well, the thing is, the code I do want to run, is not something I know. It's something I retrieve at runtime, let's say, from a file. I open a file, read the content, and then, have an event to run that content. That is what I want, so I can't have a B.DoWhatever function. I know this is something awkward to want... but this would be what I need. Any thoughts?
Thank you for the reply
Gonçalo A.
|
|
|
|
|
Although as a programmer this approach appears to make sense to you (you are loading source code into a dynamic method), to the computer the approach does not make sense as the source code you are loading is not compiled. In order to achieve this, you would have to load the source code then compile it at run-time and then execute it most likely using reflection ;->
|
|
|
|
|
Those were my thoughts exactly, that I was stuck with reflection. Though, the context is a problem... I cannot fit the code in the context that I want.
Anyways, thank you for the replies.
Gonçalo A.
|
|
|
|