|
I have called base.xxx method.
Eventhough i have kept a breakpoint at the beginning of the method ,it doesn't go to the method itself.
|
|
|
|
|
snoby wrote: The control is dropped on a designer at runtime
Ohh, now I understand.
Youre control is in design mode, or not?
Don't think that the event's are fired in this mode.
Sorry for not realy helping.
All the best,
Martin
|
|
|
|
|
Tell me how to get updated Coordinate position when control is dragged & dropped on any part of designer without using events.On designer also events are not getting raised.
|
|
|
|
|
I want to open mdi form from login form ....im using following code....
in Login form..but its not working.....
private void cmdsubmit_Click(object sender, System.EventArgs e)
{
frmmdi frm = new frmmdi();
this.Dispose();
this.Close();
frm.Show();
frm.Enabled=true;
frm.Visible=true;
}
ahmad.osama1984@gmail.com
|
|
|
|
|
Hello,
Osama123 wrote: this.Dispose();
This is not going to work, because you are Disposing the form wich holds the reference to your new form.
Osama123 wrote: this.Close();
Same here, because the Close method calls the Dispose method.
Osama123 wrote: frm.Enabled=true;
frm.Visible=true;
This is normaly the default setting, so you shouldn't need it.(But it's not wrong)
Osama123 wrote: this.Dispose();
this.Close();
You should use this.Hide() instead.
Hope that helps.
All the best,
Martin
|
|
|
|
|
Thanx Martin.........
|
|
|
|
|
Youre always welcome!
All the best,
Martin
|
|
|
|
|
try this.Hide() instead of close and Dispose.
In the closing event of frmmdi use Application.Exit().
Hope this satisfies ur needs...
|
|
|
|
|
How to create thumbnail Image of video file(.wav etc) in asp.net 2.0 with c#.
|
|
|
|
|
yogesh_v12 wrote: How to create thumbnail Image of video file(.wav etc)
You won't get very far making a thumbnail of a wav file because it contains no image elements - it is an audio format.
|
|
|
|
|
Hi, All.
My application have to generate a text bitmap. The text string is inputted by user, and will be drawn on a panel witin a fixed region. so the string is auto wrapped with multi-line.
I would like to save the display text into a bitmap file (same as the preview with auto wrapped). Does anyone know how to do ? Could you please provide me some examples ? Thank you so much !!
|
|
|
|
|
Hello,
Do I understand it write, that you have the Text allready in your panel and make a bitmap (like screenshot) from the panel?
Martin
|
|
|
|
|
yes, correct.
I have already used the drawString to draw text on Panel. But don't know how to generate a bitmap.
Here is my example code for drawing the string:
<br />
string txt = "AbcdefgHigklmnopqrstuvWxyz.AbcdefgHigklmnopqrstuvWxyz.***(AbcdefgHigklmnopqrstuvWxyz)@#!!!) (AbcdefgHigklmnopqrstuvWxyZ)ZZZZZZZ";<br />
StringFormat drawFormat = new StringFormat();<br />
<br />
drawFormat.FormatFlags = StringFormatFlags.DisplayFormatControl;<br />
drawFormat.Trimming = StringTrimming.Character;<br />
drawFormat.LineAlignment = StringAlignment.Near;
<br />
g.DrawRectangle(Pens.Red, new Rectangle(100, 100, 200, 500));<br />
g.DrawString(txt, f, Brushes.Black, new RectangleF(100, 100, 200, 500), drawFormat);<br />
<br />
|
|
|
|
|
Hello,
You could use the CreateBitmap Method of the panel class.
All the best,
Martin
|
|
|
|
|
Create a new Graphis object and use DrawString function....
|
|
|
|
|
But use DrawString just draw the text on the screen...
how can I generate a bitmap as same as the preview on screen?
thank you
|
|
|
|
|
Use the DrawToBitmap method to draw the control on a Bitmap.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you Guffa,
I'm sorry, can you give me some example code?
|
|
|
|
|
Dear All,
I am making web based Application.There i am making one master page where i am saving, delete data. I need to know how i can prompt message before saving or deleting data(Asking whether user want to save data or not). how i can do it in C#.
thanks
regards
imran khan
|
|
|
|
|
You can use the DialogResult object. Any messageBox always returns a DialogResult that contains the name of the button that was pressed (clicked.
<br />
DialogResult result = MessageBox.Show("Write the question u want to ask here", "write the title (caption) of the message box", MessageBoxButtons.YESNO, MessageBoxIcon.Question);<br />
<br />
if(result.toString() == "Yes")<br />
Note: if you are using asp and creating a web application as u stated u can't use the message box directly without referencing to its name space,
you should add the reference: using System.Windows.Forms
hope it helps,
|
|
|
|
|
Thanks for quick reply but when i use system.window.forms. it generates an error of namespace system does not exit in the namespace system.
I am using asp.net and C#
Please help.
regards
imran khan
|
|
|
|
|
use the add reference and add it
u can use the add reference following these steps:
click on the Project in the main menu,
--> go down to the add reference
--> stay in the .Net tab and scroll down till you find the System.Windows.Forms
--> select it and then click add
now u should be able to use the message box by just writting MessageBox.show(.......)
good luck
|
|
|
|
|
Thanks Very much, It worked fantastic!.Thanks once againe
I have one more question. Now i am preparing verious master. some of then are very similar. Like branch master(which has branch name and branch description),
Unit master(which has unit code and unit description). So i wanted to make one form and based on menu item selection(Bcoz i used asp:menu).so by using navigationurl. i redirect it to corresponding web Page.
Is My idea is correct. Or i have to do it other way.
Please help.
Anyway thanks you once againe
regards
imran khan
|
|
|
|
|
sorry man,
i don't work much on ASP, my basic work is C# but i have passed through ASP for my own knowledge only.
I am not sure about the answer i will give you but i think that what u said is logic and will work.
Hope u get the best out of it.
Note: for next time please post the ASP questions in the ASP MessageBoard
Good Luck
|
|
|
|
|
Actuaaly in page load event other file , i just want to fetch the selected item menu in other page. that is i have form called home.aspx where i have defined menu.based on selected item menu. i will write code in(C#) other form
master.aspx.cs So i want to fetch selected menu item in master.aspx.cs how i can do that that i want to know.
thanks
regards
imran khan
|
|
|
|