|
I would like to know how can i pass a table to Hibernate automatically in Net 1.1. That is a neeed a software to generate DTO y DAO.
|
|
|
|
|
Hello,
I am looking for a solution to synchronize multiple Exchange-Calendars
with my SQL-Database.
Is there anyone who can tell my a way to solve this problem?
I am using Visual Studio 2005 .NET and MS Office 2003. I tried several
ways but I didn´t get a solution.
Thanks John
|
|
|
|
|
What have you got so far?
|
|
|
|
|
I have a
class myButton:Button
{
myButton(object obj)
{
//...
}
protected void override OnPaint(PaintEventArgs ev)
{
// code
}
}
What i want:
I have a form with a simple button.
When i enter the event_click this button i create a myButton control object that i want to be drawn somewhere on the form.
The reason why i need a custom control is that i want the myButton obj to contain the object that i send to the constructor.
How do i draw this button to the form, what do i call and so forth?
The properties i want to set for this myButton is that it is flat for now..
To this myButton i want to register the double_click event.
Have searched the internet but i am a bit confused, i thought i understood but nothing draws.
Please som help!
|
|
|
|
|
babbelfisken wrote: protected void override OnPaint(PaintEventArgs ev)
{
// code
}
}
You'll be wanting to look at ev.Graphics - the Graphics object. This will allow you to manually draw the button. For example:
ev.Graphics.DrawRectangle(Pens.Black, this.ClientRectangle);
But it gets more complex - double buffering, multiple states (enabled, disabled etc..).
Is that a good starting point?
Eitsop
|
|
|
|
|
Hello friends,
I have to create an application through which client can take backup of other machines on server machine(in LAN).
So primarily I want to create server application which can copy simple text file from client machines(in LAN) and save them on server machine.
I am new in .net and not getting how I should start?........I hope some experts can help me out.
Please help me to solve this situation it's urgent.....
Thanks,
Nagraj.
|
|
|
|
|
The simplest method would probably be to do something like:
File.Copy("\\\\pc1\\c$\\textfile1.txt", "\\\\server1\\backup$\\pc1textfile.txt">
Where pc1 is source pc and server1 is the server name.
You might need to enumerate a few folders or files to determine if they exist. Good starting points are:
File.Exists , Directory.GetFiles and Directory.GetSubFolders .
Any help?
Eitsop
|
|
|
|
|
Thanks,
As you suggest I find the solution in same direction.
regards,
Nagraj
|
|
|
|
|
Hi all
i tried to add hyperlink in EXcel and it worked fine with office XP and 2000. but when i run the samein Office 97 with windows 98 OS the following exception comes
************** Exception Text **************
System.Reflection.TargetParameterCountException: Number of parameters specified does not match the expected number.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Excel.Hyperlinks.Add(Object Anchor, String Address, Object SubAddress, Object ScreenTip, Object TextToDisplay)
at DMPTEST.ReportGenerator.Timer1Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The code which i used to add hyperlink is
indexWorkSheet.Hyperlinks.Add(indexWorkSheet.Cells[intSlNoCount+8,4], "" ,"'Sheet 1'!A1" , "Click ", "textToDisplay" );
Plz help me out why is it not working with office 97
|
|
|
|
|
Hi,
I am getting the following error in aspx page while doing any postback.I have a datagrid in my web page consisting of drop downbox.Previously in windows 2003 server the page is working fine .But when we shifted our application to new server(windows 2000) it is getting that error .I am not getting clear idea how to resolve the solution..I would be very thankful if anyone gives me a solution.It's a very urgent requirement for me...Plz do the needful
your
peter
|
|
|
|
|
Are you adding dynamic controls at run time?
|
|
|
|
|
Hello
i was working on creating a xml file. I want to just a print of the xml file in the screen. No need to write to the file. So i have given the code like this to get the ourput
But this does not show any thing. Can anyone please check y this so?
XmlTextWriter textWriter = new XmlTextWriter(Console.Out);
// Opens the document
textWriter.WriteStartDocument();
// Write comments
textWriter.WriteComment("First Comment XmlTextWriter Sample Example");
textWriter.WriteComment("myXmlFile.xml in root dir");
// Write first element
textWriter.WriteStartElement("Student");
textWriter.WriteStartElement("r", "RECORD", "urn:record");
// Write next element
textWriter.WriteStartElement("Name", "");
textWriter.WriteString("Student");
textWriter.WriteEndElement();
// Write one more element
textWriter.WriteStartElement("Address", "");
textWriter.WriteString("Colony");
textWriter.WriteEndElement();
// Ends the document.
textWriter.WriteEndDocument();
// close writer
textWriter.Close();
Regards
Hari
|
|
|
|
|
IIRC, you don't use the Console.Out property directly. You should call Console.OpenStandardOutput() method instead. Something like this:
XmlTextWriter textWriter = new XmlTextWriter(Console.OpenStandardOutput(), Encoding.Defaul);
Also you should call textWriter.Flush() to write the text in the buffer to the stream. This could be causing your problem.
Regards
|
|
|
|
|
i MODIFIED THE CODE AS FOLLOWS.
But didnt get the output, my requiremetn is to print this xml in to a new aspx page..
XmlTextWriter textWriter = new XmlTextWriter(Console.OpenStandardOutput(), System.Text.Encoding.Default);
// Opens the document
textWriter.WriteStartDocument();
// Write comments
textWriter.WriteComment("First Comment XmlTextWriter Sample Example");
textWriter.WriteComment("myXmlFile.xml in root dir");
// Write first element
textWriter.WriteStartElement("Student");
textWriter.WriteStartElement("r", "RECORD", "urn:record");
// Write next element
textWriter.WriteStartElement("Name", "");
textWriter.WriteString("Student");
textWriter.WriteEndElement();
// Write one more element
textWriter.WriteStartElement("Address", "");
textWriter.WriteString("Colony");
textWriter.WriteEndElement();
// WriteChars
char [] ch = new char[3];
ch[0] = 'a';
ch[1] = 'r';
ch[2] = 'c';
textWriter.WriteStartElement("Char");
textWriter.WriteChars(ch, 0, ch.Length);
textWriter.WriteEndElement();
// Ends the document.
textWriter.WriteEndDocument();
textWriter.Flush();
// close writer
textWriter.Close();
|
|
|
|
|
It has been rude of me not to reply all this time. Sorry! But I've been very busy lately I couldn't investigate it. I'll try your code snipet if I find time. Sorry again.
Regards
|
|
|
|
|
Hi all,
i am not looking for something sophisticated but just to read the "Location" field that i insert in the computer's Regional Settings menus..(in Control Panel)
any ideas how to get it?
(i do not want to find out through the IP)
Thnaks,
R.Z
|
|
|
|
|
Hi
by using the following class
System.Threading.Thread.CurrentThread.CurrentUICulture
you can read the os globalization info,
it is like en-US, tr-TR ..
hope this helps you.
|
|
|
|
|
You can use RegionInfo.CurrentRegion.DisplayName . Don't forget to reference namespace System.Globalization .
Regards
|
|
|
|
|
Hello,
I'm working on a schoolproject for the school-radio and I need to have an option in my program to play and crossfade between 2 track's, does someone has an idea on how I should start with this or what I need to start. I also need to get de mp3-tags of the music I'm playing but that's no problem because there are some good articles about that on this site
Kind regards,
Frederik
|
|
|
|
|
Moh, wie dan we daar en...
Nee da wetek ook nie
Greetz.
|
|
|
|
|
Can you answer in English please...
|
|
|
|
|
Hi there! I'm not able to convert following vb.net code to c#. Pls assist
Public Sub WriteBinary(ByVal FileName As String, ByVal ds As DataSet)
ds.RemotingFormat = SerializationFormat.Binary
Dim myFormatter As IFormatter = New Formatters.Binary.BinaryFormatter
Dim myStream As Stream = New FileStream(FileName, FileMode.Create)
myFormatter.Serialize(myStream, ds)
End Sub
The line in bold is giving me trouble
Thanks
Don't Quit
|
|
|
|
|
IFormatter myFormatter = new Formatters.Binary.BinaryFormatter();
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Hi Guffa! Thanks for replying. I've already done this. It don't seem to work. This is the code.
void WriteBinary(String FileName, DataSet ds)
{
ds.RemotingFormat = SerializationFormat.Binary;
IFormatter myFormatter = new Formatters.Binary.BinaryFormatter();
Stream myStream = new FileStream(FileName, FileMode.Create);
myFormatter.Serialize(myFormatter, ds);
}
These are the errors
Error 1 The type or namespace name 'Formatters' could not be found (are you missing a using directive or an assembly reference?) d:\Nitin\Serialization1\Serialization1\Serialization1\Form1.cs 58 42 Serialization1
Error 2 The best overloaded method match for 'System.Runtime.Serialization.IFormatter.Serialize(System.IO.Stream, object)' has some invalid arguments d:\Nitin\Serialization1\Serialization1\Serialization1\Form1.cs 60 13 Serialization1
Error 3 Argument '1': cannot convert from 'System.Runtime.Serialization.IFormatter' to 'System.IO.Stream' d:\Nitin\Serialization1\Serialization1\Serialization1\Form1.cs 60 35 Serialization1
Thanks
Don't Quit
|
|
|
|
|
Nitin1981 wrote: Error 1 The type or namespace name 'Formatters' could not be found (are you missing a using directive or an assembly reference?
I see. Specifying namespaces works a bit different in VB and C#. Specify the full namespace:
IFormatter myFormatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
Nitin1981 wrote: Error 3 Argument '1': cannot convert from 'System.Runtime.Serialization.IFormatter' to 'System.IO.Stream'
Why have you put the formatter there? In the VB code it's the stream.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|