|
Cool
I think your method will need to be used if you want to use culture-specific resources; if you want .NET to automagically load them for you anyway.
James
Simplicity Rules!
|
|
|
|
|
How can I create form inside second ? I dont see anything such Create(HWND hParent)
In MFC e.g.:
CDialog dlg;
dlg.Create(IDC_DIALOG1,this);
dlg.ShowWindow();
I think programing using MFC or/and API is more logical than C#.
Wiizi
|
|
|
|
|
|
no, only create form inside second. e.g. you have treectrl and when you select item -> show form with setting ....
Wiizi
|
|
|
|
|
Will this work
In the event handler for the tree control
public /* some tree event handler*/
{
Form2 form2 = new form2();
form2.Show(); // or form2.ShowDialog() - for modeless
}
Form2 is the class you created for the second form? I might be missing something here so let me know.
|
|
|
|
|
ok...and how can i dock it into parent form ?
Wiizi
|
|
|
|
|
Ahh, so you want to dock it in the parent sort of like the netscape preferences dialog. If that's the case take a look at the following on CP
http://www.codeproject.com/cs/miscctrl/propertytree.asp
I think this is probably what your looking for. If not, let me know.
|
|
|
|
|
dlg.Parent = this;
or
this.Controls.Add(dlg);
James
Simplicity Rules!
|
|
|
|
|
I believe you will find that both of these solutions will throw an exception when the child is a Form derived object, or more specifically any top level control.
|
|
|
|
|
Yes ... it throw
Wiizi
|
|
|
|
|
See this post for the fix. If you don't want the user to be able to move the window, then set the FormBorderStyle to FormBorderStyle.None;
James
Simplicity Rules!
|
|
|
|
|
Oops, forgot you had to do this first
dlg.TopLevel = false;
James
Simplicity Rules!
|
|
|
|
|
I like...
|
|
|
|
|
I create a class now I want to access to my form from this class.So how can I access to the main form in C#?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
um... you could try...
ApplicationContext.MainForm
|
|
|
|
|
Thanks Andy,I'll check it.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I have this program in which I'm adding TraceSwitches to various subsystems. I got it working fine in one subsystem - so I went ahead and added it to other subsystems. When I try to enable with other switched using my config file - the original switch now throws an XML exception (at the first call to WriteLineIf(), not when newing the TraceSwitch ).
Here are my config files:
The one that works:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<switches>
<add name="FirstSwitch" value="4" />
</switches>
</system.diagnostics>
</configuration>
The one that blows up:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<switches>
<add name="FirstSwitch" value="4" />
<add name="SecondSwitch" value="4" />
<add name="ThirdSwitch" value="4" />
</switches>
</system.diagnostics>
</configuration>
Any ideas what's wrong with the syntax or how to enable multiple switches with a config file?
Thanks
Dale Thompson
|
|
|
|
|
Hi All,
I am trying to view some Reports online through my Internet site.
I am using C# on a Windows 2000 server running IIS5.
I have looked around the internet and found some examples but they are not working. I have the following at the moment.
<cr:CrystalReportViewer
id=CrystalReportViewer1
style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 6px"
runat="server"
ReportSource='<%# "C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt" %>'
Height="1133px"
Width="1030px">
</cr:CrystalReportViewer>
In design view I cn now see my report, but when I compile and view my page I get
CS1009: Unrecognized escape sequence
????
Can someone let me know where I am going wrong and how to sort this out.
Thanks,
Gavin
|
|
|
|
|
it's the back slashes in your ReportSource string.
why do you have it as a server side string???
change it to:
ReportSource='C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt'
|
|
|
|
|
It was set as a server side string because that is how the Crystal Report Viewer set it itself.
What I did was I dragged the CrystalReportViewer off the toolbox and dropped it onto my form.
I then selected it and in the properties window click on the ... next to databindings.
I then went into the ReportSource and put in the exact Source and clicked ok and it did the rest ...
I changed it as you suggested and am now getting the following error.
Cannot create an object of type 'System.Object' from its string representation 'C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt' for the 'ReportSource' property
I'm sure this is meant to be a lot simpler than it has turned out to be?
Thanks for the help
|
|
|
|
|
ok, so try this:
ReportSource='<%# "C:\\Inetpub\\wwwroot\\Outbreak\\Reports\\test.rpt" %>'
or:
ReportSource='<%# @"C:\Inetpub\wwwroot\Outbreak\Reports\test.rpt" %>'
|
|
|
|
|
Okay well that has solved the invalid escape sequence thingie, BUT
now I am getting the following error
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
CrystalDecisions.Web..get_7() +189
CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e) +352
System.Web.UI.Control.InitRecursive(Control namingContainer) +235
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Control.InitRecursive(Control namingContainer) +179
System.Web.UI.Page.ProcessRequestMain() +169
Would this be a problem with the actual report (which seems to work fine of opened in Crystal) or is it still a coding error?
Thanks
|
|
|
|
|
Are there any classes in .NET to zip and unzip files?
third party free classes?
thanks!
Emanuele
- SONORK ID 100.17421 : b0nu$ -
|
|
|
|
|
http://www.icsharpcode.net/OpenSource/NZipLib/default.asp
Andy Gaskell, MCSD MCDBA
|
|
|
|
|
Thanks a lot!
- SONORK ID 100.17421 : b0nu$ -
|
|
|
|