|
Hello,
Thanks for the reply. Which property i need to set.
Regards,
Sri
|
|
|
|
|
Same TopMost like below.
Dim f As New Form2
f.TopMost = True
f.Show()
Me.TopMost = True
|
|
|
|
|
i dont think so it will work in MDI i have same problem also
if i put one control box or any other container control on MDI form then the child form goes back
|
|
|
|
|
Hi All,
After loading form loosing focus. I tried by setting focus in "Deactivate" and "LostFocus" event of form but no luck. Form loosing focus after 5-10 sec(After loading).
Many Thanks,
Sri
|
|
|
|
|
Please provide some code for what exactly you are doing on load, Deactivate and LostFocus events.
|
|
|
|
|
Hi All,
I have a Win Form on which I use the KeyDown event to perform certain activities using Alt-Key combinations.
Unfortunately, this also triggers the menustrip 'capturing' the Alt key and highlighting the default menu item ('File') and essentially disabling any further typing until the Alt key is pressed again.
Is there any way to stop the file menu from capturing the Alt when this is used to trigger operations in the KeyDown event?
Thanks,
Sri
|
|
|
|
|
How are you checking if Alt key was pressed?
Instead of e.KeyCode == Keys.Alt , use e.Alt.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi,
Thanks for your reply.Unfortunately, i did not write single piece of code to check which key was pressed.
In form i have added button text like (&Help...etc).
my menustrip still captures the alt key(First time), and still disables any further typing until I press alt again.
I'm using key combinations of Alt-A, Alt-D etc to focus onto various fields on the form. Any of these will force the menustrip to capture the Alt key.
Regards,
Sri
|
|
|
|
|
Your key-combinations (where Alt and A are both pressed at the same time) work, even if a single keypress on the Alt prevents further input.
A keypress on Alt should give you the option to browse the menu. Windows doesn't capture the key, but the focus. The second keystroke then determines what menu to open. That's two seperate keystrokes.
Your key-combination is Alt-A, and the A is typed while the Alt-key is down. That gives different behaviour on Windows - it first checks if there's a shortcut-key defined (e.g., the letter right after the "&"-char in the caption of a button)
These two behaviors shouldn't bite each other. If your end-user is like me, he'll be using the Alt-key often enough to navigate the menu
I are Troll
|
|
|
|
|
Hi, i want to create a winform that contains a chess board surface/graphic.
I have a programm that generates a specific fieldindex. This index should be given to the chess board form and initiate the highlighting of the choosen field.
How can i handel this two problems.
first the drawing and highlighting of the chess board
and second the datatransfer from the programm to the winform(maybe by using delegates?)
thanks
|
|
|
|
|
benstar111 wrote: first the drawing and highlighting of the chess board
For this you will need to handle the Paint event of the form and then draw the chess board using the FillRectangle method of the Graphics object.
benstar111 wrote: the datatransfer from the programm to the winform(maybe by using delegates?)
That depends on the what exactly is the second program you need to send data to. If that is a managed dll, just add a reference to it and use the methods it exposes.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi all,
I want to know how windows installs the update while system is shutdown.
Using that knowledge i want to write an application which will able to delete the driver file ;which does not gets deleted in native mode.
|
|
|
|
|
|
Sir, i have tried using the above info but it is not possible to delete the file.
I just want to know how windows installs updates ???
|
|
|
|
|
The Windows API Code Pack for Microsoft .NET Framework provides a source code library that can be used to access some new Windows 7 features (and some existing features of older versions of Windows operating system) from managed code. These Windows features are not available to developers today in the .NET Framework.
You can get code pack from http://code.msdn.microsoft.com/WindowsAPICodePack[^]
For more information, see Windows API Code Pack for .NET Released[^]
|
|
|
|
|
Hi, guys, I'm writing simple tool for interest, like managing softwares, file association or IE history.
But when I get into this field, I find there are many information stored in files or registry. Like "index.dat" or "HKLM\SOFTWARE\Clients".
So I want to know, where I can get more information about such thing( registry about shell )?
Thanks in advance.
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
The Windows 7 Training Kit for Developers includes presentations, hands-on labs, and demos designed to help you learn how to build applications that are compatible with and shine on Windows 7. You'll learn about how you can build in Touch, MultiTouch, implement Taskbar, Ribbon, Sensor, and more.
Windows 7 Training Kit For Developers^]
|
|
|
|
|
I have 2 forms in a windows application - LogonForm and ProcessForm. The Logon Form is setup as the "Startup Object" for the project. Upon successful logon, I have the below code to transfer the control from LogonForm to ProcessForm and close the LogonForm (only).
//Instantiate ProcessForm and Show ProcessForm
MyProcessForm = new ProcessForm(InputData);
MyProcessForm.Show();
//Close the Logon Form
this.Close();
This code actually closes the entire application without showing the ProcessForm.
Now, if I change this.Close() to this.Hide(), the ProcessForm opens, but when I close the ProcessForm, I can see the application still running as the "LogonForm" is still in the hidden state.
When I close the ProcessForm, I have to close the entire application. Can you please help me with how to do it? Thanks in advance for your help
|
|
|
|
|
Hi,
Yes the first form is the main form, closing it ends the app.
If you are working in C#, have a look at Main() in program.cs; you'll see your first form is treated differently, it is passed to Application.Run
You could adapt program.cs to have two Application.Run statements, one with the logon form, the next with your real main form.
OTOH Application.Exit() should terminate your app no matter what.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn wrote: You could adapt program.cs to have two Application.Run statements, one with the logon form, the next with your real main form.
Hi Luc, thank you very much for your response. Will I be able to pass information on if the logon was successful or not (like a boolean flag or an object with all the logon credential entered in the logon screen) back to program.cs to determine if the main form should be displayed or not for the user?
Thanks again for your help!
|
|
|
|
|
crazylad wrote: Will I be able to pass information
I don't know. I would. But then I wouldn't need to, as I wouldn't want to show the real main form on an unsuccessful logon.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
When the main form closes, it will stop the message loop and your application will end. You need to change the main method and do something like,
int main()
{
if(loginValidated)
{
Application.Run(new ProcessForm());
}
}
|
|
|
|
|
N a v a n e e t h wrote: int main(){ // show the login form here. if(loginValidated) { // starts the application message loop Application.Run(new ProcessForm()); /* .... */ }}
Hi Navaneeth, thank you very much for your response. If I use Application.Run(new LogonForm()) and try returning a boolean parameter to indicate successful/unsuccessful logon, the project doesn't build successfully.
Would you know how I can return the logon status to main(). Thanks again for your help!
|
|
|
|
|
There are a dozen ways to pass data around, here is one using a user-supplied Form property.
LogonForm lf=new LogonForm();
Application.Run(lf);
bool success=lf.Success;
lf.Dispose();
if (success) ...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|