15,913,758 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by MasterCodeon (Top 152 by date)
MasterCodeon
9-Jan-15 10:31am
View
ah i understand now.
thank you.
MasterCodeon
9-Jan-15 10:19am
View
it works great thank you.
i so i guess that the error resulted from me trying to put the contents on what the DownloadStringAsync method's return value(which is void i think) into the string right?
thank you so much!
MasterCodeon
6-Jan-15 11:51am
View
i know how to do the social engineering part of the prank, i just don't know how to do the technical part of it.
MasterCodeon
6-Jan-15 9:22am
View
ok then how would i do this with a client app running on the other machine?
and i promise this is just a prank.
MasterCodeon
5-Jan-15 19:29pm
View
no i am not trying to write a virus, i am trying to play a prank on someone(i am trying to make the other person think this is a virus, and freak out).
couldn't you use explorer.exe to execute commands?
MasterCodeon
2-Jan-15 11:12am
View
oh ok thanks i have already done so.
MasterCodeon
2-Jan-15 10:58am
View
i do believe i have found the file(or files) that are the problem.
i looked at the log file in the debug folder and it said:
Creating library Debug\GlobalCbtHook.lib and object Debug\GlobalCbtHook.exp
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
MasterCodeon
2-Jan-15 10:51am
View
oh and how do i send the author a message?
MasterCodeon
2-Jan-15 10:50am
View
true i will give it a try.
MasterCodeon
2-Jan-15 10:45am
View
ah ha! i went into the debug directory and looked at the GlobalCbtHook.log file and it said:
Creating library Debug\GlobalCbtHook.lib and object Debug\GlobalCbtHook.exp
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
so i think the problem might lie in one or both of these files that it list
MasterCodeon
2-Jan-15 10:43am
View
well i am running windows 7 64-bit and i am running this in a RDP session
i think this is relevant info
MasterCodeon
2-Jan-15 10:42am
View
i don't need to do a file search because i see a bunch of files named "GlobalCbtHook" one has a vcproj extension and another has a vcxproj extension and another has a cpp extension so it could be any one of them
MasterCodeon
2-Jan-15 10:34am
View
what file is "LINK GlobalCbtHook"?
i can't find it in the directory the error message is talking about.
MasterCodeon
2-Jan-15 10:33am
View
A. i don't see the "new message" button.
B. i don't think this is a problem on the author's end i thinks is something i am doing wrong, maybe its some stupid checkbox i didn't check in VS. this is why i am posting here.
MasterCodeon
2-Jan-15 10:30am
View
ah ok missed that sorry.
MasterCodeon
2-Jan-15 10:22am
View
what else do you need to know?
MasterCodeon
2-Jan-15 9:40am
View
yeah but keep in mind i am only going to be using this for personal use only so if i want to store my own windows profile password in my app it wouldn't be a problem because no one else would be seeing it
MasterCodeon
2-Jan-15 9:38am
View
i reason this:
if hackers can physically destroy your machine from anywhere in the world(and keep in mind that machines they are destroying are running windows which has all this claimed security) why can't i do i much more simple task of unlocking my computer from a background app?
MasterCodeon
2-Jan-15 9:33am
View
well what if i ran this app i am proposing as a service in the lock desktop session?
MasterCodeon
31-Dec-14 16:23pm
View
so how would i do this?
like i said in the post, based on what i have read i will need to use a windows credential service and will have to run this app as a srevice in the background
MasterCodeon
31-Dec-14 16:18pm
View
the secondary purpose is to learn how to do this.
the way i have learned all that i have learned is, i come up with an idea and then i learn how to implement my idea.
as regards to how interesting this is, its very interesting to me at least.
MasterCodeon
31-Dec-14 15:59pm
View
i do believe i would have to run a background service to do what i am asking right?
MasterCodeon
31-Dec-14 15:48pm
View
just the local computer.
and this is just for my personal use, yes i do understand the security issues with that but this is only for my personal use, not for a professional environment.
MasterCodeon
31-Dec-14 15:43pm
View
i would like an app that is running in the background to trigger the unlock
MasterCodeon
31-Dec-14 15:42pm
View
i had for automation purposes.
think of this scenario:
its 12:00, lunch time. I want my app i am making to lock my pc and after an hour(or whatever amount of time i specify it will then unlock the computer automatically. that way, come 1:00 i don't have to type my password and log back in, my app will do that for me(i am kind of lazy that way)
MasterCodeon
31-Dec-14 8:57am
View
ParentFormHanlde is a local variable that i set like this:
ParentFormHandle = ParentHandle.ToInt32();
MasterCodeon
31-Dec-14 8:53am
View
oh sorry i did call base.WndProc.
i am updating it now
MasterCodeon
30-Dec-14 11:52am
View
ah ok thanks
MasterCodeon
30-Dec-14 9:38am
View
why should i use a using statement?
MasterCodeon
29-Dec-14 13:18pm
View
your post is crystal clear to me, i understand it.
i tried your first suggestion of creating a new stream and disposing of the old one. but when i did my memory usage still climbed every time i clicked the key in the app. this is what i don't understand.
i have a felling that this problem might not be related to the MemoryStream at all, or it could be i just don't know.
MasterCodeon
29-Dec-14 13:14pm
View
i am really sorry i'm not getting this
MasterCodeon
29-Dec-14 13:10pm
View
ok, i reread your solution and the first suggestion seems like i would just Dispose or Close the Stream and then open a new one and all the data in the old one would be gone.
so maybe i just am not doing something right, or the MemoryStream isn't my problem.
i have done this(this referring to me using the Dispose/Close Methods every time i am done with the stream) that already but when i was watching the process in Task manager, the memory usage still climbed every time i click a note on the keyboard.
and as regards to your first suggestion, i found the Write method in the MemoryStream class its just i don't know how to use a byte[](i think its called a byte array) parameter.
and when i say "directly write something to a MemoryStream" i mean use the Write method to write something to the stream
MasterCodeon
29-Dec-14 13:01pm
View
oh and just to let you know, i have already tried to use the Dispose and Close methods with no success
MasterCodeon
29-Dec-14 12:58pm
View
ah.
i don't know how to directly write something to a MemoryStream.
i am using the classes the author of the article i linked to write sound data to the stream.
so how would one overwrite the data in a memory stream with nothing?
also i do know how to set the streams write position to 0
MasterCodeon
29-Dec-14 12:50pm
View
what do you mean when you said "initialized to empty data"?
MasterCodeon
26-Dec-14 16:51pm
View
ah i didn't realize that he was using the MouseHover event(making a huge face palm because i could have figured that out from the name of the method)
sorry
MasterCodeon
26-Dec-14 14:41pm
View
wow this works perfectly(once i did a few modifications)!
what was i doing wrong?
MasterCodeon
26-Dec-14 13:46pm
View
well not exactly, but i am getting there take a look at this post i made: http://www.codeproject.com/Questions/857130/Csharp-Problem-With-My-Current-Word-by-Word-text-S?arn=5
MasterCodeon
25-Dec-14 13:27pm
View
you have a very interesting idea with your code i am currently thinking up an idea of how i would implement this.
thank you.
and every time i post a question i do still try to come up with a solution for the problem not just wait for some one to answer.
thank you for all of your help.
MasterCodeon
25-Dec-14 13:23pm
View
i have setup 2 variables, one a string variable to save off the last spoken work and 2 a integer variable to save the last start position of the selection. so thats my start.
i just don't know how to change the back/forground color for only a certiant length of text not just selected text(i don't know how to unselect anything.)
MasterCodeon
25-Dec-14 13:02pm
View
and i have updated my code(not in my post) so that when the TTS operation starts it sets the RTB's ReadOnly property to true and when the SpeakCompleted event fires it sets the RTB's ReadOnly property to false(i am getting pretty good at using events).
MasterCodeon
25-Dec-14 13:00pm
View
ok i don't really under part C of step 1 could you elaborate a little more
MasterCodeon
25-Dec-14 12:58pm
View
you didn't offend me about mention Christmas.
and yes i am in a place where i can work on this by.
MasterCodeon
25-Dec-14 12:44pm
View
1. i don't celebrate Christmas
and, i am sorry to hear you have no grandparents living.
and 2. the text in the RichTextBox does not change(i mean technicality it can because you can type in it but, i would assume the user would be reading or following along with the TTS speech, i will be fixing that right now) while the TTS operation is running. i just want to highlight the current word that the TTS opp is speaking.
MasterCodeon
25-Dec-14 12:27pm
View
sorry for the long delay in the reply, i was talking on the phone with my grandfather
MasterCodeon
25-Dec-14 12:26pm
View
oh yeah everything that is not highlighted has a Black forground color and a white background color
MasterCodeon
25-Dec-14 11:06am
View
could you please explain more.
MasterCodeon
25-Dec-14 11:02am
View
huh?
MasterCodeon
25-Dec-14 10:45am
View
oh ok, and your solution was relevant at the time you posted it, thats why i accepted it. it was also very helpful to(in the sense that you showed me a much simpler way to do a counting operation in a separate thread).
MasterCodeon
24-Dec-14 13:23pm
View
oh i wasn't trying to judge your post.
it was great and was well done.
its just that i didn't really solve the problem of cross-threading calls.
thank you this does help me to understand better how my class works though.
thank you
MasterCodeon
24-Dec-14 12:01pm
View
yeah thats the problem that i had with this solution
MasterCodeon
24-Dec-14 10:10am
View
i updated my post with the latest version of the "ManualThread" class.
it also has clearer comments.
MasterCodeon
24-Dec-14 9:58am
View
you see its like this:
an event fires in the "ManualThread" class, that triggers a method in the "ManualThread" class. Then that method that was triggered tells the class that holds the winform app to run a specific method(that is in the winform class)
this is what i want to do.
the poster of the article i read did this in VB so i know its possible, i just don't know how to do it.
MasterCodeon
24-Dec-14 9:53am
View
yeah i could easily wrap that in a class
MasterCodeon
24-Dec-14 9:52am
View
what i don't know is how the "CountCompletedEvent"(which is in the "ManualThread" class event is supposed to fire the "CopyFiles_CountCompleted"(which is in the winform class) method which does runs the BeginInvoke method.
what is not clear is how i am supposed to invoke a method not in the "ManualThread" class but in the winform class.
MasterCodeon
23-Dec-14 14:37pm
View
ok I have read your post on the Invoke vs. BegineInvoke.
i still don't get it
i am trying to use a BeginInvoke statment like this:
private void CopyFiles_CountCompleted(object sender, EventArgs e)
{
//Handles CopyFiles.CountCompleted
//BeginInvoke causes asynchronous execution to begin at the address
//specified by the delegate. Simply put, it transfers execution of
//this method back to the main thread. Any parameters required by
//the method contained at the delegate are wrapped in an object and
//passed.
this.BeginInvoke(new ManualThread.CountCompleted(ThreadOperationCompleted));
}
private void ThreadOperationCompleted()
{
txtSpoken.Text += "It Worked!";
}
but i don't understand how the "CopyFiles_CountCompleted" method is supposed to be ran when the "CountCompletedEvent" is fired.
i think i have to make the "CountCompletedEvent" event fire this method right?
if so how would i possibly do that?
i am sorry that i am not getting it (i can be kind of thick headed sometimes)
MasterCodeon
23-Dec-14 13:59pm
View
i know the basics of how to use create and use a thread.
but how do i use the Invoke method to call the "CountCompletedEvent" on my UI thread?
MasterCodeon
23-Dec-14 13:34pm
View
can you take a look at my post i have updated it
MasterCodeon
23-Dec-14 12:49pm
View
oh and as regards to the background worker thing, read my comments in the original post.
i have already explained this to Bill
MasterCodeon
23-Dec-14 12:48pm
View
yeah i don't have an event handler for the event and i don't know how to setup one.
and i have already tried this and it didn't work for the fact as like you said there is no event handler so it will be null when it reaches the if statement.
so this doesn't really help, but you telling me that "It will be null if no handler were attached to it." that explains why the event is null.
thanks you for your help.
MasterCodeon
23-Dec-14 12:28pm
View
and yes a BackgroundWorker does meet my needs.
you see i like to learn how to do challenging things first and then learn the simpler things Like for example: if i can master using threads directly then using BackgroundWorkers will be easy as pie. this is how i learn when it comes to programming.
(I hope you understood that because i have explained this to other people and they didn't get it because this is a very different way of thinking.)
MasterCodeon
23-Dec-14 12:23pm
View
i am very good at using BackgroundWorkers but i am not so good at using threads.
i know the basic concepts of both of them but i am not really good at implmenting those concepts when it comes to threads
MasterCodeon
23-Dec-14 12:19pm
View
i have considered using a BackgroundWorker but i wanted to use threads because of A: i would learn how to manipulate threads and how to be able to work with them in. B. how a class is properly constructed(this is an area i have been having a really hard time with) C. using threads is more flexible than doing this the easy way and using a BackgroundWorker. so in short i am trying to do this the hard way because its more flexible and i will learn a lot from this method.
and what is a "Task Library"? i have never heard of that.
MasterCodeon
19-Dec-14 16:21pm
View
wow why couldn't i have found this article when i actually needed it?
this article has explained mutlithreaded applications in a way that seems soo simple to me and i get it!
man that would have been nice a while back
MasterCodeon
19-Dec-14 16:17pm
View
a BackgroundWorker is a control you can find in the toolbox in the designer, if you didn't know.
MasterCodeon
19-Dec-14 16:16pm
View
here is an article i found on codeproject that might be of big help:
http://www.codeproject.com/Articles/16174/Multithreading-Backup-Utility
and also you might try using a BackgroundWorker
MasterCodeon
19-Dec-14 16:15pm
View
Deleted
here is an article i found on codeproject that might be of big help:
http://www.codeproject.com/Articles/16174/Multithreading-Backup-Utility
and also you might try using a BackgroundWorker
MasterCodeon
19-Dec-14 16:09pm
View
sorry i meant to say: so if you know how to, try running your Copy operation on a separate thread.
MasterCodeon
19-Dec-14 16:07pm
View
that might be it but it also might be the fact that you are doing the file copy on the same thread as the application it self.
i had that same problem when i would use the System.Speech to do Text to Speech.
the UI would freeze up until the program stopped speaking.
so i asked how to fix it here and the answer i got was that i had to use the SpeakAsync method instead of the Speak method.
this is due to the fact that SpeakAsync will run the TTS(Text To Speech) operation on a different thread than the UI(or sometimes called the Winform, Application) thread.
I looked and there is no CopyAsync methods so of you know how try running your Copy operation on a separate thread.
MasterCodeon
19-Dec-14 15:54pm
View
and are you using the System.IO.File class?
MasterCodeon
19-Dec-14 15:51pm
View
well right before the line of code that uploads your file to the server set the "FormEnabled" variable to true
MasterCodeon
19-Dec-14 15:36pm
View
well anyone?
MasterCodeon
19-Dec-14 15:35pm
View
oh and if the solution works for you click the green accept button to mark this thread solved.
MasterCodeon
19-Dec-14 15:12pm
View
ah ok.
i have never seen an iPhone update but i do know how to disable all the controls in a from at will, would that partially solve your problem?
MasterCodeon
19-Dec-14 14:58pm
View
oh and does the progress bar have to move?
MasterCodeon
19-Dec-14 14:56pm
View
could you post the code you used to do the uploading to the FTP server(without the username and password)
MasterCodeon
19-Dec-14 14:41pm
View
yeah eh the in window CMD session was just a bonus
thank you.
MasterCodeon
19-Dec-14 14:40pm
View
can i see the solution.
i am curious how you did it.
MasterCodeon
19-Dec-14 14:08pm
View
yeah blender(if you want to see what i am talking about get blender here:
blender.org) has a interactive python window(this is the window where you type test commands and so forth) and blender also has a debugging console, this is where blender prints all the errors in python scripts and stuff. also when i do the cls command in the interactive python console it clears the debugging window not the python console.
i would think that would be part of the reason why it didn't work, another part might be that blender has a built in version of python, it doesn't rely on a external installation of python (as you can see i am pretty good with blender, i have been working with blender for about 3 years).
MasterCodeon
19-Dec-14 13:52pm
View
the code snippet the OP posted int his question looks like it might help:
http://www.codeproject.com/Answers/277721/How-I-send-lots-of-image-in-a-file-to-ftp-server
MasterCodeon
19-Dec-14 13:51pm
View
i looked around on code project and found that the answer probably lies in the System.Net.FtpWebRequest class.
MasterCodeon
19-Dec-14 13:46pm
View
if i where you i would also put the name of the path\name of the file into a variable.
i did it like this:
Dim SelectedFile As String = myFile.FileName.ToString()
Note: i put this at the bottom of your code snippet.
MasterCodeon
19-Dec-14 13:34pm
View
well i would first declare your username and password for your FTP server
MasterCodeon
19-Dec-14 13:22pm
View
if you want to, you can improve your question and out the VB code tag around your code to help everyone see it better
MasterCodeon
19-Dec-14 13:20pm
View
hey quick tip: when you post something its easier for everyone to see your code when you wrap it in a language specific code tags. just click the code button and click the language that you are inputting
here is the tag you would use for VB:
<pre lang="vb">Put your code here</pre>
MasterCodeon
19-Dec-14 13:15pm
View
huh strange, i tried opening a CMD session in blender and it opened CMD in a new window not in the debugging or the python console(yes there is a difference) eh any who the clear command work for the debugging console(which is the console i wanted to clear) thank you again!
MasterCodeon
19-Dec-14 11:35am
View
by the way when i said "due to my system admin, he/she" he/she means 2 people
--clears throat-- just for clarification.
MasterCodeon
19-Dec-14 11:25am
View
oh and what is a "VT100"?
MasterCodeon
19-Dec-14 11:24am
View
i have no idea what this would even entail though but if/when you add more i might understand.
MasterCodeon
19-Dec-14 11:23am
View
ok cool, thanks.
MasterCodeon
19-Dec-14 11:20am
View
all i have to say to that is COOL!
i have i large number of ideas of what i could do with a CMD session in a python console.
i can't wait to try this!
MasterCodeon
19-Dec-14 11:19am
View
i was thinking i would have to use the print() function because the print() function prints what ever the you specify to the destination you specify, and if the destination parameter if nothing it will print the string to the console.
so i was thinking i would have to send some kind of clear all command to the console(blender's built in python console has a function to do just that)
i didn't realize that wasn't possible with print
good to know
Thanks again,
MasterCodeon
MasterCodeon
19-Dec-14 11:14am
View
but thank you for your input anyway.
MasterCodeon
19-Dec-14 11:14am
View
sorry i cant't go to any links other than here on codeproject(this is due to my system admin, he/she has all the net blocked except a handful of links(Microsoft, MSDN and codeproject being a few necessity's)
MasterCodeon
19-Dec-14 11:11am
View
huh, so if i replaced the 'cls' with 'start' (or whatever CMD command i wanted) and use the correct arguments i could open a new CMD window or what ever i specified right?
and if i could open a new CMD window would it open it in the python console or would it just open up in a new window?
nevertheless very cool,
thank you for your help
ProgramFOX, i shall have a much easer time debuging python scripts now
Thank you.
MasterCodeon
19-Dec-14 11:05am
View
ah thank you i was wondering how everyone else does that
MasterCodeon
19-Dec-14 11:05am
View
thank you very much for the solution though
MasterCodeon
19-Dec-14 11:00am
View
wow that seemed kind of complicated in my first comment
uh what i meant to say is what goes on under the hood with this command(I know what the import os does though)
MasterCodeon
19-Dec-14 10:58am
View
i will be trying this in about an hour(its 12:00 noon for me in an hour) by the way.
MasterCodeon
19-Dec-14 10:57am
View
also when ever you post a solution or a question how to you get the commands you wrote to be in bold dark red?
MasterCodeon
19-Dec-14 10:57am
View
how does this work?
i mean i know what cls does in windows but how would running that command on a python console work, i would think the 2 would be incompatible.
MasterCodeon
18-Dec-14 12:44pm
View
ok i shall do so, but the last question asked on the article was june of this year so i don't think i am going to get a response anytime soon.
thanks for your help,
MasterCodeon
MasterCodeon
18-Dec-14 12:08pm
View
yeah i know the general programming concepts but what i don't know is some types that are specific to C++ like in the GetMessage doc(http://msdn.microsoft.com/en-us/library/windows/desktop/ms644936(v=vs.85).aspx) one of the parameters is a LPMSG type which i have o idea what that would equate to in C#
when i get the chance i will have a look at the 2 pinvoke.net links.
thank you for all of your help.
MasterCodeon
18-Dec-14 12:05pm
View
i tried to go to the pinvoke.net links but my admin has them blocked.
i will ask my admin to unblock them when she gets the chance to do so.
MasterCodeon
18-Dec-14 11:28am
View
i have already seen the comments from the article and tried some of them but none helped
MasterCodeon
18-Dec-14 11:22am
View
i have tried the demo app from the article that i was trying to use and it didn't work.
when i clicked the button to initialize the hook it would say it activated the hook but it wouldn't receive any messages(maybe i don't quite understand what the hook does? or what kind of messages its supposed to recive?)
so whats going wrong?
MasterCodeon
18-Dec-14 11:17am
View
i found the article you where talking about but how would i get all the messages that applications are sending(like Spy++ but using a Global Hook)
the article works for my by the way.
thank you!
MasterCodeon
18-Dec-14 10:56am
View
what in the world is it?
MasterCodeon
18-Dec-14 9:41am
View
oh and the documentation explains how to use it but they explain it in C++ not C#. and i don't know almost anything about C++ so i don't understand all of the parameters and the types(some parts look like gibberish to me)
MasterCodeon
18-Dec-14 9:38am
View
sorry for the bad spelling(i am bad at spelling)
MasterCodeon
18-Dec-14 9:36am
View
by the way i think you don't need the @ symbol in the @"User32.dll" line, i think you just need "User32.dll"(this should work just fine)
MasterCodeon
18-Dec-14 9:31am
View
well i figured out that i am going to have to use the GetMessage method to receive the hot key message but how do i use the get message method(sorry i don't know how to code in C++ so the parameters seem very confusing to me)?
MasterCodeon
18-Dec-14 9:29am
View
oh no inconvenience i was just cirious
MasterCodeon
17-Dec-14 15:59pm
View
i have added a solution check it out
MasterCodeon
17-Dec-14 15:50pm
View
oh he he funny, i get it. so what does it really mean then?
MasterCodeon
17-Dec-14 15:47pm
View
why is the term Opponent used here anyway?
MasterCodeon
17-Dec-14 15:35pm
View
ok why does everyone keep calling me OP?
what does that mean?
MasterCodeon
17-Dec-14 15:31pm
View
oh and also how do i tell if the hot key has been pressed?
i cant go to the second set of links(not because there dead its just on my end)
MasterCodeon
17-Dec-14 15:30pm
View
how do you use the UINT fsModifiers parameter in the RegisterHotKey method?
i want to use the CTRL and the ALT Modifier code how do i use more than one code in the same paramater?
MasterCodeon
17-Dec-14 14:04pm
View
oh i was just posting a general message, sorry for the mix up
MasterCodeon
17-Dec-14 13:53pm
View
huh? what do you mean? i have setup my profile to not send me notifications.
MasterCodeon
17-Dec-14 13:34pm
View
Anyone Got Any More Ideas?
MasterCodeon
17-Dec-14 12:13pm
View
True but what about minimizing the app or Bringing it to the front with a keyboard shortcut?
MasterCodeon
17-Dec-14 10:03am
View
wow thats a way better idea than mine thank you so much!
MasterCodeon
16-Dec-14 16:52pm
View
i have updated/modified my question take a look
MasterCodeon
16-Dec-14 16:36pm
View
oops i meant to say "i saw"
MasterCodeon
16-Dec-14 16:35pm
View
yes i say thats great.
it works like a charm thanks!
MasterCodeon
16-Dec-14 16:33pm
View
thank you this works so much better.
i though about trying to get the bounds of the form but i idn't know how to do that thanks for all of your help.
MasterCodeon
16-Dec-14 16:30pm
View
oh yikes, its complicated to me at least i would hate to see what a complicated problem would look like
MasterCodeon
16-Dec-14 16:29pm
View
ok sorry i say a user who has a simalr user name and avatar picture
here is the site i was talking about http://blenderartists.org/
MasterCodeon
16-Dec-14 16:27pm
View
uh i don't know how to find what version of C# i am using but i know i am using Visual Studio 2010 and the .NET Framework 4.5(but i know the .NET version has nothing to do with C# version)
and is the second snippet supposed to be a void, is it supposed to be public private what?
sorry for being such a newbie when it comes to this
i have worked with python for 2 years and a couple of years before that my dad started to teach me C# and just recently i picked up C# again(but i am doing pretty good at it so far, or at least i know the basics.)
MasterCodeon
16-Dec-14 16:15pm
View
ah yes that clears things up.
yes i do see ctrl {Text = "button2"}
but for the first button i have its:
ctrl {Text = "Test Button"}
thanks for the explanation.
MasterCodeon
16-Dec-14 16:09pm
View
and yes i can see that this is a very complex question that i asked
MasterCodeon
16-Dec-14 16:08pm
View
Oh and you wouldn't by any chance be a user on BlenderArtist forms would you?
because if so i have funnily enough asked you questions related to bge programming(my user name is SGA)
MasterCodeon
16-Dec-14 16:05pm
View
I get the first part but when i try to use the second code snippet VS gives me 12 errors
could you explain a little more i don't get it
sorry i am kind of a newbie
MasterCodeon
16-Dec-14 15:50pm
View
ok so what happens with this loop is that for each control in the "Controls" property of the form the local variable "ctrl" is always the text of the control. So if i had a control that had the text "Test Button" the value of ctrl would be "Test Button" but the button that says "Test Button" has a name of "button1" not "Test Button" so the loop is trying to get the button in the form named "Test Button" when there is no button named that.
sorry if this sounds complicated or if you can't understand this (i have come to learn not by you but by my own experience that i tend to over complicate things)
MasterCodeon
16-Dec-14 15:41pm
View
no not really i don't have any child control(unless you count buttons on a context menu strip) but the only events i want to subscribe to are the "MouseEnter" and the "MouseLeave" events, so i am pretty sure all of my buttons, list boxes, text boxes and labels will have those events.
And my foreach loop that i have does not work.
MasterCodeon
16-Dec-14 15:31pm
View
i want to know how to iterate through all controls of a form, and for each control in the form, subscribe to an event linked to the (whatever the name control is that i am currently accessing in a foreach loop) on the form.
MasterCodeon
16-Dec-14 14:42pm
View
If you have time check out my next question http://www.codeproject.com/Questions/854113/Csharp-How-To-Subscribe-To-An-Event-For-Each-Contr
MasterCodeon
16-Dec-14 14:18pm
View
Oh and i am not using the using the "Fill" setting for the Dock property on any of my controls.
MasterCodeon
16-Dec-14 14:10pm
View
Yeah the timer does start when either event is fired I just didn't realize it did (he he oops)
Moreover, as far as modifications go I only switched out the names and used the designer to do the event handling of the timer.
I also have another question about this, why doesn't this work for all the buttons and other controls as well?
because when ever I put my mouse over the background of the form it will fade to and fro like it’s supposed to but whenever I put my mouse over a control(like a button or a textbox) it won't fade to or back.
I reasoned that I should subscribe to the MouseEnter and the MouseLeave events for each control in the form using a foreach loop:
<pre lang="c#">
foreach (Control ctrl in this.Controls)
{
ctrl.MouseEnter += new System.EventHandler(this.Form1_MouseEnter);
ctrl.MouseLeave += new System.EventHandler(this.Form1_MouseLeave);
}
</pre>
(Sorry if the code doesn't display properly in the comment, I don't know comments can use the C# code tags)
Now this doesn't work quite right because when I use this loop it still doesn’t fade in and out for all the controls in the form.
How do I fix that?
Thanks for all your help again
MasterCodeon
16-Dec-14 13:19pm
View
ah thank you so much!
i opened a new winform project and i had to change the timer name and i had to subscribe to the MouseEnter and MouseLeave events, and i had to start the timer on the Form_Load Method but with those few little modifications it works!
thank you so much!
MasterCodeon
9-Dec-14 13:16pm
View
good to know.
sorry for the newbie question(if you haven't guessed i am a newbie at C#)
MasterCodeon
9-Dec-14 13:03pm
View
Yes it works!
thanks for all of your help everyone.
MasterCodeon
9-Dec-14 13:03pm
View
It works thanks!
MasterCodeon
9-Dec-14 13:01pm
View
ah ok, giving it a try now.
MasterCodeon
9-Dec-14 12:55pm
View
What do you mean by "escape the path string" Richard?
do you mean use 2 \\ in stead of one?
MasterCodeon
9-Dec-14 12:52pm
View
I already have a reference, and i have converted the VB if statement to the added code in the post.
MasterCodeon
26-Nov-14 9:48am
View
thanks that really helped.
i am posting the code i used to get the article text as a new solution
Thanks for everyone's help!
MasterCodeon
25-Nov-14 12:04pm
View
Oh and by the way it worked like a charm thanks again!
MasterCodeon
25-Nov-14 12:04pm
View
Could you send me the source for that text to speech article you did(i can't access the link)if you could that would be great because i need a way to speak the selected text not just all text.
if you can just send me a PM with it or something.
please and thank you.
MasterCodeon
24-Nov-14 16:12pm
View
could you elaborate please.
Show More