|
but this is what i want, i want it to change the cursor position on the server, first i thought web services doen't call any Invoked win32 API function, so i tried to call the method that calls this Win32 API function
int flg;
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( out int Flags ,int Reserved);
public static bool Connected()
{
return InternetGetConnectedState( out flags,0);
}
this method returns true if the computer (the server in my case) is connected to the internet otherwise it returns flase..
I called the WebMethod from the client App that calles Connected() and it worked. it returned true and when i disconnect it returns fales
so why this method workes normally but the other method doesn't work, and if i have to give the Webservice some extra permeations, how can i do that
|
|
|
|
|
I'm going to recant my last statement, to a point. I don't think it's a permissions problem, but rather the fact that the Web Service is just that, a service. It doesn't have a desktop, a visible one anyway, to set the mouse cursor position on. Since it's running under IIS, you can't use the same techniques you can with a normal service to set it up for interaction with the visible desktop.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
A friend of mine needs some help with some custom controls for his current project, and I've offered to help him with this. I've just found an article here at codeproject that shows how to export C# controls as ActiveX object, which is great, since then I might use C# to help him out... but it's proven to not be all that easy. I've registered the controls using the "Register for COM interop" check box in the property sheet of the C# project, and I'm able to instantiate at least one of the controls in tstcon32. The program crashed when I tried to instantiate the other controls, but I'll look into that later. The problem is that his project is coded using Borland C++ Builder 6 which doesn't list my controls as registered ones. And I'm not able to add them as one would with other activex controls since there's no OCX file generated when the C# file is compiled... Is it possible to fix this in any way? Or will I have to make the controls in C++??
|
|
|
|
|
I dont know if i was just looking in the wrong place on MSDn for that or if it isnt what i need. I am at the point where i can open the browser from my app, but then i want it to find an html form field such as
<input name=user type=text>
and put some data in it
then find the
<input type=submit value=find user>
and "click" it.
is that something the HTML post can do? i mean i know it should be able to be done, i just can't find where to look to find out how. i hope i've cleared this up, does anyone know what i'm looking for????
|
|
|
|
|
Yes the POST reply is what your looking for,
It might be the case that you don't need to open a browser at all, if you just need to fill out a form.
Have a look at the WebRequest[^] class.
|
|
|
|
|
Hi
i am trying to split a URL by using Uri Class
for the urlhttp://mysite.com/vdoc/index.asp[^]
when i check isFile property of Uri class,it returns false, same is for
http://mysite.com/vdoc/[^]
though it should return TRUE for first URL?
kindly help me
MyBlogs
http://weblogs.com.pk/kadnan
|
|
|
|
|
ok I just checked it returns True when it finds addrss scheme inform of File://
what i want to extract the non-file part from a url so that i could use it for further processing
for instance if there is a url like http://site.com/abc/efg/file.ext
i want to extract BOLD part from the Url,i could split w.r.t / and then check each chunk whether its a file or not,but i was looking for some built-in method for such task,Uri was working fine unless i encounter above mentioned problem
MyBlogs
http://weblogs.com.pk/kadnan
|
|
|
|
|
Hello Developers,
I want to create a rotated font, and I use the following code to achieve this, like in this sample (http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_fxsamples/html/7c8b073b-5889-45e7-9a99-ebee39fe3b79.asp[^]), but using 1.1 framework.
Font CreateRotatedFont(int angle, Graphics g)
{
LOGFONT lf = new LOGFONT();
// scale a 12 point font for current screen DPI
lf.Height = (int)(-16f * g.DpiY / 96);
lf.Width = 0;
// rotation angle in tenths of degrees
lf.Escapement = angle * 10;
// Orientation == Escapement for mobile device OS
lf.Orientation = lf.Escapement;
lf.Weight = 0;
lf.Italic = 0;
lf.Underline = 0;
lf.StrikeOut = 0;
lf.CharSet = 0; //LogFontCharSet.Default;
lf.OutPrecision = 0;//LogFontPrecision.Default;
lf.ClipPrecision = 0;//LogFontClipPrecision.Default;
lf.Quality = 5;//LogFontQuality.ClearType;
lf.PitchAndFamily = 0;//LogFontPitchAndFamily.Default;
lf.FaceName = "Tahoma";
return System.Drawing.Font.FromLogFont(lf);
}
Am I doing something wrong in this code, or maybe someone did similar code once?
Thank you!
|
|
|
|
|
|
Yes thank you, this is ok for beginning, and I used this method.
But what if I need to draw each letter of the word with different angle?
My thought was to create a number of fonts(30,45,60) degrees and draw each letter with such font. What do you think?
Thank you!
|
|
|
|
|
I made a simple control which has some additional fields and properties and inherits from Label. I also override the OnPaint method. The control has a border, which has a color and thickness. If I set the boreder thickness to 30 pixels, I don't see the first lie of text. Is there any way to make the control show the text inside the border? I know I can draw the string in the OnPaint method, but I want the base OnPaint to draw the string becouse it can center it, wrap and so on. Pls help!
|
|
|
|
|
No,
The base class doesn't know that you've drawn to the surface, once you start doing custom drawing your taking responsibilty to do all of the drawing (unless it doesn't interfer with the base class drawing).
|
|
|
|
|
Hi!
I have been making some .net controls lately which I have tried to expose as ActiveX controls. Exposing them and registering them went smooth, but now I'm trying to access them from unmanaged C++. How should I do this? I expect I'll have to define a C++ interface so the compiler knows how to interpret the pointer to the interface, but how should I make it?
|
|
|
|
|
My understanding of this is that when you expose a .NET assembly to the COM world, the compiler will generate the necessary COM interfaces for you.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
Well... it does.. that is.. it generates the necessary code, but it doesn't generate any headers.. And I'll need a header with these definitions to use the code in C++ don't I?
|
|
|
|
|
|
Hi every body,
I want to generate a random number between 0 and 30,000. How this can be done in C#.
In C, it is like this.
int Random = rand()%30,000;
Could any one please help in this regard.
thanks a lot.
|
|
|
|
|
|
Random random = new Random();
int randomNumber=random.Next(30000);
/\ |_ E X E GG
|
|
|
|
|
Hi...
I have a richtextbox, it has about 200 lines, and i want to go to line 125 when i press a button!
I have made this code...
int count = 0;
int GoTo = 125;
for(int i = 0; i < GoTo; i++)
{
count += richTextBoxText.Lines[i].Length;
}
richTextBoxText.Select(count,0);
but this does not work.
My idea was to get all chars from the lines until it reached 125, and then go to the line using the select method.
Can anyone help me how to do go to a line in a richTextBox?
Thanks
QzRz
|
|
|
|
|
RichTextBox.Lines won't return the number of lines in the box that are due to word wrapping, but rather, it will return the number of lines due to new line breaks (Environment.NewLine) in the text.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
I am with a problem in a program to which I am elaborating and I wait that they help me.
In the program a button will be pressured, it must send the information to the other program that keyboard key ENTER was pressured.
In this another program keyboard key ENTER has a definitive function.
This is the logic, however my only one doubts this in:
As to determine that the keyboard key was pressured, being it for the program and not for the keyboard.
|
|
|
|
|
I don't think anyone here understood your question. Could you explain it better? what do you want to do? differentiate when the Click event of the Button was raised because of the user actually clicking the button or because the user pressed the Enter key?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Sorry my English is bad, more one day I learns to speek correctly. XDD
In the game, when pressuring keyboard key ENTER, open the Console. I have code of send information, what I need is simple, when pressuring the button in the program that I am creating, it will send the information that keyboard key ENTER was pressured, however I do not know to define that this keyboard key in specifies was pressured.
Thank you, for your attention and patience.
|
|
|
|
|
So, you want to simulate the Enter key being pressed when the user Clicks on your button?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|