|
CLit is superb app, but only if you can find its binary or compile its source (I distinctly remember having some difficulties doing the latter, because main project is written in C or C++ and some parts are written in assembler). It basically decompiles LIT file into HTML and picture file(s) from which it is comprised.
Don't know if it can be P/Invoked, though.
|
|
|
|
|
Hi All.
Please help me. I would like to know how to convert an MS Word document to PDF and save that converted file on my local machine.
Thank You
Mpumelelo
khuzym
|
|
|
|
|
ITextSharp (programmatically)
CutePDF (Word Plugin)
|
|
|
|
|
Thank Vasudevan Deepak Kumar
I will try although I am no sure where to start
khuzym
|
|
|
|
|
On the button_click event
How we open an existing form?
Please send code..........
|
|
|
|
|
Hello,
If you have the instance of the From.
yourForm.Show();
or
yourform.ShowDialog();
All the best,
Martin
|
|
|
|
|
Hello Martin,
I've published the article as promised, please check it and vote for me;)
Gone With The Wind
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
For a MDI Application, You can open or show your mdi child forms from a mdi child form.
private void OpenFormIfNotExists(Form[] Formlar, Form MainForm, Form OpeningForm)
{
bool Foundf = false;
foreach (System.Windows.Forms.Form SearchingForm in Formlar)
{
if (OpeningForm.Name.Trim() == SearchingForm.Name.Trim())
{
SearchingForm.BringToFront();
Foundf = true;
break;
}
}
if (!Foundf)
{
System.Windows.Forms.Form OpForm = OpeningForm;
OpForm.MdiParent = MainForm;
OpForm.Show();
}
}
Usage:
OpenFormIfNotExists(this.MdiParent.MdiChildren, this.MdiParent, new MyNewMDIChildForm());
Umit
|
|
|
|
|
Hello,
I have a small problem. I built a ASP.NET WebService that retrieves data from a database. I have a function in the webservice that receives a parameter, and the return type is an object created by me. UserInfoCollection is a class created by me that contains an ArrayList with will cotain several UserInfo objects.
This is the function in the webservice:
<br />
[WebMethod]<br />
public UserInfoCollection GetUsersByType(AccountTypes account)<br />
{<br />
UserInfoCollection collection = new UserInfoCollection();<br />
<br />
<br />
return collection;<br />
}<br />
To use the methods from the webservice I build a proxy using the WSDL utility. This is how i use this function:
<br />
WSService ws = new WSService();<br />
UserInfoCollection _uicUsers = ws.GetUsersByType(type);<br />
Using debug mode I saw that the webservice inserts into the collection everything that he has to, but when the webservice returns the collection object, in the application the object has no values inside. After the return statement, the webservice reinitializez the object. My question is that anyone has a suggestion to get past this problem.
Thank you.
Do your best to be the best
|
|
|
|
|
Are your UserInfoCollection and UserInfo classes marked as Serializable?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hey,
First of all thanks for your reply.
The classes are not marked as Serializable, but I also have a function in the WebService that returns a UserInfo object and it works perfect. If I use the UserInfoCollection...problems. I found some way to go around, but this bugs me a lot...because I can't understand why it's doing this.
Do your best to be the best
|
|
|
|
|
The data you want to expose need to be public. Remember webservices only make a wrapper for your class's public data.
|
|
|
|
|
Hey,
Thanks for your reply.
The classes are marked as public and the methods that I need are also public, but in debug mode when the webservice returns the collection object first of all it reinitialize my private objects and then calls the constructor of the class. These classes I talk about are wrapped in a DLL and imported in the WS.
Do your best to be the best
|
|
|
|
|
Hi,
I'm working on a app which workspace is contained in one splitcontainer that for its turn is also inside a splitcontainer.
That workspace is a form and i told it to always maximize.
If i want to make always maximized i told the splitcontainers to do the following operations when moved:
if (workspace != null)
{
workspace.WindowState = FormWindowState.Normal;
workspace.WindowState = FormWindowState.Maximized;
}
The thing is that i cant see a imediate adapation of the form. I can perfectly note is getting smallerand then getting bigger, occupiyng the full area.
Is there a way of making this adaptation more smooth?
Thx,
Best regards,
Nuno
|
|
|
|
|
Hi All,
Can anyone explain me in detail on creating different versions of dlls, creating Strong names, and implemeting the dll in a client application. I want to use both the versions of the dll in my client application.
Please explain with steps i have to make..
Thanking you All,
Umashanker.K
|
|
|
|
|
|
Any other explanaton other than the above reply, is highly appreciated.. I need to know step by step and want to understand the concepts of strong name, dll versioning and GAC.. Will any one help me..
Umashanker.K
|
|
|
|
|
|
Hi,
I'm developing an Windows Application with C#. In that the application will read an input file while starting. This input file contains a version no in the first line, then heading, then an underline. I need to read the data after this underline. Following is the code I have written for fetching the path for input file and read the lines:
FileStream fspath = new FileStream(strLiveRicsFilePath,FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
StreamReader srReadFile = new StreamReader(fspath,System.Text.Encoding.UTF8);
string readline;
readline = srReadFile.ReadLine();
Now I want to tell the StreamReader to read the data after the underline. How to code the same in C#. Any help in this regard would be great. Thanks in advance.
Meeram395
|
|
|
|
|
Just call ReadLine three times - or until you read the underline or something.
If you know the length in bytes, you can also seek to the right posistion. This will save you at a fraction of a milisecond in performance, and in return leave you with some fragile code that will break wihout warning if anything change - your choice.
|
|
|
|
|
You can't really avoid reading them so just use a counter variable and don't do anything with the first 3 lines.
|
|
|
|
|
Is it a text file?
If it is, I would basically put streamReader.ReadLine() three times before I pick the fourth line which would be line you want to work on.
You can your streamreader any name.
I hope this helps
khuzym
|
|
|
|
|
I am creating programs that send and receive files using TCP protocol.
A client and server modules are created and communication between them is through "System.Net.Sockets". Thread is needed for listening to client connection request.
The connection between server and client is restricted to 30 minutes. In my program, the server module enables a 30 min timer when there is a client connection . The timer tick method should be called to disconnect the client after 30 min.
Problem is the tick method is not executed even though the timer is enabled. Pls help if you know where have got wrong. Thanks in advance.
My code at server module:
<u>listen to client</u>
th = new Thread(new ThreadStart(ListenForPeers));
th.IsBackground = true;
th.Start();
<u>ListenForPeers</u>
public void ListenForPeers()
{
//=====Standard socket method======
serversocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
serversocket.Blocking = true ;
IPHostEntry IPHost = Dns.Resolve(server);
string []aliases = IPHost.Aliases;
PAddress[] addr = IPHost.AddressList;
IPEndPoint ipepServer = new IPEndPoint(System.Net.IPAddress.Parse(IP_ADDRESS.Text), 8090);
serversocket.Bind(ipepServer);
serversocket.Listen(-1);
while (runThread) //<<====Start thread to listen to client connection, when server is ready ===
{
clientsock = serversocket.Accept();
if ( clientsock.Connected )
{
total_clients_connected++; // increment client connection counter
if(connectionTimer.Enabled == false) //<<===Enable the timer if it is not able==
{ connectionTimer.Enabled = true; //<<=== Start 30 min timer
}
Thread tc = new Thread(new ThreadStart(listenclient)); //listen to client command call
tc.IsBackground = true;
tc.Start();
}
}
}
|
|
|
|
|
I can see one flaw in the code. Your server app allows n clients to connect, each processed on their own thread while it's the listener thread that seems to be maintaining a timeout check with only one timer. Thus the actual timeout would be 30 mins since the last client connected!
That aside there's not enough code / information here to really determine the issue. I assume you're using the System.Windows.Forms flavour of Timer rather then System.Timers.Timer ?
Duration set to 1800000 (ms)?
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Hi,
Thanks for pointing my flaw. I manage to use System.Threading.Timer to solve my problem
Thanks alot.
Rdgs
|
|
|
|