|
Hello!
I am searching for a way to rearrange crossed-bounds text so that they don't appear on eachother. Your informations would be very helpful.
|
|
|
|
|
hi...
I have an exe compiled with VS and three references to 3 dlls within exe dir.
Is there a way to pack this dll and exe to have only one exe?And if there is... is a safe way?is there any possibility that anyone identify those packed dlls?
thanks
regards
|
|
|
|
|
|
thanks!!! is what I need!
thanks again
-- modified at 8:02 Friday 6th January, 2006
|
|
|
|
|
|
I'm implementing poor man's multithreading and need a way for a progress callback (delegate) to be able to pump the form's message queue so that it can check if the user has checked an "Abort" checkbox, thereby causing an ongoing computation to quit.
In Win32, we used to pump the GUI's message queue using PeekMessage() . What's the appropriate analog in the WinForms world?
Thanks,
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi Ravi
the analog call of PeekMessage is BeginnInvoke.
|
|
|
|
|
|
HI,
I am having a text file. I will be reading line by line from teh file. Can any one tell me how to move pointer from the current position to previous position(From the current line to previous line).
Example code i am using :-
StreamReader sr = File.OpenText(FILE_NAME);
String input="";
while ((input= sr.ReadLine())!=null)
{
String []strs = input.Split(';');
...
}
Can we move the sr to the previous line?
Plese let me know if there is another way handling the same
Thanks and Regards,
Subbu
|
|
|
|
|
Hi!
You'll have to use the Position property of the underlying Stream . Your sr has a property BaseStream you can use for this purpose.
Regards,
mav
|
|
|
|
|
Hi,
I am new to C#. I have a application with 10 winforms. But even after I close the app, the process still runs,ie, I could see the .exe still running in task manager.
how do I solve this. Thanks in advance.
|
|
|
|
|
Are you closing your main form ? If you're debugging, does the debugger maintain a connection ? Can you break and see where it's still running ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do you close the app? Do you handle the Closing event yourself?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Here is what I do...
I have a main form called HomeForm. Another form called EnggHome has the exit button.
I call the EnggHome form HomeForm as
<br />
private void button3_Click(object sender, System.EventArgs e)<br />
{<br />
<br />
EnggHome enggH = new EnggHome();<br />
enggH.Show(); <br />
this.Visible = false; <br />
<br />
}
In exit button code (in EnggHome)
<br />
private void button3_Click(object sender, System.EventArgs e)<br />
{ <br />
<br />
this.Dispose(true);<br />
this.Close();<br />
<br />
HomeForm Hom = new HomeForm();<br />
Hom.Dispose(); <br />
Hom.Close();<br />
<br />
}
In debug mode too, if I close the app using exit button, the debugger does'nt stops unless I stop it..
What am I missing???
|
|
|
|
|
I see some problems here: in the button3 handler, you instantiate a new instance of the MainForm. I suggest that you implement a constructor for EnggHome that takes a handle to the HomeForm parent form, and keep it among its private data members. In the button3 handler button for EnggForm, just call the HomeForm.Close() method.
public class EnggHome : Form
{
private Form _parentForm;
public EnggHome(Form parentForm)
{
this._parentForm = parentForm;
}
private void button3_Click(object sender, System.EventArgs e)
{
this.Dispose(true);
this.Close();
this._parentForm.Visible = true; <--- did you previously instantiate a new object to have you form reappear???
this._parentForm.Dispose();
this._parentForm.Close();
}
}
and in the HomeForm class method, when instantiating the EnggHome object:
private void button3_Click(object sender, System.EventArgs e)
{
EnggHome enggH = new EnggHome(this); <--- Notice the different constructor call.
enggH.Show();
this.Visible = false;
}
A more drastic approach would be to call Application.Exit(0) , but this would not give a chance to the parent form to clean up.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
-- modified at 16:55 Thursday 5th January, 2006
|
|
|
|
|
Thank you so much for ur reply. It works. But in my app I have like 10 forms. and in all the forms I have button called "Home" that calls the HomeForm using new HomeForm(). I navigate all the forms sequentially that say HomeForm is form1->EnggHome is form2->form3->form4...so on. So should I pass the homeform in the constructor of all the forms...or is there any other better way??
Thanks again.
|
|
|
|
|
Do you mean HomeForm creates EnggForm, which creates EnggForm, which creates EnggForm, etc. like a chain?
In this case, I suggest that each form has a handle to its parent, so you can navigate back.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Have you considered turning all your forms into controls, and hosting them all on the one form ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I noticed that in the button3 handler in HomeForm, you lose the reference to the instantiated EnggHome form. Although seemingly correct in your code, it is a good practice to keep a reference to do proper cleanup when quitting.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
|
In HomeForm, have a private variable that retains the reference to the form.
private EnggForm _childForm;
.....
in your button3 handler:
this._childForm = new EnggForm(this);
instead of:
EnggForm enggForm = new EnggForm(this);
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hi there I'm working on a project which involves digital signatures.
I take custom made key files and import modulus public and private exponent on RSAParameters.With this info I can encrypt data without any problem
Unforunately when I call the sign method I get an exception about including the private part of the key that means the P/Q/DP/DQ values of the keys.
Anyway how can I calculate the P and Q values given that the only info I have about the private key is the D parameter and the exponent.
Please help me
Thank you in advance
|
|
|
|
|
I'm trying to add a 2px white right border to items in a datagrid but i don't seem to work.
<br />
In my .css file<br />
.grid_item<br />
{<br />
background-color: #f3f3f3; <br />
border-right-color: White;<br />
border-right-width: 2px;<br />
border-right-style: solid;<br />
}<br />
<br />
In my .aspx file<br />
asp:datagrid id="dgCostumerList" runat="server" CssClass="grid" AllowPaging="False" Width="680px"<br />
CellPadding="3" GridLines="None" AutoGenerateColumns="False" PageSize="200"><br />
AlternatingItemStyle CssClass="grid_item"></AlternatingItemStyle><br />
ItemStyle CssClass="grid_item"></ItemStyle><br />
<br />
In a normal item in a this works fine.
Does anyone know, it dosn't work here?
Thanks
Thomas
-- modified at 15:14 Thursday 5th January, 2006
|
|
|
|
|
Does the background color work?
---
b { font-weight: normal; }
|
|
|
|
|
Yes, all other things I do works fine.
|
|
|
|