|
Hi,
here is what I would try:
1.
create a new program "B" that will "replace" your existing one ("A").
it is a WinForm app however it remains windowless most of the time (just showing a NotifyIcon probably),
it does three things:
2.
launch "A"
3.
periodically check the child windows of B for the specific dialog, based on some characteristic (easiest is window text); when the dialog appears, show a little, borderless window containing one button, and positioning all of that in the right location.
4.
exit when "A" exits.
None of this relies on explicit window messages; it does take some P/Invoke to enumerate ChildWindows, GetWindowText and GetWindowPosition.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Hi, Everbodys.
i am writing a code that is about calculating shortest paths in feed forward neural network
i have like the following code with neural structure
in code: nron=6 and lay=6;
class neuron
{
public int[] nextconnect = new int[nron];
public int[] preconnect = new int[nron];
public int number;
public int dents;//dentrit count
public int nextid,preid; // next and pre connections counts
~neuron() { }
}
class layer {
public neuron[] noron = new neuron[nron];
public layer()
{
for (int index = 0; index < noron.Length; index++)
{
noron[index] = new neuron();
}
}
~layer(){}
}
class net {
public double lr;//learning rate;
public int ban, hen;
public layer[] layers = new layer[lay];
public net()
{
for (int index = 0; index < layers.Length; index++)
{
layers[index] = new layer();
}
}
~net(){}
}
net network;
i have prepared using feed forward connection structure but i didn't development a algorithm that has strong code
can u help me as algorithm or code ?
regards.
|
|
|
|
|
I think I have figured out why some messages are not working on my ticket system application. It seems to be when a user does the shift+enter. Basically if the message they send is over 100 characters I trim it down to 100. When a user types a message in a textbox on the submit form page and use a shift+enter it causes it to fail.
How would I remove this? Because it appears as nothing like that is in the subject field, but thats not the case.
|
|
|
|
|
Handle keydown event. Check whether shift key is pressed while pressing enter and do accordingly.
|
|
|
|
|
Here is the weird thing.
The user submits a ticket via the web. It works fine there with the multiline textbox. Subject goes through and everything.
Here is on the web side of things:
string Sub;
if (txtProblem.Text.Length > 100) Sub = "** NEW ** " + txtProblem.Text.Substring(0, 100) + "...";
else Sub = "** NEW ** " + txtProblem.Text;
mm.Subject = Sub.Replace('\r', ' ').Replace('\n', ' ');
Ahh crap... I wasn't doing the replace on the windows form side of things. Because I passed the value from my listview to the update form (differnet forms) and place it in the textbox. I guess the textbox will take the character on a singleline textbox but the subject won't..
I put the replace on the windows side of things and it works good now!
Sorry to bother you
|
|
|
|
|
Jacob Dixon wrote: Sorry to bother you
No problem at all..
Cheers.
|
|
|
|
|
I'm trying to figure out if there's a way to set the enable and disable for the main form's ToolStripMenuItem. I'm processing UDP packets inside of a thread and when I receive a specific packet I want to allow a previously disabled item to become enabled. I am able to do this with buttons, but I don't know if I can with toolstrip items.
For example, to do what I want with a button from my thread I can use the following line:
this.bSendButton.Invoke(new MethodInvoker(delegate { this.bSendButton.Enabled = true; }));
There is no invoke function associated with the toolstrip item, so that previous way does not work. Is there another way I can do this? Am I trying to do this the completely wrong way? Any input would be helpful.
|
|
|
|
|
Hi,
I'm aware there are some GUI parts that aren't Controls, and hence don't have InvokeRequired and Invoke().
Although I did search a lot at some time, I haven't found any official stance.
I think it is OK to use a real Control instead of the non-Control part for calling InvokeRequired and Invoke(), provided those parts really got created by the same thread the Controls are. In the end, you probably could use the Form itself for all of them. After all, all the object is used for is determining the right thread for executing the delegate.
I haven't checked this yet, it is on my TODO list though.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I am wanting to (in real time) play a mp3 or wav file (can be played from an external source (windows media player plug-in) and interpret the data so that I can do various tasks if it detects certain pitches, frequencies etc...
I have seen many sound API like lame and audiere, these seem to just allow me to load in the songs and call play on them, this is not useful, because I actually need to see the stream data of the song
I have also looked into RIFF parsers, this seems to be more along the lines of what I want, but I guess I would like some more direction as to if there is a better API out there for what I am looking for
So to recap:
Language doesn't really matter I can do C, C++, C#, java, DirectX
I am using a windows machine, also can boot linux
I want to be able to look at the audio data of a file ( format doesn't matter can be .mp3, WAV, AIFF w/e I can convert the music files into whatever) and determine when a certain triggers (frequency, amp etc) take place in a song and have my application react accordingly
|
|
|
|
|
I would like to start a second form relative to the first form.
frmMain is the first form,
frmView2 is the second form being opened by frmMain:
frmView2 FView2 = new frmView2();
FView2.Show();
In frmView2 I have:
this.Location = windowpoint;
How do I properly pass a Point from frmMain to frmView2?
Thank you
|
|
|
|
|
You have to set the starting location ( there's a property, and I forget it, sorry ), before you show it. You can set it to center screen, center parent, or you can set it to manual, and then setting the position will work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have the starting position. The starting point is the point I'm trying to pass from the first form. How do I pass that point per my OP?
|
|
|
|
|
this.StartPosition = FormStartPosition.CenterScreen;
|
|
|
|
|
Hi,
1. you need to set Form.StartPosition to Manual
2. you could pass a Point through a second Form constructor, through a new property, and many other ways. However, you don't have to, you could also set the position in the main form, just before showing the new one.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I set the point with this.Location in the first form and set the adjusted point just before frmView2.Show
thanks!!
|
|
|
|
|
you're welcome.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Greatings, How I can change the color text in datagridview cells?
The Visual Studio 6.0 FlexGrid has an property ForeColor.
Thanks
|
|
|
|
|
Are you using the Microsoft Flexgrid 6.0 control with C#?
In Visual Basic 6 you'd first have to set the row and column, and then simply change the color. Something like this;
With MSFlexGrid1
.TextMatrix(0, 0) = "black"
.TextMatrix(0, 1) = "red"
.Row = 0
.Col = 1
.CellForeColor = vbRed
End With A DataGridView would give you more options to play with, though
I are Troll
|
|
|
|
|
Sorry I tried with MSFlexGrid 6.0, it is a great control, it would must exit too in Visual Studio 2003, 2005 and 2008. But I have 2 problems.
- The scrollbars not work with scroll mouse
- I have Windows Seven Ultimate and i can't install Visual Studio 6.0 is not compatible. An Visual Studio 2003, 2005 or 2008 project developer with MSFlexGrid 6.0 can find the dll file or OCX file in System 32, because the Operative System had or have Visual Studio 6.0. But I can't set to Visual Studio 2005 the path of the MSFlexGrid dll.
I don't Know if Visual Basic 2005 has MSFlexGrid, I only works with C#, but VB 2005 has an MSFlexGrid i can use on C#.
Thanks.
|
|
|
|
|
Edison1885 wrote: - The scrollbars not work with scroll mouse
Because the FlexGrid was written before mouses came with a scrollwheel. You'd have to add that yourself[^].
Edison1885 wrote: - I have Windows Seven Ultimate and i can't install Visual Studio 6.0 is not compatible.
That's a good thing, actually. Why not download Visual Basic.NET Express?
I are Troll
|
|
|
|
|
But what is the difference with Visual Basic 2005, I have Visual Studio 2005 full version, all languajes, the controls are common. And FlexGrid is only in the version 6.0.
The most important for me is use the Flexgrid 6.0 with Visual Studio 2005 on Windows 7, but not to install Visual Studio 6.0 or Visual Basic 6.0.
Thanks for the link, I go to see about the scroll.
modified on Tuesday, November 17, 2009 5:28 PM
|
|
|
|
|
The only solution is build Visual Studio 2005 projects with the Visual Studio 6.0 components like MSFlexGrid 6.0, is on Windows XP Mode Virtual Machine of Windows 7, but the problem is this applications not run on Windows 7.
I can use Datagridview of Visual Studio 2005, but this component is very slow when load information, wich is not from a Database.
Please, have somebody a solution?
Thanks.
|
|
|
|
|
Hi
My problem is that i have a column Position in my database. when i try to update this column by assinging different values at the same time using update command only one row is updated.my front end is C# and back end is MS SQL Server 2000 personal edition. plz let me know that how we can update multiple rows of a single column at the same time by assinging different values.
Thanks
Usman Ahmad
|
|
|
|
|
yes we can.
example:
UPDATE `tableName` SET ID2=CONCAT('aha',ID) WHERE language='C#'
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Thanks for your reply
But still my problem is not solve when i use ExecuteNonnquery() method in this style
int result = sqlcommand.ExecuteNonQuery()
MessageBox.Show(result.ToString());
actually message box returns the message that all rows are updated but when i check Position column only one row of column Position is updated and other rows are show old values.
I want to update multiple rows of a single column Position with different positions of students
kindly sent immediate reply i am trying to solve this problem from last 10 days but no progress.
Thanks Usman Ahmad
|
|
|
|