|
Thanks Luc. There is no question you are correct.
I was aware of the 8b vs 4b difference. I guess what i don't understand is how 64-bit machines can run 32-bit DLLs. Why is it that the 32-bit DLL is not expecting 32-bit pointers?
Sorry for delay in getting back here.
|
|
|
|
|
I have developed a component(CCW) using C#. It contains one static method with sleep statement (e.g. Thread.Sleep (10000);).
Instance of this component is created in ASP page.
If I open one browser and access asp page, it sleep for 10 seconds,
but Whenever I open more browsers (from different machines) and access asp page, some instances sleep for more than 10 seconds.
Can you suggest me what probable cause of this behavior?
|
|
|
|
|
Thread.Sleep instructs the thread to Wait for "about" x number of milliseconds. The thread-priority will dictate the actual wait. If timing is important use a smaller wait and a loop check for time. I'm not really going to go into using Threads and Waiting in ASP.NET (which IMHO shouldn't be done).
|
|
|
|
|
I've got a fairly complex form (~1200 lines in the designer file). Some of the time when I open the form VS spends several seconds spasticly redrawing a few ever larger sections of the form before blanking the tab and redrawing the entire form from scratch.
Since the solution began in VS2k3, I'm wondering if the controls listed in the order that would make the designer happy. Does anyone know of an ordering that the designer would be expecting that I could manually fix the code into?
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
|
|
|
|
|
When a form gets to be a burden to design I add the
[System.ComponentModel.DesignerCategory("code")]
attribute which usually helps (must be fully qualified)
Also, try closing all open files.
|
|
|
|
|
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
|
|
|
|