Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

IceWater42

@IceWater42
About
Posts
55
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Please please please please ...
    I IceWater42

    yes ... i agree it is ugly. I think by now i have tried ALL the ugly ways of doing it. That is why i posted the plea for help ... i keep hoping for a prettier solution. Through trial-and-error these past 2 weeks, i have seen the ugly side-effects of many of the researched "solutions" ... none of which were very User-Friendly. Add in the complications of 64-bit hardware with 32-bit DLLs and (for me) the task is daunting. That is why i posted my plea ... i was hoping that there actually might be a reasonably good way to do it, and that one of the very creative people here would show me how. Maybe there still is a glimmer of hope, thanks to the time and effort of FocusedWolf, below.

    C# help

  • Please please please please ...
    I IceWater42

    Thank you so very much for your code and time. The MakeLParam code is especially cool. The most valuable info was actually your side comment: :laugh: (i think i had code for sendinput and deleted it because while it worked, it required both focus of the window and ownership of the moues cursor) :laugh: ... as that indeed makes SendInput a deal breaker. I have tried SendMessage, and it did work, but as i recall it too had some undesirable side-effects ... hence the desperate plea. Once again, thank you.

    C# help

  • Please please please please ...
    I IceWater42

    ... please please please please give me a working code sample that uses SendInput to SIMULATE the movement of a mouse on a x64 vista system: 1. move mouse to screen location 200,100 2. mouse down 3. move the mouse down 12 (to 200,112) 4. mouse up it seems like such a trivial task but is clearly one that i have not been able to master. i have searched the internet high and low, found a gazillion articles on the subject, tried 9 different samples (all failed), and have spent a minimum of 100 hours on this problem. I've learned a lot but the idea of running 32-bit DLL's on a 64-bit computer is still way over my head ... i need help desperately. I have been able to get it to work using SetCursorPos and mouse_event but those methods actually steal the mouse from the user and make him VERY grumpy :) Thank you oh so VERY MUCH in advance!

    C# help

  • MouseStillDown?
    I IceWater42

    I'm told the 32-bit XP program used: ... int nRet = SendMessage(hWndC.ToInt32(), WM_GETTEXT, cap, buffer); but the original programmer does not recall why that did not work on the 64-bit Vista machine. Thanks Dave, I'll give WM_GETTEXT another try.

    C# help tutorial question

  • Omit selected tab and Dispose() Rtb
    I IceWater42

    oh .. hehehe .. guess you didn't need Yogi's help ... lol My favorite yogiism (though he says he never said it) is: "Nobody goes to that restaurant anymore because it is always so crowded" ... lol Good luck with your Disposal problem ... neither Yogi nor i can help you with that.

    C# question

  • MouseStillDown?
    I IceWater42

    My solution is arrogant and condescending? ... rofl I would LOVE to have a conventional solution if i had one. And i would love to explore ideas of the bright people here. But tell me how "I don't see why you'd need the mouse to do that; find a better way." helps in ANY way. How is it worth the electrons wasted to say it? I know it is a terrible approach but i was hoping the more knowledgable people here would offer a bit more than ridicule. Why would anyone EVER want to come here for help if THAT is the quality of the help they are going to get? The jerk owes me (and everyone else he talks that way to) an apology. Unbelievable.

    C# help tutorial question

  • MouseStillDown?
    I IceWater42

    LOL ... kludgy? ... no KIDDING! It does to me too. I would LOVE to have an alternative solution. What i don't think i need is your admitted arrogance. Please feel free to NOT help me in the future. Sorry to have wasted your time.

    C# help tutorial question

  • MouseStillDown?
    I IceWater42

    yes you did ... thank you. I'll try the 8b pointers if we can find the original program from whence that code came ... he chucked it. If not i'll write a simple pgrom to verify that the 8b pointers solves the problem. Thanks again.

    C# help tutorial question

  • SendInput Parameter error
    I IceWater42

    Thanks Luc. There is no question you are correct. I was aware of the 8b vs 4b difference. I guess what i don't understand is how 64-bit machines can run 32-bit DLLs. Why is it that the 32-bit DLL is not expecting 32-bit pointers? Sorry for delay in getting back here.

    C# help

  • MouseStillDown?
    I IceWater42

    I'm open to suggestions ... however, the SendInput that worked fine on a 32-bit XP machine no longer worked when recompiled on a 64-bit Vista machine. Dunnno why, but i suspect SendInput might be fubar on x64 machines. SendMessage and mouseEvents weren't great solutions either ... hence the fun stuff. btw ... your answer seems arrogant and condescending. I didn't realize that it was important to get your approval of my method before asking for help on how to do it ... shame shame.

    C# help tutorial question

  • Omit selected tab and Dispose() Rtb
    I IceWater42

    I'll let Yogi Berra help you with this one ... hehe "ps: stands for post script ... which is what you say after you are through saying what you said before you said what you said"

    C# question

  • How do i strip down a string to just show a user name in Active directory
    I IceWater42

    or you could try: int i = yourString.IndexOf(","); string s = yourString.SubString(0,i);

    C# com windows-admin question

  • MouseStillDown?
    I IceWater42

    In my background application, I want to "borrow" the cursor for a few microseconds and do some clicking and dragging (in an external application's textbox) in preparation for copying to the clipboard (that part works great), but it is uncool to steal the cursor from the user while he (for example) is in the process of moving or resizing a window as the result IS A MESS and generates some nasty language :-D . So i need to know if the User is currently using the mouse for ANYTHING in ANY other application just before i begin the fun stuff. I'd like some code that functionally looks like: ... while (MouseDown) Thread.Sleep(100); regardless of what application is active. Thanks very much for your time and help!

    C# help tutorial question

  • Cards Anyone?
    I IceWater42

    Has anyone been able to get Cards.dll to work on a 64 bit machine? If so, an example would be great! TIA, Roger

    C# tutorial question

  • SendInput Parameter error
    I IceWater42

    Billy reports error 87, "The parameter is incorrect" on my x64 machine. public struct INPUT { public int type; public MOUSEINPUT mi; } public struct MOUSEINPUT { public int dx; public int dy; public int mouseData; public int dwFlags; public int time; public int dwExtraInfo; } [DllImport("User32.dll", SetLastError = true)] public static extern int SendInput(int nInputs, ref INPUT pInputs, int cbSize); ... input.type = INPUT_MOUSE; input.mi.dx = 0; input.mi.dy = 0; input.mi.mouseData = 0; input.mi.time = 0; input.mi.dwFlags = 0; input.mi.dwExtraInfo = 0; SetForegroundWindow(hWndC); RECT textWindowRect = new RECT(); GetWindowRect(hWndC.ToInt32(), ref textWindowRect); // Put Cursor on 1st line of the text box input.mi.dwFlags = (MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_ABSOLUTE); input.mi.dx = textWindowRect.right - 30; input.mi.dy = textWindowRect.top + 2; resSendInput = SendInput(1, ref input, Marshal.SizeOf(input)); if (resSendInput == 0) { string errorMessage = new Win32Exception(Marshal.GetLastWin32Error()).Message; MessageBox.Show(errorMessage); } The error occurs on this SendInput. I know that the dx and dy calculations are correct cuz the following statement works if i substitute it for the SendInput: SetCursorPos(textWindowRect.right - 30, textWindowRect.top + 2); This is mi at time of error message: mi {MyBuddy.Form1.MOUSEINPUT} MyBuddy.Form1.MOUSEINPUT dwExtraInfo 0 int dwFlags 32770 int dx 251 int dy 526 int mouseData 0 int time 0 int The whole idea of running 32-bit code on a 64-bit machine boggles my mind. After messing with this for about 20 hours ... I'm getting a headache!

    C# help

  • LNK:2019 Link Error Using C++ to compile C program
    I IceWater42

    LOL ... <<huge BLUSH>> ... thanks for the 'o', Mark

    C / C++ / MFC help csharp c++ visual-studio debugging

  • LNK:2019 Link Error Using C++ to compile C program
    I IceWater42

    Am having difficulty getting C++ 2008 to LINK to the strcopy function. I get compiler errors on other function calls too, but they all get resolved by the linker .. all but strcopy. I am clueless .. here is the compiler/linker output. Thanks for looking. --Roger ----------------- 1>------ Build started: Project: GuessingGame, Configuration: Debug Win32 ------ 1>Compiling... 1>GuessingGame.c 1>r:\guessinggame\guessinggame\guessinggame.c(18) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(306) : see declaration of 'scanf' 1>r:\guessinggame\guessinggame\guessinggame.c(20) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(306) : see declaration of 'scanf' 1>r:\guessinggame\guessinggame\guessinggame.c(22) : warning C4013: 'time' undefined; assuming extern returning int 1>r:\guessinggame\guessinggame\guessinggame.c(26) : warning C4013: 'strcopy' undefined; assuming extern returning int 1>r:\guessinggame\guessinggame\guessinggame.c(39) : warning C4013: 'getch' undefined; assuming extern returning int 1>Linking... 1>GuessingGame.obj : error LNK2019: unresolved external symbol _strcopy referenced in function _main 1>R:\GuessingGame\Debug\GuessingGame.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://r:\GuessingGame\GuessingGame\Debug\BuildLog.htm" 1>GuessingGame - 2 error(s), 5 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    C / C++ / MFC help csharp c++ visual-studio debugging

  • FilePutObject assistance, please
    I IceWater42

    Hi ... i need a little help, please. This code works fine, but i'd like to convert it to use FilePutObject. Private Structure myFriend Public name As String Public age As Integer End Structure … Dim friendFileName As String = "R:\MyFriends.txt" FileOpen(1, friendFileName, OpenMode.Binary) Dim aFriend As myFriend ' Create a friend object aFriend.name = "Laura" aFriend.age = 29 FilePut(1, aFriend) ' Write entire structure to the hard drive What would be the FilePutObject equivalent of the last statement (above)? FilePutObject(1, aFriend) … does not do it Thanks.

    Visual Basic help question

  • RTB Redraw problem
    I IceWater42

    i am SOOOOOOO embarassed ... complete noobie mistake .. failed to assign the RTB: adding "ReminderRTB.Text = " to the front of these statements resolved the problem. <> ReminderRTB.Text.Remove(indexToDDD,remainingTimeStr.Length); // delete old stuff ReminderRTB.Text.Insert(indexToDDD, remainingTimeStr); // put in new stuff ... but thanks for trying to help!

    C# help question

  • RTB Redraw problem
    I IceWater42

    yes, i tried: ReminderRTB.Invalidate(); ReminderRTB.Refresh(); ReminderRTB.Update(); in many flavors and combinations ... lol i am beginning to wonder if there might be some property i have inadvertantly set that would prevent the redraws.

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups