|
Computafreak wrote: Are all the GroupBoxes identical?
In what sense? Their contents represent different things, for example, Name in Arabic, Name in English, National ID Number etc. If you mean functionality wise, what is happening right now is that each Group Box has its own button that then grabs the info from the right text box and grabs all the information from the DB that matches that criteria. Some stuff are not unique (nationality for example) and so will return a number of matches.
I like the idea, but I don't know if its applicable in my case.
Thanks though
If the post was helpful, please vote!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
DefaultButton may not be available, but AcceptButton still is, because that's what it is called in C# WinForms!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Nope. Its available on the form itself but not from any of the other controls (group boxes in particular), but I remember toying with it before I went to Lebanon and it didn't do what I wanted it to. Giving it another try..
Confirmed, the form is not capturing the Enter keypress. I'm guessing that the event is not bubbled up from the textbox.
If the post was helpful, please vote!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
The only reference to DefaultButton I could find on my local MSDN gave results in the System.Web.UI namespace.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Yeah, I'm jumping between paradigms! That does bad stuff to the stuff between my ears!
If the post was helpful, please vote!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
By exposing the Button, TextBox and Label, you could make changes to them - with a bit of designer hodge-podge, and a few PropertyGrid attributes you might be able to get that code into the Designer.cs files, where it would normally be. If the controls are exposed, you can hook the events as usual. It would probably be immensely boring to add the controls manually, but IMO it'd look better than one humongous switch statement. You could also try putting the name of the Button which should be clicked in the Tag property of the TextBox and having a common KeyPress handler for every TextBox which reads the Tag, searches for a Button with that name in the Parent's Controls collection, and clicks it
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Ugh! Massive Switch Statement
Computafreak wrote: By exposing the Button, TextBox and Label, you could make changes to them - with a bit of designer hodge-podge, and a few PropertyGrid attributes you might be able to get that code into the Designer.cs files, where it would normally be.
Wouldn't that require a new control for each group box? It might be worth it in the future, but for now I'll stick to the multiple button solution.
Thanks buddy!
If the post was helpful, please vote!
Current activities:
Book: Devils by Fyodor Dostoyevsky
Project: Hospital Automation, final stage
Learning: Image analysis, LINQ
Now and forever, defiant to the end.
What is Multiple Sclerosis[ ^]?
|
|
|
|
|
Mustafa Ismail Mustafa wrote: Wouldn't that require a new control for each group box?
Yes, but the way I see it, you'd be creating a new control for each new GroupBox anyway. Unless you mean a new derived control, in which case no - you'd simply need to change the properties as usual
Mustafa Ismail Mustafa wrote: Thanks buddy!
You're welcome
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
More of a philosphical question - why do you need multiple default buttons? The Accept button dismisses the dialog box, so how does it matter which button click causes it to go away?
|
|
|
|
|
hi can any one help me how to do xp sidebar in ms.net2005 using c#
|
|
|
|
|
Lots of them already coded for you
safe=[^]
|
|
|
|
|
i want source code for xp sidebar where can i get it in c#
|
|
|
|
|
gadeypavan wrote: xp sidebar
Vista Sidebar
gadeypavan wrote: want source code for xp sidebar where can i get it in c#
www.rentacoder.com
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Noone is going to just hand over the entire source code for such a large project.
It is not as easy as you think it is. You need intimiate knowledge of how Windows works, how the Shell works, plug-in support in your own application, writing and exposing an API that thes plugins would use to interface with your SideBar, ..., yada, yada, yada...
|
|
|
|
|
rentacoder is a good option.
Then again, like most people who request around here, you can keep on dreaming.
|
|
|
|
|
|
I’m trying to run the following command string from a GUI, everything works fine but I can minimize the command prompt or run it in hidden mode.
Any way to do this?
string stfamtv0001 = "/C" + ("\"\"C:\\Program Files\\ ThinTV\\PLINK.EXE\"" + " " + "appliance@%ThinConnectedFrom%" + " " + "-pw appliance" + " " + "\"killall -q vlc; export DISPLAY= .0; vlc --video-on-top --key-vol-up 100 rtsp://stfamtv0001/streama\"\"");
private void data(string streamPath)
{
System.Diagnostics.Process ps;
ps = new System.Diagnostics.Process();
ps.EnableRaisingEvents = false;
System.Diagnostics.Process.Start("CMD.exe", streamPath);
ps.Close();
}
private void btnFOX_Click(object sender, EventArgs e)
{
data(stfamtv0001);
}
|
|
|
|
|
You can run it in silent mode.
ProcessStartInfo i = new ProcessStartInfo();
i.CreateNoWindow = true;
i.UseShellExecute = false;
i.RedirectStandardError = true;
i.FileName = "file to execute";
i.Arguments = (@"arguments");
System.Diagnostics.Process proc = Process.Start(i);
|
|
|
|
|
Can seem to get this to work, do you mind filling on the "file to execute" and the "arguments" so i have an example.
|
|
|
|
|
If command to execute in shell is "FOP.exe -XML abc.xml - pdf abc.pdf"
Then file to execute is FOP.exe and arguments are -XML abc.xml - pdf abc.pdf
|
|
|
|
|
|
No my code still is not working?
ProcessStartInfo ps = new ProcessStartInfo();
ps.CreateNoWindow = true;
ps.UseShellExecute = false;
ps.RedirectStandardError = true;
ps.FileName = "cmd.exe";
ps.Arguments = (@"/C" + "\"\"C:\\Program Files\\ThinTV\\PLINK.EXE\"" + " " + "appliance@%ThinConnectedFrom%" + " " + "-pw appliance" + " " + "\"killall -q vlc; export DISPLAY= .0; vlc --halfscreen --key-vol-up 100 rtsp://stfamtv0001/streama\"\"");
System.Diagnostics.Process proc = Process.Start(ps);
Not sure why when its put into a click event nothing happens.
|
|
|
|
|
step through the code and make a dummy string hold your Ps.Arguments property and see if it is correct as you would type it into the command prompt.
|
|
|
|
|
You need not use cmd.exe as it the command shell which would automatically get invoked.
your executable file here is /C" + "\"\"C:\\Program Files\\ThinTV\\PLINK.EXE and your arguments is appliance@%ThinConnectedFrom%" + " " + "-pw appliance" + " " + "\"killall -q vlc; export DISPLAY=.0; vlc --halfscreen --key-vol-up 100 rtsp://stfamtv0001/streama\"\""
Please arrange it accordingly.
Let me know if you still need some help.
|
|
|
|
|
Ok I broke the code down and put it into a click event as follows
ProcessStartInfo ps = new ProcessStartInfo();
ps.CreateNoWindow = true;
ps.UseShellExecute = false;
ps.RedirectStandardError = true;
ps.FileName = "/C" + "\"\"C:\\Program Files\\RBS ThinTV\\PLINK.EXE\"";
ps.Arguments = (@"appliance@%ThinConnectedFrom%" + " " + "-pw appliance" + " " + "\"killall -q vlc; export DISPLAY= .0; vlc --video-on-top --key-vol-up 100 rtsp://stfamtv0002/streama\"\"");
System.Diagnostics.Process proc = Process.Start(ps);
Not sure but now its getting a Win32Excepetion was unhanded error.... on this line System.Diagnostics.Process proc = Process.Start(ps);
The command string is perfect.... its really weird.
|
|
|
|