Jump to content
Xtreme .Net Talk

Souma

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Souma

  1. lol threading eats cpu... ur idea also eats cpu... wat's the point :D yea i making my own macro program that do interval clicking on other applications buttons, so the first thing that comes to my mind is using thread.sleep to so call "pause" for a specific time between the next action. is there any other way? geez... if u ever played with macro programs(e.g. Macro Express, AutoIt, ACTool) you should know they have delay function to pause the action for a specified time... that's wat i wanted to achieve
  2. Yea thanks for the resource! mouse_event works fine anyway, but how can i fix the thread.sleep problem that causes my app to stop responding while the thread is running?
  3. Thanks! Wat i'm trying to do is not click any buttons on the form but clicking some other things outside of the application itself, so i need the mouse_event api Oh yea one more thing... when i use thread.sleep i cannot seems to do anything to the form (e.g. i can't press button to stop it). Is there any idea i can fix this?
  4. Imports System.Threading Public Class Form1 Dim counter As Integer Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If counter = 0 Or counter = Nothing Then counter = 1 Label2.Text = "ON" Label2.BackColor = Color.Lime Thread.Sleep(Integer.Parse(TextBox1.Text)) macro() Else counter = 0 Label2.Text = "OFF" Label2.BackColor = Color.Red End If End Sub Private Sub macro() Windows.Forms.Cursor.Position = New System.Drawing.Point(170, 340) SendMessage(&H2, 0, 0, 0) Thread.Sleep(200) SendMessage(&H4, 0, 0, 0) End Sub End Class Right now i can trigget my mouse to move by itself to the location i want, but i cannot trigger it to click and vs.net pop out an exception : PInvokeStackImbalance How to fix this guys? :confused:
  5. Is there a way to check if external hard disk is plug in? Coz what i'm trying to do here is, i'm creating a small app which protects the folder on the external hard disk. The app itself is on the external hard disk, so when non-authorized person try to access to the folder which is protected it will denied it. Main points: - The app is on the external hard disk - How do i code the part when user try to access to a restricted folder, the app runs itself and check for authentication (pass key, let say it prompt user). - Setting folder security attributes Guide me pls~
  6. Nope it didn't work
  7. tried, no cure
  8. It says it does not regconise it as an ActiveX component, help to resolve this? I did added it successfully before, but now can't.
  9. A few weeks ago i was using visual studio standard edition and i had an app which the labels and the form are transparent. Just today i upgrade my IDE to visual studio professional edition. When i debug and run my app, the form still transparent but the labels back color changes to white! I check out the properties the back color is set to transparent though.... How to solve this?
  10. Yes, that's what i wanted. I guess i'll just hav to find a way to download adobe
  11. No~ in the first link the image is smooth edge right whereas in the second link the image sort of like pixelated edge. How can i achieve that result?
  12. Is there anyway or any program that converts an image like this to this in pixelized form? Simple, it take a jpg image and convert it to pixelized form of the jpg image.
  13. In the first form, u declare ' This is the variable u wanted to be used by other form(s) Public Shared myVal as Integer In the next/other form(s), u need to have the following ' So that u can use the variable u declared in first form Dim firstfrm as new FirstForm firstfrm.myVal = 2
  14. Any idea how to make my form always active regardless of what window i currenly viewing? E.g. Even if i'm viewing IE now, the form also can be seen and not send to back of the IE
  15. I found one particular problem in ur implementation, it's not ur fault but the following codes: Dim t As DateTime t = Now.AddMilliseconds(150) Do Application.DoEvents() Loop While t > Now eats up 99% of my CPU, is there anyway to improvise it? The attachment come with it might be clearer for wat i'm doing. DeskPet_V0[1].1.zip
×
×
  • Create New...