|
In .NET 1.0, setting the TabPage visible property to false does not change things much. The easiest way to do so is (even if that's a bit lousy) to remove the tabPage item from the TabPages collection.
|
|
|
|
|
.S.Rod. wrote:
The easiest way to do so is (even if that's a bit lousy) to remove the tabPage item from the TabPages collection
If I do this will it destroy the page? I need to be able to add the page back after it's removed and the page isn't created dynamically it's been created in the designer. So if I hide the page this way will I be able to get it back during the life of the application or is it gone until a restart of the program?
Thanks again!
|
|
|
|
|
monrobot13 wrote:
If I do this will it destroy the page?
Not if you first save it off to member variable of the form, so that you can then just re-add the page to the collection.
m_Tp = tabControl1.TabPages[i];<br />
<br />
tabControl1.TabPages.Remove(m_Tp);<br />
<br />
<br />
tabControl.TabPages.Add(m_Tp);
You might have to see how to change the order of the tabs back to the way you had them though. I don't know off hand how to do it.
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
I think this will work nicely.
Thanks again all.
- monrobot13
|
|
|
|
|
Most of my tables has GUIDs as PrimaryKeys. So when I create new row in any table, i need to generate new guid and use it as ID. Is there simplier method?
thanks
h.
|
|
|
|
|
I have two controls on a form - checkBox1 and textBox1.
When user "checks" checkBox1, textBox1 becomes visible. Looks pretty simple )
1. without databinding:
textBox1.visible=checkBox1.checked
This works great.
2. let's play with some data in dataset:
I have bound "Checked" property of checkBox1 to a field in DataSet/DataTable. This field is also bounded to textBox1.visible property.
Result:
checkBox1 needs to lost focus to update data in dataTable, so user needs to "check" and next click into some other control.
What should i do to make it working properly (immediately)?
thanks
h.
btw: I have also tryed to force focus changes on the form (this.select(...)). The checkBox needed 2 mouse clicks to synchronize its state with dataset and since then, everything was fine )
|
|
|
|
|
This has popped up several times this week. It is rather annoying (not u, the problem )
You will need to do something like this depending on your databinding:
control.DataBindings[0].BindingManagerBase.EndCurrentEdit();
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
You're right two times in one answer:
1. This problem is REALLY annoying. )
2. This method works well - I have tested 3 different binding modes. There is just one small thing - it needs two more clicks on checkbox to "synchronize". Should I open the row for editing? I have tried to use BeginEdit() method on current row, but there was no difference. I think, that may be a point, but have no idea how to solve it.
Thanks for help
h.
|
|
|
|
|
how to do the following using .NET
I have the following XML document :
3.14159
If I were using COM MSXML parser, I could get
NodeTypedValue property to get "strongly-typed"
value.
b= XMLDocument.SelectSingleNode("//b");
variant value = b.NodeTypedValue;
//now the variant contains double value.
The question is:
how to achieve the same using C# ?
Value property of XMLNode object returns String
type, wchich i have to convert to get desired type...
How to do this without explicit conversion (by the means
of XMLConvert class or similar...)
Thanks
Michal Januszczyk
|
|
|
|
|
May be that's me but I believe that even with MSXML you are supposed to have a separate schema (with attributes of the form dt:type="int") to define node data types.
May be for usability reasons MS indeed allowed to put dt:type attributes along with Xml elements, but that of course didn't apply to define attribute data types since an attribute can hardly be data typed by another attribute.
It's not lost with the .NET Xml parser, just made different. The Xml schema has its own namespace and has the equivalent API you referred to, scattered in this namespace. For instance, System.Xml.Schema.XmlSchemaDatatype.ParseValue() .
PS : the .NET Xml parser is not a wrapper of the MSXML parser, which is a very good design decision. (at least something that stands for itself in this .NET run-time).
|
|
|
|
|
.S.Rod. wrote:
...(at least something that stands for itself in this .NET run-time).
Why Stephane, I haven't noticed your using that "smiley" before.
If I didn't know better, I'd say you are among those of us who have been wrestling with the insanity of the software industry for so long...
"Few are those who see with their own eyes and feel with their own hearts." - A. Einstein
|
|
|
|
|
A last funny pic before tonight's hunting,
|
|
|
|
|
I have to an applicatin that in part of it,it shows .zip files.In windows xp when I right click on zip files,I can choose EXTRACT ALL... option and unzip files.I want when I double click on zip files in my program it extract files,So I think I shoul use Procees.Start() and ProcessStartInfo .By default it only open .zip file with windows explorer so I have to set ProcessStartInfo.Verb property,but I don't know the action.I pass EXTRACT or EXTRACT ALL,and somethings like that but it always thrown exception.Does anybody know how can I find the these Verbs name or any idea about this problem?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
I am afraid you are facing a shell extension handler. Exposed functions are called by Windows Explorer on the basis of registered components (see HKCR\.zip and HKCR\Directory\ShellEx for entry points), and use COM plumbering, not the command line.
|
|
|
|
|
Thanks for reply.
.S.Rod. wrote:
COM plumbering, not the command line.
Could you please give me more details?What is COM plumbering?You mean using ShellExecute() function?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
An insight[^] on COM plumbering for this particular Winzip case.
|
|
|
|
|
Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Hi
I am running a small ActiveX Control (.NET UserControl exposed as ActiveX), connecting back to host server. This is an intranet application. And this ACtiveX Control refuses to connect back to host server, unless, I add it to 'Trusted Sites' Zone.
How to add the site automatically to Trusted Sites zone. I a have seen this with GotDotNet Workspace VSS-Like Control MSI Installation. Is'nt it?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
I hope this is not possible. If it is, that's a security flaw.
|
|
|
|
|
If you can access the registry, you can add an entry to:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
Rocky Moore <><
|
|
|
|
|
Hi Rocky,
That's cool. But I have the following doubt regarding that. It just says ZoneMap/Domains but how does IE understand what domain it belongs too. Since there are 4 Security Zones right. We want our domain to be put in 'Trusted Sites' Zone.
But I had two sites in my Trusted Sites zone and when I searched for these domains in Registry, they were found at:
My Computer\HKEY_USERS\S-1-5-21-478445148-176170993-1538882281-1205\Software\Microsoft\Windows\CurrentVersion\Internet Settings
I could find subkeys for my sites that I have added as 'Trusted Sites'. But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
Since IE maintains Security Zones on a per-user/per-profile basis, right? Please advise...
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
Thats the SID. Every user account has one. The currently logged on user should be mapped to current user in the registry.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
I could find subkeys for my sites that I have added as 'Trusted Sites'. But my doubt now is what is that
S-1-5-21-478445148-176170993-1538882281-1205 and how to dynamically intrepret this.
As Leppie mentioned that is the ID of the user, in the link I provided:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
It is based on the current user so the ID is not shown.
As you see from the folders you already have listed, they have a DWORD '*' which is (in my machine at least) value of 2. They ties to the folder name under:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones
As long as you have entries in the previous key path (in the Domains), and that value you add under it has the value pointing back to the Zones folder (probably the value of 2), IE will classify that site as trusted.
Rocky Moore <><
|
|
|
|
|
Hi,
I want to read the PRoxy Settings from Microsoft Internet Explorer Control Panel Internet Applet Settings and use it for my System.Net.WebClient.
How and where can I read the Proxy/Port in C# application?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
My suggestion is to decompile the implementation from the System.Net.ProxyRegBlob class (System.dll). (for any reason, this class was made hidden).
Other suggestions :
- import wininet.dll API functions (InternetQueryOption)
- hack the registry (HKCR \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Connections + HKLM \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Connections).
|
|
|
|