|
(unless you are providing the web service rather than just connecting to it as a client).
thanks for your interest.
my web service on the a web site(www....com.tr/service/service.asmx).
please you write a short sample code with c# for this work(for windows application).
|
|
|
|
|
This normally is not done in code (and can't be done on just the client side). The owner of the web service would have to configure the web service to listen on port 21, and the client would have to query on that port. If you are implementing web service code using C# and .Net 3.0 (servicemodel namespace), the just modify the endpoint addresses in the configuration files or code for both client and server (replace :80 with :21 in the endpoint address).
|
|
|
|
|
Hi,
I need start IE in new window without addressbar, status bar but I cannot use kiosk mode (I need defined window size).
I need to know the processID of the IE process also.
Im using this code now:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE";
p.StartInfo.Arguments = "http://google.cz";
p.Start();
int pid = p.Id;
It starts the new IE window and returns its PID, but I don't know, howto hide address bar, status bar and so on..
Then I tried this approach:
System.Type oType = System.Type.GetTypeFromProgID("InternetExplorer.Application");
object o = System.Activator.CreateInstance(oType);
o.GetType().InvokeMember("menubar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });
o.GetType().InvokeMember("toolbar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });
o.GetType().InvokeMember("statusBar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });
o.GetType().InvokeMember("addressbar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });
o.GetType().InvokeMember("Visible", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { true });
It starts IE window without address bar, status bar.. but I don't know, howto find processID of this instance..
Please help..
Regards,
Petr
|
|
|
|
|
I may not understand the question but can you not just embed the webbrowser object onto a new form and then display the new form?
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
Thank You for this good idea, but I cannot use it.
I need start the webbrowser as a selfstanding application and not as a part of my programm..
Petr
|
|
|
|
|
Then make an app with th WebBrowser and use Process.Start
|
|
|
|
|
And howto do it please?
Thanks Petr
|
|
|
|
|
Make a new .NET windows forms application and then embed a webbrowser object in the form by dragging it from the toolbox.
If you need any buttons etc it would be quite trivial to offer back, forward, stop etc.
Once this app is complete you can start it from your main app.
Hope that helps.
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
Hi, thank You, it's very good idea and I can use it..
Petr
|
|
|
|
|
Your Welcome
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|
|
I am writing a simple raytracer in C# as a way of learning the language - but have run into a problem:
I have a parent class called "Primitive" which has an "Intersection" function.
I have multiple child classes, for example "Sphere" which overwrite the "Intersection" function with "new public Intersection... etc..." as their intersection methods are all quite different.
This works fine for single instances - but when I create an arraylist of primitives, such as Spheres and Planes, and the iterate through them with a foreach like this:
ArrayList PrimList = new ArrayList();
Sphere sphere = new Sphere ();
PrimList.Add (sphere);
Plane plane = new Plane();
PrimList.Add (plane);
foreach (Primitive p in PrimList)
{
i =p.Intersect (x);
}
This will always use the parent intersect function and not the appropriate child function. :/
I think it's because the Spheres are being recasted to Primitives by the foreach function....
Is there a way around this such that the correct intersection method is used?
|
|
|
|
|
bobmitch wrote: This will always use the parent intersect function and not the appropriate child function
That is because in the derived classes you have used the "new" qualifier on the method declaration which tells the compiler to hide the implementation. The reference to the base does not know about your "new" implementation.
You need to declare the method as virtual on the base, and override on the derived classes.
public virtual Intersection()
{
}
...
public override Intersection()
{
}
|
|
|
|
|
Class A{...}
void main()
{
Object o;
o=new int();
o=new String();
o=new A();
}
What will o eventually point to?
if eventually o point to A, then what happen to int and String object?
Thanks in advance
|
|
|
|
|
loke6258038 wrote: What will o eventually point to?
An instance of class A
loke6258038 wrote: if eventually o point to A, then what happen to int and String object?
The garbage collector will eventually get them.
|
|
|
|
|
Hi everybody,
I work with big XML files and i want to free up the memory after a have finished working with one file.
If i set the reference of the XmlDocument to null the memory will be free from the GC. But how can i free the memory immediately when i don't need any more the reference?
Thanks.
|
|
|
|
|
Noemi Katinka,
Call "thing.Dispose()"
Regards,
Gareth.
|
|
|
|
|
how big are these files ? You'd have to force GC, which is usually a bad idea, and can mess up memory management in general in your app. XML files are just text, there's nothing to Dispose.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Don't mess with it. Let the garbage collector do its job when the memory is needed. You can cause more problems running a garbage collection manually by ending up promoting other objects to higher generations.
|
|
|
|
|
You could use an XmlReader to parse through the document without having to load the entire document in memory. I've found this useful when loading records from very large XML files (i.e. 100Mb and above).
|
|
|
|
|
I have a DataReader that was working until I changed some code around, now it just skips over the While(reader.Read()) loop for some reason.
OleDbConnection oleDbConnection = new OleDbConnection(str2);
string strCom = String.Concat("select Unit from Units where Unit=\'", strUnits, "\'");
OleDbCommand oleDbCommand = new OleDbCommand(strCom, oleDbConnection);
OleDbDataReader HpReader= null;
oleDbConnection.Open();
HpReader = oleDbCommand.ExecuteReader();
while (HpReader.Read())
{
if (strUnits == "Length")
{
comboHD.Items.Add(HpReader.GetString(0));
}
else if (strUnits == "Velocity")
comboFV.Items.Add(HpReader.GetString(0));
else if (strUnits == "Kinematic viscosity")
comboKV.Items.Add(HpReader.GetString(0));
}
HpReader.Close();
oleDbConnection.Close();
|
|
|
|
|
The Read method returns false if there are no records. Check the results of your command externally. And because I am a pedantic A&* you should really be consistent in your variable naming casing.
(I would focus on the value of strUnits as it seems to be a good candidate for the empty results.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
string strCom = String.Concat("select Unit from Units where Unit=\'", strUnits, "\'");
changed query:string strCom = String.Concat("select Unit from Units where Unit="\", strUnits, "\"");
use changed query it will work.
|
|
|
|
|
I have contacts A, B, C
A is related to B
A is related to C
B is related to C
Data Base table are
Contact(IDContact)
ContactRelation(IDContactRelation, IDContact(FK), IDRelcontact(FK))
then I wanted to show this relationship diagramatically
please somebody provide me solution for it
rasana
|
|
|
|
|
Sure, I accept credit card payments from my website.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|