|
Create one listbox control that is shown on all pages. Simple and each page will reflect the same ListBox list and selected item.
|
|
|
|
|
Hi.
I have a winform that creates a process(cmd) and redirects its inputstream and outputstream to streamwriter and streamreader.
im able to write a command to that process(dir for example) and get the output and display it on textbox.
however, it seems that after i write to the inputstream i have to close it , only if i close the stream the command that ive sended is executed.
i want to be able to write more command to that stream and keep it open.
using the "flush" method on the streamwriter dosent seems to work.
how can i accomplish that task?
|
|
|
|
|
Does your command end with CR+LF?
It's just a guess but I think you need to send the equivalent of pressing Enter at a command prompt (i.e. in Cmd window).
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Your app has a lot of problems with the console because console window doesn't belong to the caller process.If you want be able to read or write to console from Win forms in the same way like console application you should call AllocConsole or AttachConsole native functions to create or assign console window that belong to your windows forms app,not just to external process.To close current process console window you should call FreeConsole function.See some sample code here.
Life is a stage and we are all actors!
|
|
|
|
|
So i posted a question the other day about dynamically loading dll components. And it works great if I know the type like this(whatever.whatever):
Assembly asm = Assembly.LoadFrom(openFileDialog1.FileName);
Type myType = asm.GetType("whatever.whatever);
UserControl uc = (UserControl)Activator.CreateInstance(myType);
uc.Name = "uc";
this.Controls.Add(uc);
But now how would I do this without knowing the type before?
Thanks
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
roguemat wrote: But now how would I do this without knowing the type before?
asm.GetTypes()[^]
|
|
|
|
|
Shot
I had that but was being silly. Working now tho
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
Why would you be trying to add a control of a type that is unknown to you? In other words, if you don't know what "whatever.whatever" control exists in the assembly, why would you expect it to be there?
|
|
|
|
|
Well im using a whole lot of different components ive made and its a real hack having to change it every time, or pre-code the possibilities.
Strive to be humble enough to take advice, and confident enough to do something about it.
|
|
|
|
|
i'm doing an mini project which 1. Member registration.
1. Credit checking.
- After they have made the payment through online banking, ATM or bank-in,
the credit will be updated. Once they have upload an advertisement banner,
then the credit will be deducted according to the charges rate.
2. Banner posting.
- Allow the user to upload the banner according to the size specify by the
TARC STREET. Calculate the charges needed for each post.
i done banner part but i hv no idea to code credit checking...can 1 can help me..thanks
|
|
|
|
|
|
It may be urgent to you, but not to everyone else here. Don't be rude.
only two letters away from being an asset
|
|
|
|
|
Indeed, "urgent" and "high importance" generally refer only to the sender, not to the receiver.
|
|
|
|
|
The title of your post makes it sound like you're stuck on a ledge, 12 floors up and the buildings on fire. I rather suspect that your problem isn't as urgent as that.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi all,
I'm new in c# and sort of confused in offline data handling. I fill my dataset with sql commanmd which is a joined selection (e.g select a.name,b.age,c.deprt_name from table1 a,table2 b,table3 c where ................) and that is how I fill dataset and assign the datasource of datagridview. When I delete,insert and update I only use table2.
How can I manage dataadapter,commandbuilder etc. and let dataadapter automatically do all these database operations.
Thanks in advance
snky
|
|
|
|
|
sureyyan wrote: and let dataadapter automatically do all these database
Theres you first mistake, don't rely on the data adapter to do anything automatically, you are the programmer, understand what your program is doing, take control of your data and its manipulation. The biggest problem I can see here is new programmers relying on the MS wizards to do the work they should be doing with a data access layer (DAL). Do some research into DAL, stored procedures and parameterised queries, you will be a better developer for it!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Keep your advises and assumptions to yourself.
Use your time for something constructive and behave yourself.
|
|
|
|
|
That's a bit of an arsey attitude you've got going on there - a newbie and obnoxious; that's an attractive package you've got going there bubba. You were given good advice, but you wilfully chose to ignore it and attack the person giving it - perhaps you need to step back for a moment, and think about the advice you've been given and consider that those of us who do this professionally might actually have a lot more of a clue than you.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
sureyyan wrote: Keep your advises and assumptions to yourself
Not a problem, YOU sort it out, I did many years ago.
You see had you come back with something along the lines of "What do you suggest" there would have been no end of links to articles to help you learn a more robust way of dealing with data.
As to my assumptions they are based on the quality of the question which indicates a newbie with no depth of knowledge beyond the first brush with the MS wizards. The advice I gave you was valid, you need to get past the built in wizard stuff and gain a deeper understanding of the data.
Now you have proven yourself to be both a newbie and rude, note the votes and the amount of support you received.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
"Never underestimate the power of human stupidity"
"Never underestimate the power of arrogance without a class"
|
|
|
|
|
Hear hear!
The DataAdapter and DataGrid(View) were developed simply to demonstrate how easy data access with ADO.net can be.
They should never be used in a production application.
CommandBuilder, upon which DataAdapter relies, is very limited in its abilities; it can't generate commands to update multiple joined tables.
|
|
|
|
|
Well, this is really interesting.
can you please advice which control to use instead of DataGrid/View in production envoirnment?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Something designed specifically for the data in question.
|
|
|
|
|
well, If i wanna show collection of data to the user the same as tables, do I need use DataGird/View or there is some other control for that?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
Thank you for your kind reply,
I'have been doing application with so many years, I just wanted to understand why and how one should use commandbuilder under a given circumstances, as a new user of c#. I saw similar issues with joined tables and multiple table updates, which I offcourse did database operations on sql handle basis. My question was actually, to see different views if in complicated applications is there any use for such tools. I'have been using gupta for so many years, there things are much structural and robust.
Thanks for your info
|
|
|
|