To make this short and simple, I'm developing a program that goes full screen but cannot allow the user to close or Alt-Tab out of it. The program is responsible for giving out tests that teachers create for various students and, to deter cheating, I was going to have the program block attempts to close it (I have that figured out already) and stop Alt-Tabbing out of it.
I looked up SetWindowsHookEx, but I was never good with PInvoke's and my attempts to get it to work have resulted in nothing.
This is my current
<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function SetWindowsHookEx(ByVal hookType As HookType, ByVal lpfn As HookProc, ByVal hMod As IntPtr, ByVal dwThreadId As UInteger) As IntPtr
I have a string that can be anywhere from 1 to 8 digits long of which each character is a hex number (0-9, A-F) and each character isn't necessarily unique. I need to calculate all possible combinations. Is there a specific term for this type of calculation or combination? I need to learn how to write a program to "calculate" all the possible combinations.
I created a form and have the variable inputs for 4 motor run statements. Then with a start button the script starts and it is surrounded by a for next statement to loop 10 times. It works fine but if i need to stop the execution of the script with a stop button. I put the stop in a new section but of course does not work to do a motor stop. It just causes the exe to not respond till the loop is complete. Just need to be able to stop the Run1_Click button section.
Edit:I do not mind if it finishes the 4 motor run commands and then stops execution of the loop. So need to figure out a way to trigger a stop from a button on the form to stop the cycle. For the future the loop will be a variable integer input so 10 will not be the standard.
Edit::Does a ' Do ' statement sound like the thing to use? If so how and where would I place that? Have a Stop button on the form and it would stop after the 4th motor run command.
#End Region Declare Function InitStp Lib "stp.dll" () As Integer Declare Function RunMotor1 Lib "stp.dll" (ByVal steps As Integer, ByVal interval As Integer, ByVal direction As Integer, ByVal outputs As Integer) As Boolean
I have a START and STOP button and when the user clicks "start" the program does a whole bunch of calculations and all. However, I noticed that when I was testing the program I clicked STOP the program continues to execute stuff.
My START code is basically a while loop that iteratively does some calculations.
So I just put a boolean variable as the while condition and when user clicks stop its set to false and when user clicks start its set to true. However, when I click stop, the condition is set to false yes but it still executes all the code until the condition is re-evaluated right...so my question is how can I get out of the while loop when user instantly clicks "stop"?
how to write Mercurial hooks in a .NET language, including how to setup .hg/hgr
I have used the "Mercurial.Net" Api, but the information in the Windows environment variables is a bit limited and returning error messages on the standard error channel does not appear to work. I guess I am doing something wrong.
I am using .Net for a number of reasons , one being to link up with other systems using WFC
I need to write an application that works in background.I'm writing my application in vb .net, but I don't know how to intercept system hooks by using .net classes.I know that there are windows apis such as SetWindowsHookEx, etc, but I just wondering if there is a way to use .net classes or methods such as WndProc.I tried to use it, but it works only if the form has focus active. My application must work in background.
I have never written a hook before. Can anyone point me in the right direction of good tutorials to get starrted on hooks. I'm looking to write something so when a user right clicks on a file, they have an option to copy the path and filename of that file to the clipboard.
I have been trying to build an application for which I need to set low-level keyboard hooks. I thing I am trying to accomplish is that when I press the key "a" I want windows to think I have pressed the key "b". But the problem I am facing is that when I press key "a" it produces "ab". I am providing my code below.Also I would like to know how to detect double and triple key presses (e.g. shift + a and ctrl + alt + b). [code]
I'm developing an VB.NET application which utilizes a webbrowser control. The browser control needs to navigate to a simple page which prompts the user for their user name and password. However, this prompt is not simply a web form, but it is a completely new dialog window. I need a way to automate filling in the username and password in this dialog by using locally stored credentials, so that there is no interruption in the webbrowser control's navigation. The only information that I have been able find so far that might be useful in solving this problem, involves using windows hooks in the user32.dll to intercept and negotiate with these windows at a low level.
I am wanting to find out how to use the Win32 hooks to allow me to add extra save locations to the save and open dialog box so as to allow as an option for files to be saved directly to a database rather than a file system.I have tried looking online but can't find anything remotely usable for this, the only data on hooks that I can find involves Window operation hooks, mouse, leyboard, and shell hooks, nothing to do with files.
I have a sub routine that connects to a database. If the database is unavailable it takes about 45 seconds to timeout, even though I used connect timeout=10 in the connection string.
So I figured I would try using a timer. This is how I have it Private Sub SQLConn() Timer.start() SQL.Open() Timer.stop() Private Sub Timer2_Tick (this is where I need to put a command to stop the sub SQLConn)
I have the timer set at 10 seconds. Unless there is a better way to do this what command can I use to stop the connection or the sub?
I want simply to generate rapidly combinations of 16 take by2 using linq.So I want to display me the combinations only not arrangements:1,2 (not 2,1 because there are combinations)...1,16 2,3 (not 3,2) because they are combinations..2,16..Comb of 16 take by 2 makes 120 so 120 combinations will be displayed on screen.[code]So my question is how to display rapidly on screen the combinations of 16 take by 2 using this Enumerable class of Visual Basic .NET(the 120combinations in fact)
How can I write all possible combinations to the console? For example, if user enters abc, then it will write aaa, aab, aac, abb, abc, acc, bbb, bbc, ccc.
Here's some code:
Dim abc() As String = {"a", "b", "c"} ' Sub Main() Console.WriteLine("Enter the amount of characters")
I think what I'm trying to do is considered a permutation but I could be wrong. I've come across several examples of how to permutate a string as follows:
Permutations of {A B C}: {A B C}, {A C B}, {B A C}, {B C A}, {C A B}, {C B A}
What I'm needing are results similar to this (using the same input) with a repeat of each item to create a list of all possible combinations: {A A A}, {A A B}, {A A C}, {A B A}, {A B B}, {A B C}, {A C A}, {A C B}, {A C C}...and so on.
Below is some code that I found that almost gets me there with an exception of the repeated values:
'Generates all possible combinations from a series of words Public Function PermutateString(ByVal input_string As List(Of String), Optional ByVal Base As String = "") As List(Of String) Dim i As Long
I am using VB 2010 , I have a loop that takes something like 5 minutes until it's finish. I want to allow the user the option to stop it in the middle or whenever they want. There's a button which starts the loop, and after I click it the loop starts running and the button is sort of "stuck".I saw something called "background work" in the VB Toolbox, can it be a solution to my problem?
I am compiling and running code at runtime. Can I 'stop' this code midway through if I wish? Like the 'stop' feature in Visual Studio that stops the code if desired
How can I bind a key combination to my vb.net application? I know it has SOMETHING to do with the registry, but I have no earthly idea what or how to go about doing this. I want the user to be able to hit those keys when the app is open and have it execute my function, but not while the app is closed.
I am trying to generate all possible 3 or 4 digit combinations from 0 to 9. I will be outputting them to a text file but I just need help with actually generating them.
I am writing an application in which we have a Product Module, Now instead of defining individual products, we want to just state the Size Ranges in Width, height and different size scale available, and then automatically generate a list of products with all the Size combinations. I cant figure how to do this.Ill give an example.This is how we define a product
Product[code].....
If i had a fixed number of Size types i would just run For loops within for loops and inside the inner most for loop write an Add Item statement with Index of evry selected item, however since the Size types are dynamic, i need to write a recursive loop, and i just cant figure how to.
My task is to develop a Control library (VB 2005) in which u enter a variable in textbox (>=1 , <=5). Lets say you enter "3" then u have too see in table all combinations of boolean numbers for 3bits (000, 001, 010 .....etc). If you enter "4" the table have to be different (0000,0001,....etc) with 16 combinations.
Alright, so I'm still working on the slot machine. I have three timers all independently going for my three "wheels" of the slot machine.
My issue, is that I'm trying to make a Stop button to stop each timer one at a time, and I'm not understanding why this code isn't working. The logic completely makes sense, and the first "wheel" stops when I click the button, however, it doesnt appear to stop the other two timers.
Ive come to do a question about windows media player look Im trying to make a program which if you make a certain input which he is going to request to you then I want to play that video but I have no idea how to use windows media player controls to manipulate that video. [URL]..
I loaded up VS 2010 to work on a VB.NET project but for some reason the Run/Pause/Stop buttons are missing from the toolbar and I cannot set breakpoints. Only changes from yesterday to my system was this morning Windows was trying to install Visual Studio SP1 updates but all failed.
One of my forms has a few textboxes that are required. If I try to use an if/then statement, the form shows a message box stating the error but then continues and eventually crashes because the textbox wasn't filled out. How to I make the program stop what it's doing if the box isn't filled out?
I have 3 text boxes that update with each other. One the user inputs the text, two the text is used for translation and instantly deleted, and three displays the translated text. If I need to backspace the code updates the translation adding double of each letter I delete. I need a way to skip all of the application code every time the backspace key is held. My current code here (full dictionary cut to save space).
Public Class Form1 Public Sub RichTextBox3_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown If e.KeyCode = Keys.Back Then [Code] .....