|
If you only have TreeView s on the tabs, you could use this code:
TreeView tv = ( TreeView ) tabControl1.SelectedTab.Controls[ 0 ];
TreeNode activeNode = tv.SelectedNode; Or, to get really terse:
TreeNode activeNode = ( ( TreeView ) tabControl1.SelectedTab.Controls[ 0 ] ).SelectedNode;
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
In reference to my previous post, you can use that code with TabPage s that have more than just the TreeView s on them. You just need to ensure that the TreeView is the FIRST control added to the TabPage .
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thank you. That works great.
Sean
|
|
|
|
|
Happy to hear it. Keep on codin'!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I have a binary data file saved as serialized object , when it is deserialized to datatable then binded to a datagrid , the user will make som changes to a record then save these changes back to the file , how can I save back the changed record ,do I have to serialize the all items each time when a one record updated , what is the right method to do so ,,, any help ;
thanx ........
|
|
|
|
|
|
leppie wrote: Yes, you have to 'overwrite' the old serialized object
Thank you, so what is the best way other than serializaion to deal with binary data files that been saved as blocks or records .
|
|
|
|
|
Hi, everyone, I'm new in this forum, I'm a question about if is posible when is run a program(update.exe) recall the program(update.exe), I'm desing a Update program but How can i close my update.exe when hava a new update of my exe and continue the process?
For your help thanks.
|
|
|
|
|
Search CodeProject or the web for "single instance application". There's some decent articles on CP regarding this, for example, here[^].
"Every technology has its detractors. I'm sure that somebody once stated that the pointy stick would never replace the fingernail as the fighting man's weapon of choice." Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hi, I have a form that launches an external shockwave flash program and need to check, first, if the flash player is installed on the PC. Any ideas?
Thanks ahead!
radnix@hotmail.com
|
|
|
|
|
You check for the existence and validity of the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ShockwaveFlash.ShockwaveFlash key and its subkeys.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thank you, I'll try it!
...of all the things I've lost, I miss my mind the most.
|
|
|
|
|
radnix, 't was my pleasure. Happy coding!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
i want to get the value of cell of selected row of listview control into TextBox.i hv got this by using the code as below.
for (int i=0;i < lstCorpname.SelectedItems.Count;i++)
{
txtAddressNo.Text=lstCorpname.SelectedItems[i].SubItems[0].Text.ToString();
txtname.Text=lstCorpname.SelectedItems[i].SubItems[1].Text.ToString();
}
but i think this is not the right way.
can u please give me another code.
Thank's
Regard's
Vikrant Singh
-- modified at 17:11 Wednesday 7th December, 2005
|
|
|
|
|
Hi
In a manual from a beamer i found following command data to switch the beamer to Power On.
02H 00H 00H 00H 00H 02H
What does this line means? Are this Bios Interupts?
I try to get this Data to the Beamer using System.Io.Ports.
But i don't know how. As a string? As a Byte?
System.IO.Ports.SerialPort sPort = new SerialPort("COM1", 38400, Parity.None, 8, StopBits.One);
sPort.Open();
sPort.Write( --> What? string? byte[]? char[]? <--)
sPort.Close();
Best Regards
|
|
|
|
|
How I can see what user open session in a computers of a domain (without Active Directory)?
Thank
Sory for my english.
|
|
|
|
|
Maybe you can use the class WindowsPrincipal of the namesspace System.Security.Principal.
Where are you from? What is your native lenguage?
|
|
|
|
|
I'm from Argentina
Il try with WindowsPrincipal, THANKZ!!
|
|
|
|
|
hi.
how can I use a button that I created in a graphical program (such as photoshop) as a traditional button in my form?
Best wishes
|
|
|
|
|
Just save the picture as an image file, then in your form, set the .Image property of a System.Windows.Forms.Button to your image.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hi,
I have a Web Based C# program that is calling a legacy .DLL file made up of approximately 250 routines to perform credit card authorizations. I'm receiving a System.NullReferenceException somewhere within in the .DLL.
Once the Web C# program calls the initial .DLL module, I lose control of the debugger until it returns. The exception handler in the Web C# program is sighting the initial module as the one that had the NullReferenceException, however I know this is not true.
How can I obtain the real routine that is having a problem? What would be even better is an approximate line number within the routine. I have the source code to the DLL and can add something in there. I just don't want to add printf routines all over it saying, I'm here, I'm leaving.
Thank you,
Glenn
|
|
|
|
|
When you run your app, just attach the Visual Studio debugger to the native process via Tools->Attach to Process...
Also, since you have the source, why not just create a Visual Studio solution with your legacy source as one project in the solution, and your Web C# program as another project in your source? I imagine Visual Studio can take care of the details from there.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Hi Judah,
I tried to do what you suggested, Tools->Attach to Process... Selected Internet Explorer, clicked Attach and then clicked the check box for Native. Pressed F11 to step into the call and it didn't stop at the error in the DLL.
I thought of creating another Visual Studio project for the DLL, however when I tried to compile it, it took me several hours to remove the error messages from just one of the 250 routines. The .DLL is built with Watcom's 10.6 compiler and is a standard windows DLL.
The C# routine for the web has a try and catch block. Maybe I can add one of those to the C DLL entry point and print out the information. I'll have to go digging in the garage for the Watcom Manauls.
Your thoughts?
Glenn
|
|
|
|
|
i attached a program that view image and make some processing on this image but when the mouse get from the boundaries of the picturebox the code failed although when the mouse moves toward right or left or up dut to picture the coe still work , it faill only when the mouse move toward the bottom of the picture
plz i need a solution to this problem
thanks in advance
haitham
|
|
|
|
|
There is no way for us to help you unless you give us some code. Did you try debugging the application using a debugger such as Visual Studio? This will tell you were the exception is occurring and why its occurring.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|