|
Did you edit the Designer generated code?
does it still contain the useful calls to SuspendLayout and ResumeLayout for all complex Controls (including your Form itself) and surrounding the operations on those Controls?
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 form was originally created in VS2k3 which didn't support partial classes. At that time I occasionally 'edited' it after the designer (seemingly) randomly moved stuff around to avoid crapping my diffs up with junk. Otherwise the only thing i did was to add xml comments and #warning TODO blah blah notes to a few objects.
There are suspend/resume layout calls for the form and the two group boxes that contain most of the controls within InitializeComponent() . The SuspendLayout calls come right after all the foo = new foo() calls, The ResumeLayout and PerformLayout calls are near the end of the method. On both ends they're interspersed within ((System.ComponentModel.ISupportInitialize)(this.foo)).BeginInit(); and corresponding EndInit calls. I've also noticed that only one of the two groupboxes has a PerformLayout call. Since I've never intentionally meddled with this stuff I'm not sure if that's correct or not.
The form also has a ReSise event handler, but AFAIK the designer ignores that.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Sounds all right.
Here is my suggestion: start a new form just for watching, add a few Controls that interest you, and look at the Designer.cs file.
Now, probably using some editor outside Visual Studio, split your original file in the same manner, making sure all the special method calls (Suspend/Resume/PerformLayout, Begin/EndInit) are as the Designer does it.
Back in VS add the new file to the solution, rebuild and hopefully enjoy. (if so, don't touch it ever again).
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.
|
|
|
|
|
Hi all
I have combo box with following properties:
DropDownStyle : DropDown
AutoCompleteMode : SuggestAppend
AutoCompleteSource : ListItems
Key Press event :
private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
MessageBox.Show("Test");
}
}
When the Focus is at Combobox i pressed Enter Key but it is not entering into key press event.
How to capture the Enter Key?
Thanks in advance,pls help in this?
|
|
|
|
|
I would try the KeyDown event.
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.
|
|
|
|
|
No sure if this has got anything to do with it but try overriding IsInputKey and/or IsInputChar to return true (at lease for Enter key). This is neccessary if you want to capture keys like Tab, Arrows etc., don't know about Enter.
Also, the Keys enumeration has entries for both Enter and Return , you can try if the are any different - one may work, the other not, who knows
|
|
|
|
|
I have a regular C# GUI-application which calls a console application using
<br />
ProcessStartInfo psi = new ProcessStartInfo();<br />
psi.FileName = "myConsoleApp.exe";<br />
psi.Arguments = "myArgument"; <br />
psi.WindowStyle = ProcessWindowStyle.Hidden;<br />
Process myProcess = Process.Start(psi);<br />
myProcess.WaitForExit();<br />
MessageBox.Show("myConsoleApp finished. Return code: " + myProcess.ExitCode);<br />
I would like to pass more information (for example, a string) than the exit code from the console application to the GUI. How do I do that? Can I somehow use a pipe so that everything written in the console application using Console.Writeline() goes to the GUI?
|
|
|
|
|
There may be better methods, but how about the console app writes or serializes the required data to a file? The GUI app can then read/deserialize the data.
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.”
|
|
|
|
|
Hi,
your app could read the stdout stream your console app is writing to. Have a look at several properties and members in the Process class.
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.
|
|
|
|
|
Thanks for your help! It works great if I use the following:
<br />
ProcessStartInfo psi = new ProcessStartInfo();<br />
psi.FileName = "myConsoleApp.exe";<br />
psi.Arguments = "myArgument"; <br />
psi.WindowStyle = ProcessWindowStyle.Hidden;<br />
psi.UseShellExecute = false;<br />
psi.RedirectStandardOutput = true;<br />
Process myProcess = Process.Start(psi);<br />
StreamReader sr = myProcess.StandardOutput;<br />
MessageBox.Show("myConsoleApp wrote the following: " + sr.ReadLine());<br />
myProcess.WaitForExit();<br />
MessageBox.Show("myConsoleApp finished. Return code: " + myProcess.ExitCode);<br />
|
|
|
|
|
you're welcome.
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.
|
|
|
|
|
Hey Guys, I have a DataGridView which is populated, It's field are from multiple tables like below:
MaterialTable
BookName
MaterialTypeID (FK for MatrialID)
MaterialTypeTable
MatrialID
MaterialType
and I populate my DataGridView in the following form:
Selecte T1.BookName, T2.MaterialType FROM MaterialTable AS T1 INNER JOIN MaterialTypeTable AS T2
ON T1.MaterialTypeID = T2.MatrialID
Now I want to Update the Grid and as you see my DataGridView has a combo box ( actually the reall one as more than 5, and this is just a sample)
I want to know what's the best method of doing this update ?!
Thanx in Advance
Mr.K
|
|
|
|
|
Hi,
Are you trying to add a new column with a combo box? If it is them add the combobox in the ItemTemplate of the gridview control. Write down the code in the RowDataBound event of the grdiview control to bind the drop-down list with the data from the select query that you have written.
Either you love IT or leave IT...
|
|
|
|
|
|
I am pretty sure you can't do that the way you are hoping. One solution, thou messy, could be to create another form with No Border and have that hover over your other form to give the illusion of another button on the title bar.
But like I said its a bit messy and would surely be easier to create your own title bar.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
In a simple and straight forward way, it is not possible. You can do it explicitly.
Either you love IT or leave IT...
|
|
|
|
|
Bonjour,
Comment je peux parcourir un dossier dans une application sur PDA,
sachant que je n'ai pas pu utiliser "FolderBrowserDialog" the
component from the Dialogs tab of the Toolbox.
Merci
|
|
|
|
|
As much as I like France, this is an ENGLISH (yeah Ros Biff) centric site, you will get a much better response if you can use english.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you don't want to use the Folder or File dialogs, then you will have to 'roll your own' from the classes in the System.IO namespace.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thanks,
But how can I roll my own, from the classes in the System.IO namespace.
I'm still a beginner
|
|
|
|
|
Have a look in the Object Browser or on MSDN at the classes in there, some will obviously be very useful.
Experiment with them on a simpler task first so you get used to their methods and properties and post if you get stuck - along with the code you've tried.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
hi,
how i can get all current files openned by each running process using c#?
|
|
|
|
|
Good Day
I have a Web Application that has a setup project, now Everytime I build this Project I get the Following Error
Error 2 Could not find file 'C:\Work Development\!Class\PRODUCTION_CODE\ControlDesk\ControlDesk\o!TimeTableSetup\Release\o!Web.msi' 'The system cannot find the file specified.' C:\Work Development\!Class\PRODUCTION_CODE\ControlDesk\ControlDesk\o!TimeTableSetup\o!TimeTableSetup.vdproj o!WebSetup
Please Help
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hello, please I wanted to know how I change the titles on-DATAGRIDVIEW?
Thank you very much.
|
|
|
|
|