|
tahir_makhdoom wrote: public Sub EnableStartMenuButton(byval bEnable as Boolean)
'
' Don't forget to re-enable it !
'
Dim lHwnd as Long
'
lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
Call EnableWindow(lHwnd, bEnable)
'
End Sub
public void EnableStartMenuButton(bool bEnable)
{
long lHwnd;
lHwnd = FindWindowEx(0l, 0l, "Shell_TrayWnd", Constants.vbNullString);
lHwnd = FindWindowEx(lHwnd, 0l, "Button", Constants.vbNullString);
EnableWindow(lHwnd, bEnable);
}
Converted using http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx[^]
|
|
|
|
|
Thanks
i have a little problem in importing a dll
public class()
{
[DllImport("WinLockDll.dll")]
private static extern int StartButton_Show_Hide(bool bShowHide);
}
The error is below can you tell me what i should do
Error 1 The type or namespace name 'DllImport' could not be found (are you missing a using directive or an assembly reference?) e:\NewRestrictionsc#\WindowsApplication1\WindowsApplication1\Form1.cs
tahir
|
|
|
|
|
Hi!
tahir_makhdoom wrote: The error is below can you tell me what i should do
You should read and try to understand the error message - it's all there already.
You're using the DllImport attribute, but this attribute is not part of one of the namespaces you've said you'd be using, so the compiler doesn't know where DllImport comes from.
You'll have to write the fully qualified class name System.Runtime.InteropServices.DllImport or insert a using System.Runtime.InteropServices; directive.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thankyou very much For sharing knowledge and giving good advices.May allah give you Success at every event in your life.
tahir
|
|
|
|
|
|
There are plenty of code converter tools out there. Some are good, and some are not.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I went through your article on Consuming .NET Web Services On Pocket PC. It was very descriptive. But the problem I face is as follows:
I am running Windows XP Professional SP 2 on my machine. Using Visual Studio .NET 2005, I created a Web Service and I am trying to consume it using another Windows Application. I am not able to connect to a webservice using ip address but able to do so using localhost. I would like to consume this Web Service using a Pocket PC application and hence it has to be accessed using the ip address of my machine.
Going through the forums, I tried disabling Windows Firewall and also my Virus Scan. Still it doesn't work.
Please suggest how to solve this problem.
madhavraj
|
|
|
|
|
How can i stop an Asynchronous call which is initiated with beginInvoke before it is completed? Calling endInvoke in the main thread does not work as it blocks the execution until the thread, which we started with beginInvoke , completes.
Zafer
|
|
|
|
|
There is nothing built into to .Net to do this for you. You would need use a ManualResetEvent[^] that is accessible from both your invoked method and the method you would like to stop the former. Basically, you need to code your invoked method so it is stoppable.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
I am developing windows application in which i need to send httpRequest to server and after that i hav to receive httpResponse from that so can any one help me out for solving this problem
|
|
|
|
|
dikshant@p-dd.com wrote: I am developing windows application in which i need to send httpRequest to server and after that i hav to receive httpResponse
Use HttpWebRequest and HttpWebResponse classes.
HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(Url);
HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
|
|
|
|
|
I am checking to see when a user moves their mouse but the problem is sometimes the mouse does not move and it thinks that it did. I think the mouse maybe really did move just one pixel so I want to ignore that mouse movement. Basically I am think that the mouse could move up, down, left or right 5 pixels from the original starting place and the system should think the mouse did not move. Can someone help me fix up my code?
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
// If mouseCoords is empty don't close the screen saver
if(!mouseCoords.IsEmpty)
{
// If the mouse actually moved
if(mouseCoords != new Point(e.X, e.Y))
{
// Close
this.Close();
}
}
// Set the new point where the mouse is
mouseCoords = new Point(e.X, e.Y);
}
|
|
|
|
|
You can create a Rectangle 10 pixels wide and 10 pixels high around mouseCoords and then use Rectangle.Contains() to check whether the current mouse position still is inside the rect.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
That sounds like a good idea, but I dont know anything about that. Can you help by providing any code examples?
|
|
|
|
|
Come on, that's not that hard.
You should read up the class documentation for Rectangle where you'll find the neccessary constructor and method to perform the task.
I really think it's a lot better if you come up with the solution yourself (with some help from CP) instead of spoon-feeding you with the complete code. (teach a man to fish...)
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
i was restricting start menu but i havent found any help about it. Is there any help or hint available from some one.
tahir
|
|
|
|
|
Where boss ?? Is that windows start menu that you want to restrict or your own application !!! ???
Thanks,
Arindam D Tewary
|
|
|
|
|
yes its the windows start button which i want to disable through my application.
tahir
|
|
|
|
|
Hi
I have used ZedGraph to draw sine wave . Now problem is when i run the .exe file..I get output sinewave already drawn over the graph...Whereas i want when i run the exe...It should start drawing the sine wave.
So how can i achieve this..Any hints ?
Thanks
James
|
|
|
|
|
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I think you mean you want to see the drawing slowly. When calculating the sinus values you should have a small delay in the for loop (like Thread.Sleep(50); ). So your code should seem something like;
<br />
for (...)<br />
{<br />
y= Math.Sin(x);
ppArray.Add(x,y);
<br />
zedGraph1.AxisChange();
zedGraph1.Invalidate();
<br />
Thread.Sleep(50);
}
|
|
|
|
|
|
Yeah, nice try, but script tags are automatically ignored by the rendering engine. Along with a bunch of other HTML tags.
|
|
|
|
|
Is this conversation cover me from cross-site scripting? (Especially in asp.net post forum pages)
< to & lt;
> to & gt;
& to & amp;
|
|
|
|
|
From the few keywords in your "question", this belongs in the ASP.NET forum. Though I have no idea what you're saying because your "question" doesn't make any sense.
|
|
|
|