|
Hi,
Try converting your form to a UserControl. It works better.
Do your best to be the best
|
|
|
|
|
Not sure if I did it the right way, tried it via casting. ie
Form form1 = new Form();
UserControl uctrl = new UserControl();
uctrl = (UserControl)form1;
But compilation fialed and I recieve the error - Cannot Convert Form to UserControl
He who laughs last is a bit on the slow side
|
|
|
|
|
to convert the form to usercontrol
just change the class derivation from Forms to UserControl.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Just to make sure I understand this correctly. You mean...
I must change the folloeing within the form that I try to load into the panel??
public class frmReportPrintSettings : System.Windows.Forms.Form
Change to
public class frmReportPrintSettings : System.Windows.Forms.UserControl
He who laughs last is a bit on the slow side
|
|
|
|
|
Yesssssss....
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
form is your form to be put in panel.
if(form != null)
{
form.ControlBox = false;
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
form.Dock = DockStyle.Fill;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.TopLevel = false;
panelTop.Controls.Add(form);
form.Show();
form.BringToFront();
}
else
{
panelTop.Controls.Clear();
}
|
|
|
|
|
|
Hai
i want to verify the com components which i am referencing are resgistered or not and if not they needs to be registered in a particular folder
Can i know the way
|
|
|
|
|
Hi!
A simple way would be to try to instantiate the COM object you intend to use. If this throws a COMException, the component usually simply isn't registered (yet).
But there is no way you can find out which folder a component has to be registered from, that completely depends on the component you want to use.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
When client deploys the application and Com components are not registered it throws the exception.
so that needs to checked and added as users wont have knowledge on registering the dlls.
|
|
|
|
|
Yes, if the components are not registered correctly, the exception I've mentioned will occurr.
But, as with all exceptions, you can catch them ("that needs to checked") and then register the dlls yourself (using Process.Start("regsvr32 -s comdll.dll"); ) if you know where they're located.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks for showing me the way
i will try
Thanks boss
|
|
|
|
|
How to write a javascript code for
a textbox that allows only digits and after decimal point it has to allow only two digits?
Thanks,
Hosanna
|
|
|
|
|
Wrong board! You're in the C# board not in the javascript board.
To answer your question, you could simply use a change event where you can then check by using, for example a regular expression.
|
|
|
|
|
hi all , i need to print my report in landscape when the user click on the print button(with out showing the preview dialog)...i tyr this with the following code but it still print in portraid... here is my code..
ReportDocument rd = New ReportDocument();
rd.Load("C:\Inetpub\wwwroot\test\CrystalReport3.rpt")
rd.SetDatabaseLogon("sa", "ssg")
rd.PrintOptions.PaperOrientation = CrystalDecisions.[Shared].PaperOrientation.Landscape
rd.PrintOptions.PrinterName = "printername"
rd.PrintToPrinter(1,False,0,0)
whats wrong with my code....plz help me to solve this issue...
ayyp
|
|
|
|
|
Hi,
Is it possible for an application to Dock to the top of the screen and be ontop of other windows. However I want other applications to not be under the form, but start/end where my application finishes.
Basically want the form to have the same importance as the windows taskbar...
Thanks
|
|
|
|
|
Set the Forms .TopMost property = true.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
the TopMost property makes the form ontop of all other windows. However I want other windows to become smaller, as if the application is a toolbar of the desktop...
So if any application (ie Internet Explorer) was maximised the window would fit inside the bounds of the start menu and my application.
Thanks for your help.
|
|
|
|
|
Sorry , didn't get what actually u want to do?
Do u want that the form should not be displayed in the taskbar?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Thanks. Thought it would be hard to explain.
It does not matter if is/isnot displayed in the taskbar.
I just want the form to be ontop of all other windows (which can be done with TopMost) but also that it is docked to the top of the screen. Therefore any other windows which are maximised do not maximise to full size of the screen but to the end of my application.
Hope that can be understood.
Thanks for your help
Peter
|
|
|
|
|
Hi, I'm wondering how i can get the number of millseconds that have ticked over since midnight. Anyone have any ideas?
Thanks
|
|
|
|
|
No worries, I've already found the TimeSpan class.
TimeSpan sinceMidnight = (DateTime.Now - DateTime.Today);
Double sinceMidnightInMs = sinceMidnight.TotalMilliseconds;
|
|
|
|
|
Hi all,
Dear Fellows, Unfortunately I have deleted crystal_managed2003.msm file by mistake. CD is not available right to me. I am very thankful to you if someone of you send me the required file at following address: fahiem@gmail.com.
I will be really really thankful to you. I am in immediate need of that file. Please help me in this regard. Thanks
|
|
|
|
|
I have defined my variables and need help sorting them into the text box. The text box is multiline and i have been trying \n but it doesn't seem to work.
txtDeliveryAddress.Text = fullName + "\n" + fullCityStateZIP + "\n" + street;
is what i have it should look like
John Doe
345 S. Street
Somewhere, OH 51267
anyhelp with this would be appreciated, if not i'll keep looking
|
|
|
|
|
If your textbox is indeed multiline then that should work. I would try to run something like this;
string strTextType = txtMulti.TextMode.ToString();
If strTextType is not MultiLine then that is your problem. Other than that I can't think of much else.
Regards
|
|
|
|