|
I didnt say Print Preview, but Print Dialog, it's where you can chooose the printer
Wizard_01
|
|
|
|
|
Whoops my bad
What functionality exactly do you want?
Ed
|
|
|
|
|
Would it be difficult to convert an existing C# windows program to be a web application?
Basically the program, as it now exists, requires the user to fill in a form which is submitted and that produces an output screen. Most of the logic within this program exists in stored procedures, rather than in the program itself.
This to me means that all that needs to alter is the "screen I/O".
Am I over simplifying ?
Regards,
Alf Stockton
-- modified at 9:51 Wednesday 19th April, 2006
|
|
|
|
|
Simple answer: You will have to recreate the whole GUI. If you separated the business logic from the UI than you can use it easily in your new 'frontend', because .Net web applications can use the same libraries (with some limitations like the GUI components of winforms) as normal apps.
|
|
|
|
|
I want in my textBox enter characters in the following way:
private void textBox2_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)<br />
{<br />
int i = this.textBox2.SelectionStart;<br />
<br />
if(i<this.textBox2.TextLength)<br />
{ <br />
this.textBox2.Text = this.textBox2.Text.Remove(i,1);<br />
this.textBox2.SelectionStart = i;<br />
}<br />
}<br />
which is mean that every single character which is entered should replace existing character unless the cursor is on the end of the text.
This sample code doesn`t work I want.
Speaking gennerally I want in my text Box to replace all characters with new entered unless the cursor is on the end of the text.
Can anyone help me?
-- modified at 9:54 Wednesday 19th April, 2006
|
|
|
|
|
Try replacing your KeyDown code with:
private void textBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
int i = this.textBox1.SelectionStart;
if (i < this.textBox1.TextLength)
{
this.textBox1.SelectAll();
}
}
When I did this, I had a value in the textbox, keyed a value, and it replaced everything in the text box. When I keyed values at the end, it just added it on. I think that's what you wanted.
|
|
|
|
|
I know what you mean, but it isn`t the action I want. I don`t want replace all characters in my textBox but I want replace only that character which is curently selected by the posision of the cursor. For example text:
12345
when the cursor is (for ex.) between 3 and 4 by enter new character a want replace character 4 by new one.
This should work like insert key in Microsoft Word.
Anyone know the answer?
|
|
|
|
|
use the Key_Press event instead of the Key_down event...that should work with the same code..
|
|
|
|
|
we have this command for DataGrid
dataGrid1.SetDataBinding(MyDataSet, "MyTable");
Do we have the same command for DGV ? Or something equivalant that does the sam thing ?
Mr.K
|
|
|
|
|
|
Hey guys I use C# to creat Win Forms, I was talking to a friend of mine, he believes that in terms of Graphic, Delphi is much more powerful that C# !!!
I'd like to make my Form more attractive, do you have any sujjestions ???
thanx
Mr.K
|
|
|
|
|
Never worked with Delphi so I can't comment on your friends opinion. However it just takes a creative mind and good graphics to create whatever you want to create. This includes unbounded windows that take on unique shapes. When I was finished with one of my applications, many of the users thought it was a web application instead of a Windows Form application.
You can also change the appearance of various controls by making your own inherited controls.
Finally you can get a control set like Infragistics and use their controls.
|
|
|
|
|
Do you Know anywhere I can download some sasmples ???
Mr.K
|
|
|
|
|
I believe a search on MSDN would find a tutorial for non-standard forms.
And for better, artsier controls just google Infragistics.
|
|
|
|
|
|
I'll try and put it as clear as possible. I think it's quit complicated.
I have 2 dataset from which I want to make 1 filtered dataset.
...
I have a dataset that was generated from an external system with all users and data in them. this dataset is a return value and cannot be changed from the source.
The second dataset contains a series of data that came from a table we made ourselves, to keep extar data. The second dataset is just limited in number, because it only contains users with certain criteria.
My question now is how do I make a result dataset from the full (1st) dataset with just the users from the limited (2nd) dataset so I only get the users for that particular criteria. So I need the data from the 1st dataset, but filtered. both datasets have a common ID field (GUID)
can anyone help me?
|
|
|
|
|
This answer will require that you do some further research on MSDN regarding disconnected datasets.
Assuming your have some knowledge of SQL you need to join the two databases as a single disconnected dataset. This assumes, of course, that you can join them. Your isolation on your second dataset would be WHERE ... users meet criteria ...
|
|
|
|
|
how can i popup a menu on some given coordinate? Thanks.
|
|
|
|
|
popup.Location = new Point(x,y);
|
|
|
|
|
Hello,
We are building a windows desktop application using C#
that reads in an xml file, to create a user interface.
The user then enters values into the user interface.
We want to be able to save an xml file with the same
schema as the original xml file, but with the users
entered values into it.
Here is a simple example as part of input document:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue></choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
We would want the output document to contain:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue>yes</choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
or perhaps
<label>
<name>Needs Cleaning</name>
<type>text</type>
<value>
<single>yes</single>
</value>
</label>
We aren't too adept at xmlTextReaders and xmlTextWriters yet,
and have been doing some research in Google.
There was an interesting article that seemed pertinent to this, but
it dealt with C++ :
http://www.codeproject.com/csharp/dcinsertxml.asp
Any help would be appreciated.
Thank you!
Anne
|
|
|
|
|
The use of XmlTextReader and XmlTextWriter is more for loading and persisting the data. You would load the data into an XmlDocument and then modify it there. You should also be aware of the fact that your Xml is not well-formed. You cannot have value containing two instances of choicelist and choicevalue. You need to do something like
<ListValues>
<Values>
<choiceList />
<choiceValue />
</Values>
<Values>
<choiceList />
<choiceValue />
</Values>
</ListValues>
IMHO -- Navigating the DOM is a PITA. I prefer to avoid it whenever possible....especially if your application is creating/destroying xml objects quite alot. (You see the Xml engine in 2002, 2003 VS leaks memory)
A really simple approach ( I like KIS ) is to create an object that represents your data and use XmlSerializer to populate/persist the data. Then your access of the data is normal object technology and you are saved from actual node/child navigation. The sample below is only from shear memory (my VS machine is dead) so the exactness is not guarenteed.
[Serializable()]
public class lable
{
public string name{get; set;}
public string type{get; set;}
public Value value{get; set;}
}
[Serializable()]
public class ValueList:List<Values>
{
}
[Serializable()]
public class Values
{
public string choiceList{ get; set; }
public string choiceValue{ get; set; }
}
public class XmlAccessor
{
public lable GetData(string path);
{
using (FileStream stream = new FileStream(path, FileMode.Open))
{
XmlSerializer ser = new XmlSerializer(typeof(lable));
lable Lable = (lable)ser.Deserialize(stream);
}
return Lable;
}
public void PutData( string path, lable item )
{
using (FileStream stream = new FileStream(path, FileMode.Create))
{
XmlSerializer ser = new XmlSerializer(typeof(lable));
ser.Serialize(stream, item);
}
}
My only recommendation....if possible I'd change the casing on the lables so that they are Pacal cased.
|
|
|
|
|
Maybe these piece of code will help you:
1) if you want create xml file with C# you can use example:
XmlDocument myXml = new XmlDocument();<br />
string xml_text = "<?xml version=\"1.0\" standalone=\"yes\"?>"+<br />
"<!DOCTYPE label ["+<br />
"<!ELEMENT name (#PCDATA)>"+<br />
"<!ELEMENT type (#PCDATA)>"+<br />
"<!ELEMENT value (choicelist+,choicevalue+)>"+<br />
"<!ELEMENT choicelist (#PCDATA)>"+<br />
"<!ELEMENT choicevalue (#PCDATA)>"+<br />
"<label></label>";<br />
<br />
myXml.LoadXml(xml_text);
2) if you want open xml document use exmaple:
XmlDocument myXml = new XmlDocument();<br />
XmlTextReader reader = new XmlTextReader(file_name);<br />
myXml.Load(reader);<br />
reader.Close();
3) if you want save you xml document you can use example:
XmlTextWriter writer = new XmlTextWriter("output.xml",null);<br />
writer.Formatting = Formatting.Indented;<br />
dokumentXml.Save(writer);<br />
writer.Close();
Best way to learn this is MSDN like http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vborixmlschemadesignerwalkthroughs.asp
|
|
|
|
|
I want to write an application that will enable me to chat between the PC and mobile phone. I want to write the PC app in C# and the mobile app will have to be written in J2ME. I can setup a normal bluetooth link between the phone and PC in windows, so I don't think I'll have to do device discovery in C#.
I'm pretty new to bluetooth development so any help / ideas will be appreciated.
|
|
|
|
|
It took no more than 30 seconds to google Bluetooth SDK[^] and get an answer. Since the technology is proprietary you are reliant upon having an external resource make it a C#-accessible resource.
|
|
|
|
|
Hi all,
i have a URL and i want to get the html from that location.
then i want to be able to get the BODY part and look for something there.. if posible (using some parsers) i want to get the links there and other stuff too.
but how do i connect from HTMLdocument and downloading the url?
Thanks alot,
Ran.Z.
R.Z
|
|
|
|