|
You can manage via clientside JavaScript right?
|
|
|
|
|
hi
i have a treeview control in one form which has some nodes and i need to display them as a list in some other form's combobox control and these two forms belonging to the same project i created an instance of form1 in form2 but its not showing the controls associated with form1 with my instance object.
please suggest how to get the data of form1 into form2
thanks in advance.
|
|
|
|
|
Is it a Web Application or Windows Application?
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
Declare control on form1 as public,these will be available on another form via object of form1
Atul kumar
|
|
|
|
|
Yes, when I write my article, I will cover this approach. It's very nasty, you should never do this. At a minimum, expose properties that get ( for example ) the text of a textbox, but not the textbox itself. This isn't VB, we're supposed to know about OO.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
This is asked so often, I keep meaning to write an article on it.
kalaveer wrote: i created an instance of form1 in form2
That won't help, it's a different instance to the one that has the data you need
You can pass the right instance of form1 to form2 as a parameter, or, better yet, use delegates to pass data between forms.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
yes he is right. u would be able to access information of ur control as creating an object
would create new instance of form1 i just told that declaring a control as public would make that control accessible in another form..But to pass value u need to use delegate to communicate between them.
cheers.
|
|
|
|
|
hmm.. It's a interesting case .
hz_luyg@hotmail.com ;)
luyuguo
|
|
|
|
|
Hi,
I am developing an application of windows mobile 5.0 using visual studio 2005 C#.Net.Testing with a emulator windows mobile 5.0 pocket pc Emulator..
I have one doubt, How to identify device Manufacturer(Manufacturer of client's device) and device Model(Model of client's device)using C# code?
Appreciate if you can help..
Thanks
|
|
|
|
|
I have some link labels on a tabpage which are supposed to link to some PDF files when clicked. How do I load and open the PDF files?
Thanks!
|
|
|
|
|
Your browser should just open them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
But how do I write the code? It's a linkclicked event.
|
|
|
|
|
I was thinking of a web app. Process.Start will start the PDF viewer for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
It works. But what if I want the document to be displayed in my window application (rather than opening an external application)?
|
|
|
|
|
The obvious solution is a webbrowsercontrol, as that already knows how to show PDFs, and can be added to a form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
I'm thinking how to do a text wrap calculation for a string by myself. I need to calculate how many lines will a string wrapped to (within a fixed area region). The fixed region is a location and an area for filling the string. I also have to know which part of the string is wrapped to the corresponding line. Could some of you give me some ideas?
e.g.
string txt1 = "AbcdefgHigklmnopqrstuvWxyz. Dear, Hello Hello My Friend...";
if the fill region is limited to the size of "100x400",
what is the good way to calculate how many lines will the txt1 wrapped to?
as we can imagine, txt1 maybe wrapped into 3 lines.
1st line: AbcdefgHigklmnopqrs
2nd line: tuvWxyz. Dear, Hello
3rd line: Hello My Friend...
I'm thinking to use graphics.MeasureString to calculate the width of each character. is it a good way..
I would be appreciated if you can give me some example?
Thanks so much for your help?
|
|
|
|
|
MeasureString can be used on the whole string, keep cutting until it fits. Make a string of what's left and start again.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Could anyone show me some examples?
I feeling difficult how to initial the Graphics, so that it measure the String in correct unit,
|
|
|
|
|
Hey folks,
I have to write some C# code to call passport-authenticated web services to verify if some user has the privilege to do that.
This is the first time that I work with passport authentication.
Could anybody please shed some light where I should start or if possible, some sample code that I should follow?
Any help is appreciated.
Thanks,
Johny
|
|
|
|
|
I need to have a DataGridView column that has cells that are exactly like the DataGridViewTextBoxCell cells, except:
1. There is a list of characters (such as '*' and '&') that will be invalid. If the user types them, the cell should ignore the keystroke.
2. There can be a maximum of 8 characters in the text field at one time.
3. All lower case characters will automatically be displayed as upper case characters.
I was hoping I could do this all by just overwriting some method, but it looks like I have to make my own custom control that extends TextBox (as well as my own custom cell type to handle the custom control and then a custom column type to handle the custom cell). And that will require me to implement so many methods and properties.
Am I missing an easy way that someone else knows about?
|
|
|
|
|
I did something similar, instead of wrting a new column type, just create a custom textbox, make it a control in your grid and whenever the user clicks the cell you place this box in place of the clicked cell. When the user leaves the textbox, make it invisible again and copy the valueto the cell. Works great and not too much code to write
|
|
|
|
|
Hi, I have an MS Access table and I wish to get information into a DataSet or DataTable using a SQL query. This is my code:
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"DataSource=C:\Program Files\Wiki\WikiProject.mdb";
string commandString = "SELECT All_Data.* FROM All_Data WHERE ((All_Data.City)=New_York)";
OleDbConnection con = new OleDbConnection(connectionString);
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(commandString, con);
DataSet ds = new DataSet();
dataAdapter.Fill(ds, "All_Data");
The error I get is "Could not find installable ISAM". How can I solve this error? or - Is there another way to get a specific line from a MS Access table?
Thanks,
Yoni
|
|
|
|
|
|
hi
i want to begin Client/Server Database Programming with c#2005 and sql 2000 or 2005,but i don't found any sorce code or article that show me how to use sql transactions in database.
does anybody know how to do this or take me link,Source or Guidance ?
thanks.
|
|
|
|
|