|
thanks for the reply... as it turns out, that's exactly what I ended up doing
|
|
|
|
|
hello
i starting learning a c# and i am in my first step.
i find an exemple who talk about spliting a windows and i tryed to exucute but i acount a problem the sample don't work and i have many error .
i want to know the step to do to creat a project for this sample.
<br />
using System;<br />
using System.Drawing;<br />
using System.Windows.Forms;<br />
<br />
<br />
<br />
public class UnPanelUnSplitter : Form<br />
{<br />
private Splitter splitter1;<br />
private Panel panel1;<br />
<br />
<br />
public UnPanelUnSplitter()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
<br />
private void InitializeComponent()<br />
{<br />
this.splitter1 = new Splitter();<br />
this.panel1 = new Panel();<br />
this.SuspendLayout();<br />
this.splitter1.Dock = System.Windows.Forms.DockStyle.Left;<br />
this.panel1.BackColor = System.Drawing.Color.Yellow;<br />
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;<br />
this.panel1.Resize += new EventHandler(PanelOnResize);<br />
this.panel1.Paint += new PaintEventHandler(PanelOnPaint);<br />
this.BackColor = System.Drawing.Color.Red;<br />
this.ClientSize = new System.Drawing.Size(319, 322);<br />
this.Controls.AddRange(new System.Windows.Forms.Control[] {<br />
this.splitter1,<br />
this.panel1});<br />
this.Text = "Un panel avec un splitter";<br />
this.ResumeLayout(false);<br />
this.Resize += new EventHandler(PanelOnResize);<br />
this.Paint += new PaintEventHandler(PanelOnPaint);<br />
<br />
}<br />
<br />
<br />
<br />
static void Main() <br />
{<br />
Application.Run(new UnPanelUnSplitter());<br />
}<br />
<br />
<br />
<br />
<br />
void PanelOnResize(object o, EventArgs e)<br />
{<br />
Control control = (Control)o;<br />
control.Invalidate(); <br />
}<br />
<br />
<br />
void PanelOnPaint(object o, PaintEventArgs args)<br />
{<br />
Control panel = (Control)o;<br />
Graphics grfx = args.Graphics;<br />
grfx.DrawLine(Pens.Black, 0, 0, panel.Width-1, panel.Height-1);<br />
grfx.DrawLine(Pens.Black, panel.Width-1, 0, 0, panel.Height-1);<br />
grfx.DrawEllipse(Pens.Black, 0, 0, panel.Width-1, panel.Height-1);<br />
}<br />
}<br />
|
|
|
|
|
hi !
i tried this little sample and it worked fine. (apart from the fakt that it doesn't look very pretty)
A)
start your editor
paste the code
save it as "split.cs"
compile at "VisualStudio .Net 2003 COMMAND PROMPT" with "csc split.cs"
run it: split.exe
-- or --
B)
make a new c# project. -> windows application
replace the code of Form1.cs with your code. run it.
if you have still errors, please post them.
|
|
|
|
|
>hello
>sorry,but it don't work and i guess that is from because i am newbies.
>when i select Form1.cs it appear a ressource but i don't see when i can put my code,and when i click on the form it send me to a code and when i put the code it don't work.
>please,can u explain me with detail how to add the code and when i find Form1.cs .
>thank u,and sorry for any distruption
--
there must be a "form1.cs" in your solution explorer (right sided). just right-click and select "view code"
now you see the whole code of this form (actually the whole code of the entire project/solution)
delete that code completely.
and paste your code instead.
now "form1.cs" is just your code.
thats it.
start the whole thing. it should work.
good luck.
andi
|
|
|
|
|
Hi
I´m trying to install Roman Kiss-WSE-DIME-project at
http://www.codeproject.com/cs/webservices/remotingdime.asp
But I keep on getting the error
"Remoting configuration failed with the exception System.IO.FileLoadException: The located assembly's manifest definition with name 'WSDimeChannel' does not match the assembly reference."
when I testdrive the WindowsClient.
I have done everything that the instruction says. Including draging the 3 dll to the %windows%/assembly - folder.
Running the WebService and trying the echo-method works fine. I may have some errors in the machine.config-file. Can this be of importance (several names with the same ID") Is there something I have forgot when I install the project?
What can be wrong?
Regards
Daniel
|
|
|
|
|
is it possible to wrap text in a cell of a datagrid?
if so .. is it possible to make the row height change depending on how much text is in that cell?
|
|
|
|
|
put a textbox inside.
the rowheight property changes all the rows
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I'm finishing up development of a network file backup
application consisting of a C# Windows form app and a
windows service.
Both the form app and the windows service exist in
seperate solutions, and each one is built with its own
installer. Works fine.
I'd like to be able to deploy both components together in
a single installer, but I'm not sure about the best way
to go about it...
I was thinking about adding an installer project for the
service to the form project, or possibly combining the two
solutions somehow, but I'm really just shooting in the dark
at this point... I'm probably making this a lot harder than
it really is..
Would appreciate any suggestions or resources for
packaging both solutions into one installer...
thanks,
vince
..
.
|
|
|
|
|
Hi,
Can anyone tell me if a [VB.NET to C#] source code converter utility available on the internet.
clr.
|
|
|
|
|
|
How would I implement a checkbox in a datagrid column that when checked or unchecked changes the value for that column in that row???
|
|
|
|
|
|
QUESTION 1: Does anyone know how to work with this class? I need some code snippet on how to work with ClientSponsor.
QUESTION 2:
I also tried this on server side (console app hosting the remote object):
using System.Runtime.Remoting.LifetimeServices;
LifetimeServices.LeaseTime = TimeSpan.FromMinutes(3);
LifetimeServices.RenewOnCallTime = TimeSpan.FromMinutes(3);
But an RemotingException was thrown on server side, complaining that "LeaseTime can only be set once within an app domain".
QUESTION 3: extracted from MSDN:
context: <lifetime> element in config file.
Quote: "Contains information about the lifetime of all client-activated objects serviced by this application."
I thought "lifetime" applies to:
a. server-activated Singleton
b. client-activated
But according to MSDN, it seems that it only applies to "client activated" remote objects.
QUESTION 4: Can I modify config files at runtime? Do I need to restart server for modifications on config files to take effect?
Thanks!
|
|
|
|
|
Hi, I have a listBox. I am trying to bind it to a dataSet that has multiple tables and data relations. Below is the code I am trying to use. The problem is invName is in a table called products and invID is in a table called inventory. I have no idea how to get this to work, as I have never done this before. The two tables are joined together by a key called invProductID (thats the master key in products)
eoListBox1.DataSource = generalDataSet;
eoListBox1.DisplayMember = "invName";
eoListBox1.ValueMember = "invID";
|
|
|
|
|
Are you looking for the SQL code to get the data, or trying to get the list box to work? I notice you are missing the DataBind() call...
toticow wrote:
eoListBox1.DataSource = generalDataSet;
eoListBox1.DisplayMember = "invName";
eoListBox1.ValueMember = "invID";
eoListBox1.DataBind();
|
|
|
|
|
hi !
i have a datatable and a datagrid bound to that table.
now i want to have a new datagrid which should display the same data as the old_datagrid, BUT: only two columns not all of them.
(
in addition to that, when i select a row of the new_datagrid the row-specific-data of the remaining three columns should be displayed in three labels.
)
i thought the dataview could help, but it looks like, it only filters out rows, not columns.
any ideas ?!
THANKS A LOT !!!!!!
|
|
|
|
|
|
Thanks for that great link !!!!
andi
|
|
|
|
|
Hi im trying to use this line of code to create an xml file but it just overwrites it every time or appends to the wrong part. I have tried changing the bool to true and false also tried changing write to writeline nothing works please help.
using (StreamWriter sw = new StreamWriter("TestFile.xml"))
{
sw.Write("<DispatcherQ>" + "<Dispatcher> " + DispID.Text + "</Dispatcher>" + "<CustomerInfo> " + listBox2.SelectedItem.ToString() + "</CustomerInfo>" + "<TaxiInfo> " +listBox3.SelectedItem.ToString()+ "</TaxiInfo>" + "</DispatcherQ>" );
}
Thanks alot,
Da Intern
|
|
|
|
|
Works file for me. A file called TestFile.xml is created just fine every time. The content is just one line, but apart from that, fine.
What are you expecting to happen? For example, I'm not sure what you mean by "changing the bool to true or false". And changing the Write() to WriteLine() merely puts a newline on the end of the written text.
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
okay i want it to create a new set of elements like this: when i click this button it creates the xml file and the first element then when i click it again it adds the new elements to that xml file.
First Click of Button
<taxiq>
<taxi>
<userid>asfSFAas
<date>fdsafasdfdsa
Second Click
<taxiq>
<taxi>
<userid>code
<date>project
<taxi>
<userid>Da
<date>Intern
I'm completely lost!!
Da Intern
|
|
|
|
|
If you download this project, http://codeproject.com/csharp/CSPersonalOrganizer1.asp you'll see how I'm creating, reading, and writing data to an xml file. When my application opens, it will check to see if your xml file exists, if it does it will open the xml file, if it doesn't it will create one for you.
This should help you with your questions above.
|
|
|
|
|
In pseudocode:
if XML file exists
open the existing XML file in append mode
else
create XML file
add new XML elements
close XML file
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
Actually, even this simplistic model is broken, if you think about it.
An XML document has a root element. If you append more elements to an XML file you should appeand them within the root element; in other words, before the final . So if you had:
<root>
<element>
some data
</element>
</root>
and wanted to add another element, you'd have to end up with this:
<root>
<element>
some data
</element>
<element>
and yet more data
</element>
</root>
Interesting. Without parsing the entire XML document, this could be pretty complex. Possibly the best idea is to read the entire file as XML and then write it out again completely with the extra element(s).
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
Hi, I am not fully sure how to do the following, please help if you can. I have two tables (As far as I know I have not set a join between them). I need to view values from both tables (they have a common id, invProductID). The rule is, If a number I specify is in the first table, then show the values I want. However, I have not been able to get this to work. I am using a dataset and/or dataTables.
I know I can do this by updating the dataAdapter, but the problem is I cant do that until a later stage. If you need any more information, please let me know. Thanks in advance.
|
|
|
|