|
|
I am having trouble autoscaling dynamically created classes derived from UserControl in 120 DPI.
Here are the involved classes:
ClassA : UserControl
ClassB : UserControl
Dockable pane (from third-party)
In the dockable pane is object A (ClassA). ClassA.AutoScaleMode = Inherit and controls in object A are autoscaling correctly in 120 DPI. The AutoScaleFactor from the dockable pane is apparently being used to autoscale object A (which is good).
Part of ClassA's code:
ClassB B = new ClassB();
this.Controls.Add(B);
B.Dock = Dock.Fill;
B.BringToFront();
Problem: ClassB.AutoScaleMode = Inherit, but the controls in B are not autoscaling.
Any ideas?
CuePhoenix
|
|
|
|
|
Note: One way is to set ClassB.AutoScaleMode = Font. However, ClassB in my example represents the root node of a whole heirarchy of classes that use visual inheritance, so I'd have to change AutoScaleMode on each leaf class in the tree. I want to avoid that work if possible.
CuePhoenix
|
|
|
|
|
there is a function in matlab clled svd this function is writrten like that [u,s,v]=svd(a,0)
this function is used to calculate the eigenfaces and eigenvectors
plz if any one can write it in any programing language give me this code
this link illustrate wat does this function mean
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/svd.html
haitham
|
|
|
|
|
If you look on the link you provided under the "Algorithm" section, it says that the function uses a set of LAPACK functions to compute the svd. I would suggest finding a LAPACK library for your desired language. Alternatively, the Numerical Recipies series of books should also have a description and source code for the algorithm.
|
|
|
|
|
I have an application in which there is a datagrid. Within that grid is a field called PartType. I know how to make it a drop-down box that shows what is saved in the database. I know how to make the drop-down box populate with all the different PartTypes the user can choose from. What I want to do is populate the drop-down box with the PartType choices, but to have it highlight what is already in the database. How do I program this in c# for the code behind page?
|
|
|
|
|
You can use the controls collectoin od the cell, and get the dd box.
Once you have the index, you can cast the object to a dd box and use that object to set the selectedindex value.
I'm on a Fuzzy State: Between 0 an 1
|
|
|
|
|
|
Mark, thank you for the article. However, I'm doing things a bit differently and am still confused.
I don't do the EditItemTemplates. With the use of this application, there is the assumption that once it's populated it's editable.
Here is the asp code to populate the column:
<asp:TemplateColumn HeaderText="Part Type"><br />
<ItemTemplate><br />
<asp:DropDownList ID="PartType" Runat="server" DataSource = '<%# getDescriptions2 ((string)DataBinder.Eval(Container.DataItem, "PartNumber"))%>' DataTextField = "Description"><br />
</asp:DropDownList><br />
</ItemTemplate><br />
</asp:TemplateColumn>
And this is the getDescriptions2
public object getDescriptions2 (string _PartNumber)<br />
{<br />
string SQLString = "SELECT pt.Id, pt.Description, p.ID FROM PartTypes pt INNER JOIN Parts p on pt.ID = p.PartTypeID WHERE p.PartNumber = _PartNumber ORDER by Description";<br />
SqlCommand cmd = new SqlCommand();<br />
cmd.Connection = new SqlConnection(strConnectSQL);<br />
cmd.CommandText = SQLString;<br />
SqlDataAdapter adapter = new SqlDataAdapter(cmd);<br />
DataSet ds = new DataSet();<br />
adapter.Fill(ds);<br />
return ds;<br />
<br />
}
How do I within this function set the index?
-- modified at 12:17 Thursday 29th June, 2006
|
|
|
|
|
hi, i want to list first 30 records of my table in the first page, second 30 records in the second page and so on.. how can i do it by using datagridview? plz help..
|
|
|
|
|
|
but datagridview hasn't got a page size property
|
|
|
|
|
PageSize: Gets or sets the number of records to display on a page in a GridView control.
|
|
|
|
|
Mark Nischalke wrote: PageSize: Gets or sets the number of records to display on a page in a GridView control.
Is it really the property of DataGridView? If so, then where and how can we find and use it!!!!!!!!!!!
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Hey guys, i have an app that will allow users to draw a flowchart and assign messages to certain nodes on the chart, kinda like a create your own story, mad libs type thing. I have to allow the user to upload audio files from their pc, but if they use the same file over and over again, i just want to upload it once. granted i could look at the filename and path, but what if they have 2 versions of the same file, in different directories, or 2 different files named the same. or some other case i havnt thought of yet..is there a way that i can prevent uploading duplicate files without using filename/path info, or my current bad idea of reading the contents of a file(not sure if it'll work with audio) and loading into an array if the contents dont match anything in the array yet, i had planned to upload the file if the info was added to an array. i think that this is a very bad/slow idea. so any help would be appreciated.
Thanks
|
|
|
|
|
Storing and comparing the whole contents is (depending on the file sizes and number of files) probably problematic. You could instead create and store a hash value (something like shown here[^]) for each uploaded file and use it to identify matching files.
|
|
|
|
|
thanks this should work perfectly.
|
|
|
|
|
I have to access the .net web service methods using java as a client. I am using SOAP API to do this. I do not have any problems when the return type from web service is a simple string, int or arrays.
But my .net web service is returning an object of a particular Class that java does not know about. How can I make java understand the return type and access the object being returned from web service?
Thanks in advance.
|
|
|
|
|
Hello i am trying to use TLS session on normal port (110 for pop and 143 for imap).It got stuck while giving command "STARTTLS" for IMAP OR "STLS" for POP.
i run under telnet session:
C: Client
S: Server
C:Tetlnet server 143
C: a001 CAPABILITY
S: * CAPABILITY IMAP4rev1 STARTTLS
S: a001 OK CAPABILITY completed
C: a002 STARTTLS
S: a002 OK Begin TLS negotiation now
it got stuck here
actuall it should display following respose:
"TLS negotiation, further commands are under TLS layer"
Same for POP commands
Ant help on this would be great help.
Is it something to do with server configuration or imap server limitations.?
I creating c# code based on this.
regards,
Uhs
urvishshelat@yahoo.co.in
Uhs
urvishshelat@yahoo.co.in
-- modified at 10:06 Wednesday 28th June, 2006
|
|
|
|
|
Hi champs!
I'm wondering what I'm doing wrong here. I've created an XmlDocument, added a couple of Nodes to it and called Save(). A while after that, I want to delete the file again, but I get an Exception telling me that the file specified cannot be deleted because it is beeing used by another thread.
XmlDocument xml = new XmlDocument();
xml.Save(@"C:\temp\fun.xml");
System.IO.File.Delete(@"C:\temp\fun.xml");
Can anyone help? Thanks a ton in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Are you sure you are using that overload of Save , or are you really using one that takes a Stream which you have not Dispose d of?
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi J4amieC,
thanks for your reply. I'm using exactly this overload. Should I use a Stream instead? Or is there an easier way?
Thanks again!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
You could try this:
using System.IO;<br />
<br />
XmlDocument xml = new XmlDocument();<br />
<br />
using(FileStream fileStream = File.OpenWrite(@"C:\temp\fun.xml"));<br />
{<br />
xml.Save(fileStream);<br />
fileStream.Close();<br />
}<br />
File.Delete(@"C:\temp\fun.xml");
Im not sure that will remidy the situation - that would depend whether it was actually the call to Save(string) that is locking the file or something else.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I am doing somewhat similar. I was just opening the XML document and appending the elements to it and saving it. I just tried the delete part after saving and it works for me. Below is the code:
XmlDocument oXmlDocument = new XmlDocument();
oXmlDocument.Load( "C:\\TestXML.xml" ); // load xml file
// adding elements and attributes to XML file
// save the changes to the file
oXmlDocument.Save(m_relativePath+"\\TestXML.xml");
// I do not need this but just tried this part
File.Delete("C:\\TestXML.xml");
It works fine.
Hope it helps you in some way.
|
|
|
|
|
This should work!!
XmlDocument xmldoc = new XmlDocument();<br />
xmldoc.Load(@".\ConfigurationXML.xml");<br />
...do some operation<br />
xmldoc.Save(@".\ConfigurationXML.xml");<br />
<br />
xmldoc = null;<br />
<br />
File.Delete(".\\ConfigurationXML.xml");
|
|
|
|