|
You can get array with all child forms and than loop through it. Before calling childs method you need to cast it to correct type.
foreach(From child in this.MdiChildren)
{
if (!child is MyChildForm) continue;
((MyChildForm)child).Save();
}
foreach(MyChildForm child in MdiChildren)
{
child.Save();
}
|
|
|
|
|
I created an installer package which has been installed by several clients. Now I want to create a new version. I increased the version number and changed the upgrade code of the installer package and set the RemovePreviousVersion property to True and set the DetectNewerInstallerVersion to True as well. I have several registry setting setup in the registry editor. However if the client has a previous version of the application installed I want the system to remember those settings and not override them. Because the RemovePrevioiusVersion property is set to True the system removes all settings after which they are lost. However if I don't set this property to true the system willl install 2 version of the application on the target machine.
How can I create a package that overrides (or removes) the old version but doesn't override the registr values so that previous configuration settings will be maintained? I spend many days trying to find a solution but haven't had much luck. Also it must be possible to use this package as the first installer meaning that if the client never had the application installed before, he can run the setup to install the application. In other words it is not just a patch for older versions.
|
|
|
|
|
I want to know what libraries do I need to read up on if I want to build an app that sends info to a webpage. I am programming in C# using .NET. The info I would be sending would be text to a text box and submitting it to the website, also downloading images from the website as well. How can I do this with .NET without having to manually do this through a browser?
Thank you,
K
|
|
|
|
|
You probably want to use System.Net.HttpWebRequest .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,everybody,
I can find the file mscorcfg.msc, but I cant run it(.NET Framework Configuration Tool (Mscorcfg.msc)) on my pc.
How to correct the problem?
Thanks for any reply!!!
Alan Shen
|
|
|
|
|
|
I would like to write a dll in C# .NET, however, I am concerned about compatibility on PC's that do not have the .NET Framework installed.
If using a DLL written in C# .NET, will that machine be required to have the framework installed? If so, must they install the entire framework? I'm concerned about download time for client PCs.
|
|
|
|
|
Yes, they will need the framework.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
It must require the .NET Framework installed.The DLL created in C# is the managed code. Which can only be execute on the .Net platform.
Jitendra
|
|
|
|
|
Hi,
I want to have a free POP3 component desined in VB.
I tried to get a POP3 component which is designed in VB. while trying to get a POP3 component, i came across some of those which are working well (for ex: WeOnlyDo), but all of them are providing trail versions. . I would like to know, whether can we build our own POP3 component in any other language?. (except using Socket Programming). Actually, I want to try it in ASP.NET.
Any idea or website reference would be hihly appreciable.
Thanks in advance,
Suman.
|
|
|
|
|
Hi,
I am working on an unmanged user interface .I am using the Service of a COM Executable that is also managed.
BUt to get the handle of the Com executable ,I have to go through Managed DLL(i.e this is the requirement).
I am able to retrieve the handle successfully, but some methods are failing.
The HR error value in these is 0x80131531
MSDN says that this exception thrown by the marshaler when it encounters an argument of a variant type that
can not be marshaled to managed code
I am helpless about this error.
Can anybody suggest some way to rectify it?
Thanks in Advance!
Sanjay
|
|
|
|
|
Can anybody help me convert this delphi code to vb .net or c#... tnx in advance... basically, what it does is compress data...
//Ex: '3F045F188888888867A' >> 3F045F1{89}67A
procedure BinToHexCompact(BinBuffer, HexCompBuffer: PChar; Const HexaSize, BinSize: Integer);
implementation
Uses Classes, SysUtils, PhUtils, PhRaise;
Const
Start_digit = '{';
End_digit = '}';
MinDigitsCompact = 5;
procedure BinToHexCompact(BinBuffer, HexCompBuffer: PChar; Const HexaSize, BinSize: Integer);
Var
LenH: Integer;
L: Integer;
H, HR: String;
Begin
Try
FillChar(HexCompBuffer[0],HexaSize, 0);
If (BinSize = 0) Then Exit;
LenH:= LenBuffer(BinBuffer[0], BinSize) Shl 1;
If (LenH = 0) Then Exit;
SetLength(H, LenH);
FillChar(H[1],LenH, 0);
BinToHex(BinBuffer, pChar(H), LenH shr 1);
HR:= CompacteBytesStr(pChar(H));
If (Length(HR) > HexaSize) Then ErrDevel(AEIP, 'PhUtils.BinToHexCompact, HexaSize trop petit');
Move(HR[1], HexCompBuffer[0], Length(HR));
Finally
H:= '';
HR:= '';
End;
End;
function CompacteBytesStr(Const BytesStr: pChar): String;
function isComp(pS: pChar): Boolean;
Var
i: Integer;
D0: Char;
Begin
Result:= False;
If (StrLen(pS) < MinDigitsCompact) Then Exit;
D0:= pS[0];
For i:= 1 To MinDigitsCompact - 1 Do
Begin
If (pS[i] <> D0) Then Exit;
End;
Result:= True;
End;
Var
i: Integer;
DigitStart, Digit: Char;
HasBeginDigit: Boolean;
DigitCount: Integer;
iLen: Integer;
R: String;
Begin
Result:= BytesStr;
iLen:= StrLen(BytesStr);
If (iLen = 0) Then Exit;
Dec(iLen);
If (iLen + 1 < MinDigitsCompact) Then Exit;
R:= '';
i:= 0;
DigitCount:= 0;
HasBeginDigit:= False;
DigitStart:= #0;
Repeat
If (i > iLen) Then Break;
Digit:= BytesStr[i];
If (i = iLen) Then
Begin
If HasBeginDigit Then
Begin
If (DigitCount > 0)
Then R:= R + IntToStr(DigitCount) + End_digit
Else R:= R + End_digit;
HasBeginDigit:= False;
DigitCount:= 0;
End Else R:= R + BytesStr[i];
End else If not HasBeginDigit And isComp(BytesStr + i) Then
Begin
HasBeginDigit:= True;
R:= R + Start_digit + Digit;
DigitStart:= Digit;
DigitCount:= - 1;
End Else If HasBeginDigit And (BytesStr[i + 1] = DigitStart) Then Inc(DigitCount)
Else If HasBeginDigit Then
Begin
If (DigitCount > 0)
Then R:= R + IntToStr(DigitCount) + End_digit
Else R:= R + End_digit;
HasBeginDigit:= False;
DigitCount:= 0;
DigitStart:= #0;
End Else R:= R + Digit;
Inc(i);
Until False;
Result:= R;
End;
end.
|
|
|
|
|
This looks fairly simple code to translate, except a few functions like "BytesStr[i]" and others witch I don't know how to replace...
In C# there are no submethods or global variables, so you need to place the whole thing into a class and seperate the method into 3 methods. The main thing doing that is to get right with the variables that are used in submethods in a main method.
<br />
public class Compact<br />
{<br />
private char startdigit;<br />
private char enddigit;<br />
...<br />
public void BinToHexCompact(...);<br />
public string CompacteBytesStr(...);<br />
public bool isComp(...);<br />
...<br />
}<br />
|
|
|
|
|
Is it possible to detect whether or not you are running from an NGEN'ed assembly or not?
I ask because as a side-effect of an NGEN experiment, I found that I can NGEN a running application without any problems.
Given that my assembly runs a bit faster NGEN'ed than not, I'd like to detect whether or not the .NET Framework has detected that my assembly is no longer NGEN'ed, and if it is not, NGEN it for next time the assembly is launched.
While the NGEN executable is able to detect whether or not your assembly has been NGEN'ed and does a quick exit if it has, I don't want to waste the cycles creating the process if I don't have to.
|
|
|
|
|
hi friends,
I have an existing crystal report with data (abc.rpt) in the server. I created a webfom in C# and if a link is clicked this report has to be displayed in the browser.It's working fine with the visual studio.net environment.
But i want to work this in the .NET frame work only.
I copied the application's .dll ,aspx pages and abc.rpt file to a system which have the .net framework installed.
I copied the CrystalDecisions.web.dll and CrystalDecisions.shared.dll to the bin folder.
When i clicked on the link in the aspx page, the error was "null reference exception-object reference not set to an instance of an object
CrystalDecisions.Web.CrystalReportViewer.OnInit(EventArgs e)".
1)Need i to copy any other dlls to bin folder?
2)Need i to register any controls?
Vipin k.mathews
|
|
|
|
|
Hello,
I want to establish the comunication between my application and the server in two diferent ways:
In one scenario, by compressing and encrypting the information. In the other one, only by executing a standard remoting call.
I thought to define two diferent tcp channels, but I don't know how to address the request through the right channel.
Any idea?
Thanks.
Ivan Fernandez
|
|
|
|
|
<sources xmlns="http://www.microsoft.com/ObjectSpaces-v1">
the question is how can i add the username and password. i've tried two methods:
1 Data Source=username:password@192.168.0.51
2 Data Source=192.168.0.51; user=username; password=password;
but neither of them works ,anyone can help me ,thanks!
P.S:The ObjectSpaces ,which i used,was published in 2002 and is in the namespace:Microsoft.ObjectSpaces
|
|
|
|
|
There is a blank area at the top of your post. Did you post XML or text containing <s and >s?
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
sorry!
Below is what i want to post:
I can't connect to the database which requires the username and password. The connect.xml which i used is :
source name="Example" adapter="sql" connection="Data Source=LocalHost; Integrated Security=SSPI; Database=Northwind"/
the question is how can i add the username and password. i've tried two methods:
1 Data Source=username:password@192.168.0.51
2 Data Source=192.168.0.51; user=username; password=password;
but neither of them works ,anyone can help me ,thanks!
P.S:The ObjectSpaces ,which i used,was published in 2002 and is in the namespace:Microsoft.ObjectSpaces
|
|
|
|
|
source name="Example" adapter="sql" connection="Data Source=LocalHost; Integrated Security=SSPI; Database=Northwind"/
you need:
source name="Example" adapter="sql" connection="Data Source=LocalHost;
User id=sa;password=pw; Integrated Security=; Database=Northwind"/
|
|
|
|
|
I'm trying to find a method for denormalising a unicode string. In other words I want to take a string that contains accented characters and split it up into the letter and the accent. For example:
ç becomes c + ¸ (the cedilla)
ñ becomes n + ~ (the tilde)
This is because I want to compare two characters but the comparison must be accent insensitive and case insensitive. So u==U==ú==Ú==ü==Ü for instance.
The Compare method on the CultureInfo class doesn't appear to work the way I expected. If there is anything in the .NET Framework that can do this then that would be the best solution.
Any help would be great, thanks.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
Just to answer my own quesion:
I need to use the invarient culture. See the following example:
using System;
using System.Globalization;
namespace AccentInsensitive
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
CultureInfo ci = CultureInfo.InvariantCulture;
string s1 = "aA eE iI oO uU";
string s2 = "áÁ éÉ íÍ óÓ úÚ";
for (int i = 0; i<s1.Length; i++)
{
string cmp1 = new string(s1[i],1);
string cmp2 = new string(s2[i],1);
int res = ci.CompareInfo.Compare(cmp1, cmp2,
CompareOptions.IgnoreNonSpace |
CompareOptions.IgnoreCase);
if (res < 0)
Console.WriteLine("{0} < {1}", cmp1, cmp2);
else if (res > 0)
Console.WriteLine("{0} > {1}", cmp1, cmp2);
else
Console.WriteLine("{0} = {1}", cmp1, cmp2);
}
Console.ReadLine();
}
}
}
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event[^].
|
|
|
|
|
Hi all
Is posible make AppBar using .NET ?
|
|
|
|
|
Do you mean under "AppBar" a special toolbar that can dock at any desktop edge ? In that case I see no reason why not. As far as I know, it basicly just a form-like control that is stretched to a desktop edge. The only problem could be how the desktop size is reduced (so that icons would not get under the appbar), I think that is managed through a Win32 API call (in that case you should be able to import the dll that contains the functions, and if not, just make it auto-hideable).
|
|
|
|
|
Yes. This is managed through a Win32 API call, but API demand special combination of windows styles and extended styles. If yuo make ToolBar look window from Form, and then take windw extended style, you got 0 (but need WS_EX_TOOLWINDOW)
|
|
|
|