Ok, solution found:
The Ok was being passed down and I dont know why. But if after the .ShowDialog() I just have to put this.DialogResu lt = DialogResult.No ne, and it will fix it. This shouldnt happen in the first place, but this fixes it, so I am not too bothered.
User Profile
Collapse
-
No dialog result on the second form.
I have this button click handler on the Main Form:
Code:private void TSB_AddBrain_Click(object sender, EventArgs e) { if ((new BrainForm()).ShowDialog(this) == DialogResult.OK) { //Add it to the main list } }
Leave a comment:
-
C# ShowDialog inside of ShowDialog closing both on return
I have a main form, then this form spawns another form (Form A) as a form.showdialog (). That dialog box then has a button that spawns another form (Form B) through the form.showdialog (). All of this works fine.
Now when I press a button on Form B, and set the "this.DialogRes ult = DialogResult.Ca ncel", then close, it goes back to FormA, and Form B closes. Then Form A closes and returns to the main form. This is not what I... -
NVergunst replied to C# button with *.png image over another button with *.png image not showing correctlyin .NETWell in normal use, there wont be a fully transparent image. I was just using one to try out what was going wrong.
So you believe this is the way C# is coded? No other workaround? Perhaps draw everything to some grpahic layer make that the background, and then draw transparent button overlays?...Leave a comment:
-
NVergunst started a topic C# button with *.png image over another button with *.png image not showing correctlyin .NETC# button with *.png image over another button with *.png image not showing correctly
Hello all.
I have what I hope is an easy problem, but I am not sure.
What I have is a bunch of buttons with their images (not background images, but images) set to *.png files with transparency. If I have a button over the form's background, it displays perfectly. I get the transparency and everything to show.
The problem comes when 2 buttons overlap. The part of the *.png that should be transparent to... -
No I havent. Actually I had never thought of doing this. My experience with databases is limited to MySQL, so if you have a link to an example I would appreciate it.
Some quick questions you might be able to answer about databases:
1) WIll they update fast enough? I need about 18-50mS update times probably around 30-50 variables of bool/double...
2) Will it be useable with code programmed in other languages...Leave a comment:
-
if it can be done in visual studio, I am all ears. That would be the new class library for a project correct?
Does visual studio automatically allow applications to share the same data?Leave a comment:
-
Anybody? I just need a couple keywords to search google for or just a small code snippet example please.Leave a comment:
-
Well I think your best bet would be the API world. You have to import external functions from a dll. For example to close a Windows application programmaticall y, you should import the functions
Code:[DllImport("user32.dll")] public static extern int FindWindow( string lpClassName, // class name string lpWindowName // window name ); [DllImport("user32.dll")]
Leave a comment:
-
I just dont know what it is called that I am searching for. I can make C# applications no problem by themselves. The problem is now others want to interface with this program through the use of gettings values through a dll.
I have never written a dll, but I just wrote 1 that is basically useless for this application, but just to learn how they were put together. My understanding is that there needs to be shared memory for 1 dll to...Leave a comment:
-
-
Creating shared memory between applications in C#. *.dll perhaps?
hello. First off, I am very new to dll coding (meaning tonight) and I need to be able to share a List<bool> and a List<double> between my main application and other applications that can interface indirectly with it.
Basically The mian program will initalize the dll and pass in all the values. Then every about 50ms or so, new values will be given to the dll. I made a basic dll that I can send values to a global list in... -
Yes I have seen that, but honestly makes no sense whatsoever to me.
Is that the bit makeup of the 32bit integer?
so if I want to send it once, then bits 0-15 are <00000000000000 1>
and for the letter A it is for bits 16 through 23 <01000001>
and then not extended key so bit 24 is <0>
and 25-31 are all zero because some are reserved and the others must be down for a WM_KEYDOWN message....Leave a comment:
-
I thought that I had tried that, but ti didn't work...
WM_KEYDOWN = 0x0100
or so I believe.
Then for instance to send the 'A' key, it would be: 0x0041 isnt it?
So then SendMessage(win dow, 0x0100, 0x0041, 0) should do it right? Well I cant seem to get it to work with Notepad for example.
Could you post a full example please?...Leave a comment:
-
I honestly didnt even see the .NET area. sorry. I figured C# fits into C++/C better than basic or java. sorry again....Leave a comment:
-
Doe nobody know how to send keystrokes through the windows API?Leave a comment:
-
-
C# API Sendmessage or PostMessage to replace SendKeys - Help Needed
Hello everyone.
I have what I believe to be a simple question, yet I can not find anything that is helpful to me.
Basically I have an application, that I want to use to control external applications. My program will run either embedded within another program or minimized to the system tray. So SendKeys is out because it only works if the controlled application has focus, which it will not.
So my conclusion...
No activity results to display
Show More
Leave a comment: