The Timers based on System.Timers are multithreading timers, I can readBut if in my application I have two timers:1) Timer1 (based on Windows.Forms.Timers) that every 500 ms execute the program main code2) Timer2 (based on System.Timers) that every 1000 ms controls a secondary eventif in the Timer2_Elapsed event I insert the Thread.Sleep(30000)for 30 seconds ALL THE program stops, even the Timer1 controlled main code.
I'm making a blackJack Game for my programing class and at the Form Load it enables one of my Timers for me with out the code to enable it, and the I've checked the designer multiple times and its Enabled is set to False.I"ve tried Changing the name of the Timer and it still runs the code and I've even deleted the Timer and made a new one and it still runs it.
Private Sub GameInterFace_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Login.ShowDialog() If Login.Pass <> 1 Then[code]....
How to I run multiple threads in VB.NET? Say I need 2 threads - one that prints 100 numbers in a loop and the second one that asks for the user's name and prints it inside a message box.
It's easy to do so in objective c but I do not know how to do so in vb.net update:I know about control.invoke. But control.invoke requires a control that may change from program to program. What would be the easier way?So yes program is winform. However I need a solution that does not depend on any specific control. If that's the case actually I do not need things to be run on main thread do I?
In vb6,I wrote those code: statusbar1.text=Inet1.Open[URL]
In vb2008,it had statusbar,but it hadn't "Inet",I don't know how to change those code. ps:I'm a beginner,maybe this problem it's not a big problem,but I really don't know how to solution this problem,
We have an old large program generated using vb6. This has been running for years and it works great.We would like to migrate/ upgrade to vb 2008, is there any fast way to have it running under vb 2008?I loaded the project in vb 2008, it did load but generate a lot of errors and warnings. how can i migrate the vb6 codeto vb 2008 easily?
i want to create a basic calculator. i can create it in vb6. but when in vb2008. it have problem.. how should i do this?i just need help for + and - .. then other i can done it le... y i can use dim at vb6 but when i use in vb 2008 .. i can't use.. the array is same also... seem like quite different vb6 and vb2008...
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form1 Inherits System.Windows.Forms.Form
guys...good day to all just made a program for our company im not a programmer i just do a program because no one can do that cause im the only IT in the company i just made a program for concrete pricing the pricing is not constant so it will be change anytime and i have a form to which you can edit the price but the problem is everytime i close the program and then run again it will not update?
I have forgotten the right procedure to encrypt the VB2008 code with dotfuscator community edition, may you explain the way to use it (the dotfuscator) step by step?
How do I go about writing facial recognition code for a program I'm designing? I'm using Visual Basic 2008 Express Edition and I need to implement facial recognition into my software.
I am converting a VB6 program to VB express and am having a couple of problems. One of them is a difference in String use. "Result=string$(32,0)" doesn't compile and I tried the trim function, but when I cannot use the "0" with the trim function the program shuts down with the error "Argument 'Start' is not a valid value." I need to replace the "Result=string$(32,0)" with a valid vb express line.
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer) 'wheel = +-120 if wheel event, 0 in other cases 'added hoping to improve the code, but nothing changes, Hwnd is a global variable
I have 16 student machines who can not access the windows live login during the school hours due to filtering restrictions. They need to register Visual Basic 2008 Express Edition within 30 days or the product becomes useless. The registration process wants them to login to access the keys. Is there an alternative way to obtain the keys as a group, rather than one-by-one?Everything I've found redirects to the 2010 version, but the 2008 version works with our textbooks.
I'm trying to do what it says in the title. I don't even need to send a message body, just the subject will do. The full code with imports and references would be a
Is there an easy way to display the rgb code of system colors in VB2008?
That is, I am looking for some code that will retrieve the names of the colors that are used in the system colors and display their rgb codes (and maybe show a sample), so I could display, for example, what the rgb code for "control" is.
This timer code is for VB6 and worked fine, It's to change the timer seconds into minutes, I'm not sure how to make this work for 2008 though.
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 1000 ' set timer to 1 sec intervals. Timer1.Enabled = False ' timer is off End Sub
[code]....
the errors are...
Error1Name 'StartTime' is not declared. Error2Name 'MinutesToWait' is not declared. Error3Name 'StartTime' is not declared.
I come to programming from a school of functionality rather than theory- writing programs to meet a goal or solve a problem.I haven't had any education in computer science so many aspects of the Visual Studio world are alien to me.Just for fun I wrote a very small program to help with a computer game.It's called the All Lucky Sevens calculator for Final Fantasy 7.If you haven't played the game it won't make much sense to you so I'll eschew the logic of why I wrote it, focusing on what it does.
Basically it performs a series of percentage calculations on a number input by the user, trying to convert the original number into one that ends in 77. So 6104 reduced by 7% is 5677 The question is, how difficult is it to convert VB.NET code to work as a web-based app. I thought .NET was designed to make it easier to do this? Is it relatively simple to convert VB.NET code into something that can be run from a website? If not, the solution is to rewrite it in a different language like Java or Flash.The actual programming of it would not be difficult, but I do not speak those languages and it would require rewriting all the nested loops and ifs.Forcing VB to round down a decimal to an integer was difficult enough, I daren't think how hard it is in a language I've never used before.
Example: When you press "a" you want your program to automatically press again the same char you pressed. You know the e.KeyCode which is 65 for "a" and the command which is SendKeys.[code..]
Simple enough and it works for every character. But if you try it lets say with the Caps Lock button then the value of key is "CAPITAL"which means that the command will execute as follows: [code..]
Which will obviously send the text "CAPITAL" not the key "Caps Lock".The same thing happens with % (Alt) and Is there another way to press a key without using the SendKeys function?
Don't stay on this: When you press "a" you want your program to automatically press again the same char you pressed. Cause that is not what i want to do.
I just want to repeat a code block if a CheckBox it's checked...So, i'm very novice to programing in Visual Basic and i'm learning by myself doing little things like a Ping Tool.I have this code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = ""
I have a windows form that imports data from an xls file to sql2005. I have a browser button, a dropdown list for the sheet names in excel and a process button. Now the excel file has 3 sheets (sheet1, sheet2, sheet3) the columns and data type are not the same so I need 3 different queries to access this file,
I think about CASE, but not very sure, So if dropdown list.selectedvalue=sheet1 then run code
Is there any way to build a web based chat room application by using VB.NET as behind code and put it with ASP.NET on the web so users can login the account and start to chat without keep refreshing the browser or frame and have a real time transaction, I know that I have to use .NET.Socket namespaces, but don't know exactly how. I have seen many examples of windows based applications, but I need to know how to put it on the web.
I have a user control which is essentially a main menu I can place it into my MasterPage hard-coded, but I don't want that, I want to be able to dynamically place it with the code behind of the MasterPage.
What i am tring to do is execute certain code based on a variable held in a module someting like compiler directives, here's an example for lack of an explanation.[code]...
We have a Try/Catch block of code in our web application to trap a certain exception. What we want to do with this exception depends on the current time. If it is between 4:30PM and 3:00AM we will want to send an email, otherwise we will throw the exception.
Try 'Yada Catch ex as WebException Dim Time As DateTime = DateTime.Now
I am new to VB and I have two detail listviews with one full of items that can be droppedinto the other. I have three groups in Listview1 and I would like different forms to open up based on the group each dropped item belongs to. I was able to open Form2 on drop by adding Form2.Show() at the end of the ListView_DragDrop handler sub, but this opens forevery item and I want different forms to open depending on the ListViewGroup the item belongs to.I set the items and groups in the property windows and not in code; I do not know if this makes a difference. So here is the code I have on Form 1 where the listviews are:Public Class Form1
Private Sub ListView_ItemDrag(ByVal sender As Object, ByVal e As _ System.Windows.Forms.ItemDragEventArgs) Handles ListView1.ItemDrag, _ ListView2.ItemDrag