|
hy,
I have to Programm a Wizard. Now i get some problems. I have a MAIN Form and about 21-22 ChildForms. the Main Forms containsa Treeview on the left side, which must be shown everytime, thats why i put it in the ParentForm. All my ChildForms contains "Back" and "Forward" buttons. How can I make the best Practice?? I need to go forward and backward in the wizard. Without loosing the Data stored in every Child Form. How can I call the Form2 from the Form1?? And how can I go backward, without a new Instance of Form2, even i will lost the Data in the textboxes and comboboxes. A I need a powerfull Pattern for that enable me to set to Visible=True and Visible=False, while clicking on the buttons.
I try to add all the Child Forms in MdiChildren Array, but than i cannot realize how to managed them.
BUT I NEED TO COMUNICATE FROM EVERY FORM TO ANOTHER. HOWCAN I DO THAT??
Who can help me??
Giuseppe
|
|
|
|
|
Pass an instance of the previous form to the next form. If you hit "back" on the wizard, you'll have the data of the previous form already in memory, use that. For instance
void OnForm1NextButton()
{
Form2 f2 = new Form2("Yahweh", "Yirah");
f2.Show();
this.Dispose();
}
Now Form2 will know that the user name and password filled out on Form1 is Yahweh and Yirah, respectively. If you hit the back button, create a new instance of Form1 and set the user name password combo to those values.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuals for Christ, Yeah!
Judah Himango
|
|
|
|
|
Hi all:
How do I programatically maximize a windows form to cover both the display monitors?
Such that, whenever the MAXIMIZE button is clicked the form will cover the entire dual screen desktop? Pls help me.
Kind Regards.
BTW, I am coding in C# VS.net.
|
|
|
|
|
You can not do that unless you first check that both displays are of the same size, and that they are positioned exactly beside or above one another. In any other case the visible desktop will not be square, so you can not make a window cover the entire desktop without part of the window being outside the desktop.
---
b { font-weight: normal; }
|
|
|
|
|
Dear All
I have a project that grade a multiple questions exams.
Two files are the input of the system:
1-File which contains a line for each student that contains its information (such as test version and center number and ID ...etc) and answers.
2-File which contains the Key answers for each version and has the same settings of the first file.
The user of the system then will configure the settings of the file(I mean will configure the start and end of each field such as the ID field will start at index 1 to index 9).
After configuring the settings the system should load the answers and information into the database and then grade the exam.
My question is What is the best database desighn for doing that?
Is it a good practice to create an attripute for each answer(might be 210 answers) or put them all in one attripute?
And what is the best algorithm for the grading process?
please, help me...
|
|
|
|
|
Primary table is student table.
This has an index into a StudentTests table (1:* relationship)
The tests table contains an index to Test table which contains the students' test answers.
The information in StudentTests also points to a Teacher table and eventually to the Teachers' Answer for that test. (assuming that each teacher or center would have different answers to their tests)
Then for a specific test, iterate through the Test table for the specific test in the specific center for the specific teacher (returning a *:1) and just iterate through the answers. The Test table would hold an indicator for each correct/wrong answer and score. The grading algorithm would be dependant upon the rules:
is this a bell curve? is this a straight step curve?
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
Hi all,
Let me introduce you to the problem which I'm trying to cope with. I'm having two windows forms in 2 threads - one is a splash screen and the other one is the main window. On starting, the splash is visible and the main is hidden. I've written everything to the point where I've to implement signalling the splash that main is ready and closing the splash. What I've tried yesterday is to implement this with timers, so splash has a 100ms timer which checks a property on the mainwindow class and if it's true, then the splash closes itself. But then, how would I synchronise the closing of the splash with setting the main form visibility to true so they happen syncroniously(one after the other). What I've been thinking about is using events, but I'm not sure how to do this in cross-threads windows forms, ie how to design it. Should I have event for the main which is emitted when it's ready and the splash listens for this event? And then it closes itself and emits another signal that's has closed and the main listens for the closing signal of the splash? If so, how would I attach to listening to the signals across the threads? In my Main() function, I create both threads and I've two properties of the EntryPoint class(which contains the main and nothing else) - the splash form and the main form. And I have two methods which are used for the entry point of the the both, which are basically doing:
<br />
Application.Run(this.splashform);<br />
Any advice is greatly appreciated. Thanks for reading.
|
|
|
|
|
Why use 2 threads? You're introducing complexity unnecessarily.
In the constructor for your main window, I assume you have the InitializeComponent() call that actually initializes your main window. Change that constructor to
public MainWindow()
{
SplashWindow splash = new SplashWindow();
splash.Show();
InitializeComponent();
}
And when your MainWindow finishes loading (override the OnLoad method or create an OnLoad event handler), you can set the visibility of both forms synchronously.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Wouldn't the splash be blocked by the main form and not receive events? Because that's what I think will happen and most solutions for a splash use threads. Or I could be wrong...
|
|
|
|
|
1nsp1r3d wrote:
Wouldn't the splash be blocked by the main form and not receive events?
No, the splash will be free to receive events. Using multiple threads to touch different UI components is a widely-known no-no anyways. If you update your splash screen, you may need to call .Update() to force a redraw, however, since the OS is busy loading your main form.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuals for Christ, Yeah!
Judah Himango
|
|
|
|
|
|
It has a collection of items, it may even be called Items. The collection has an Add method.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am trying to create a NT Service that will be able to monitor users logging on and off.
Or an NT service that can monitor an application like Internet explorer opening, running, and closing.
Basically I have an application that I want to run which will pause azureus from downloading. Basically to free up network resources for the user logging in.
I can create a NT service fine but don't know what methods or events to use in the service that will fire off when a user logs in or off in XP
and ideas?
|
|
|
|
|
The service geting notified of session logon and logoff events isn't hard. It's the other spec you have...
"Basically to free up network resources for the user loggin in." - WHAT? If a user is loggin onto XP, then there can't be anyone else downloading something. There's no network resources to free up.
You, also, can't stop someone from downloading something, while a user logs on, unless your service is also going to act as a proxy for network access.
Why would you even want to do this in the first place? Logon isn't exactly a network intensive operation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Its not the logon I want to free up the network for...
I want to free up the network while the user is logged in to the machine.
Basically I will be running azurues on a machine that my family uses. They have all different logins to the machine. Mum, Dad, Sister, etc.
When I have azureus running under my account they can't browse the web becuase I am chewing up all the network. User fast switching allows my account to continue downloading through azureus ... while someone else logs in to browse the web and check their emails etc
I don't want to give them access to my account to pause/stop azurues.
I can build a small app that can talk azurues by using azurus xml over HTTP plugin. This is not a problem. But I don't want to have to have them manually stop/start azurues with this app as they may forget to restart it.
I wanted to make the whole process automated. So I was going to write a NT service that will pause azurues when a user logs in and resume download when they log off.
But I am not sure where to start looking to get the logon and logoff event.
As you say its not hard to do. But I am not sure where to look. It would be good if I could get the user id that is logging on and off So that I can select which accounts will pause azureus and which will allow it to continue running (ie my logon account).
|
|
|
|
|
Hi,
Recently I have several .NET solutions and I want to manage them by CVS (Concurrent Versions System). I am using WinCVS and I have a few questions:
1.Is there any special linkage of the CVS to the Visual Studio .NET?
2.Is the above way recommanded?
3.How can I know about the version of the .NET solution in the Visual Studio?
Thanks
|
|
|
|
|
1. no
2. I think CVS is crap, but your milage may vary
3. It's tied to the IDE VS2002 = 1.0, VS2003 = 1.1, VS2005 = 2.0
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What events can I monitor to implement in my service so that I can write to a log what time the user logged in and logged off and which user it was.
|
|
|
|
|
You can start out with the documentation here: WTSRegisterSessionNotification[^]. You want to pass NOTIFY_FOR_ALL_SESSIONS . I'm not sure how this works out with a service... you probably have to have the correct permissions set up.
[EDIT]Oops... there is a managed alternative. I've been coding in C++ for too long.
Alex Korchemniy
|
|
|
|
|
Thanks.
I found something else I think I might be able to use
Microsoft.Win32.SessionEndedEventArgs
and
Microsoft.Win32.SessionSwitchEventArgs
private void sessionSwitch(System.Object sender, _
Microsoft.Win32.SessionSwitchEventArgs e)
{
if (e.Reason == SessionSwitchReason.SessionLogon)
EventLog.WriteEntry("sessionSwitch", _
SystemInformation.UserName.ToString() + " logged on at " + _
DateTime.Now.TimeOfDay.ToString());
else if (e.Reason == SessionSwitchReason.SessionLogoff)
EventLog.WriteEntry("sessionSwitch", _
SystemInformation.UserName.ToString() + " logged off at " + _
DateTime.Now.TimeOfDay.ToString());
}
|
|
|
|
|
Doesn't seem to work.
I was not looking for terminal service.
Trying to create an NT service that can do stuff when a user logs on.. then do something else when the user logs off
|
|
|
|
|
Hello Every body...
I wanna send email by my application(SMTP Mail).Everything is ok when I send email to a yahoo email address.But when I try to send mails to another mail servers like Gmail I recieve the following Errors :
1 - When using localhost as SMTP mail server :
550 5.7.1 : Unable to relay for username@gmail.com
2- or (When using mx1.yahoo.com as smtp server) :
550 : Relaying Denied for <username@gmail.com>
How can I solve this problem.
Note : I use FreeSMTP.NET Component to sending Emails(http://www.quiksoftcorp.com/)
Best Regards,
|
|
|
|
|
Your mail server doesn't allow sending email to other servers. While yahoo's mail server will never allow relaying, you can configure your local mail server to allow relaying (Right click on My Computer->Manage, Services and Applications, Internet Information Services, right click on Default SMTP Virtual Server, go to the Access tab and click the Relay button).
Hope this helps.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Dear S. Senthil Kumar
Hi
Thank you very much for your clear answer.My problem solved.But I traped in another problem .Emails sent successfully from my application but they remained (Hanged) in the SMTP sending queue ! (C:\Inetpub\mailroot\Queue).
They are not in C:\Inetpub\mailroot\Badmail folder.But they didn't Sent !
How can I do with this problem.
Thanx for your Guid,
|
|
|
|
|
Hi,
I have a problem releted to Scribble(.pwi Format). I want to display this .pwi Format data which is stored in SQL Server Database Feild on Desktop Application. Is there any programming in VB, C# by which we can convert .pwi data in bitmap. Or is there any other solution to achinve it.
Brijesh Jaiswal
|
|
|
|