First Run Detection In .NET?
Jul 6, 2009
I'm developing a webbrowser (how ussual!) named Hyvar.NET which utilizes the PhishTank database That database is updated once an hour and i need my application to download it on first run. DOWNLOADING it isnt the problem - detecting the first run of the day is.My downloader is set up and ready to roll, but im having heaps of trouble getting the program to determine if its the applications first run of the day or not - if it is of course it will download the database, load it and then continue to run as normal.
Edit: I've tried using the System.Environment class - it got me me nowhere (the loader is in the MyBase.Load [frmMain.vb])
View 6 Replies
ADVERTISEMENT
Jan 17, 2010
I've already got some code in my software that works for what i'm after, but with a small side-effect. Currently, the USB detection works fine and it also provides me with the drive letter of the newly inserted drive - perfect. However the CD detection also picks up when a memory stick is inserted and if say there was a CD in the drive, it would opt to play the disc instead of look for content on the USB stick. This seems to happen because the USB detection is slower than the CD detection.
I also have code that detects and cancels the autoplay request.
Code:
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
'initialized
[code]...
View 5 Replies
Aug 22, 2009
What is the best way for collision detection? I keep trying but I have failed every time.I want my player to not be able to go through my pictureboxes/obstacles from ALL sides.I have 2 player movement down but now I need collision detection. I am trying to save player2's location with a timer using a variable for the location then check if player2 (picturebox2) intersects with picturebox3. If it does then picturebox2 will go back to the location.
View 13 Replies
Nov 8, 2009
I need help with collision detection in visual basic. I am trying to detect when a picture box hits another picture box. The code I'm using is very simple because I'm very much a beginner.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Math.Abs(PictureBox2.Left - PictureBox1.Right) And Math.Abs(PictureBox2.Top - PictureBox1.Bottom) Then
MessageBox.Show("You Are Dead")
End If
End Sub
View 3 Replies
Apr 28, 2009
I am trying to do simple collision detection in VB.NET using picture boxes, I have a fixed picturebox, (colour Green), and a moving picturebox, (colour Red). I can manage the collision detection OK, but how do make the movingpicture box bounce off the fixed picturebox and at the right angle? In the following code the moving picturebox sometimes passes right through the fixed one, but not everytime.
ublic Class Form1
Private RedXSpeed As Single = 5
Private RedYSpeed As Single = 5
[code].....
View 1 Replies
Mar 2, 2010
Right, after reading a few threads here recently about overriding the ProcessCmdKey to use arrow keys I thought I'd try it and make a Space Invaders like game.
In a nut shell what I want is to be able to shoot and move at the same time. Let me explain a bit further, at the moment I can move fine - by holding down, say the right arrow key, but as soon as I hit the space bar to shoot, while holding down the arrow key, the movement stops. Of course, what I want is to be able to hit the space bar and keep moving.
I have thought of implementing a series of timers started and stopped by the key down and key up events but it sounds like overkill, is there a better way?
Anyway, the code for Protected Override of processcmdkey as it stands is below:
Code:
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
Select Case keyData
Case Keys.Right
[Code].....
View 5 Replies
Feb 23, 2012
Let me just start off saying that I'm generally new to all programming so if my coding is painful to read I understand. I am currently working on a project that relies on perfect or near perfect collision detection, and I'm not sure whats wrong but sometimes the object being moved completly passes through the object it is supposed to collide at. Here's my coding relating to collision detection so far:
[Code]...
Also, the object, toon, is set to jump with a timer at an interval of 45. Any input regarding how I could make the overall collsion detection better or if I didnt provide the right section of code let me know.
View 1 Replies
Jan 4, 2011
I am developing my project in VB.net. I want to get information of W7/vistHow can i detect them. My code is working properly with Windows Xp but not with PlateForm ID 6 versions
View 1 Replies
Dec 21, 2011
i have 3 PicBoxes on a form. PicBox1=sprite PicBox2=Block1 PicBox3=Block2 I have figured out sprite movement on key down and have figured out simple collision detection for all 4 sides of Block1. My question(s) are:
is there an ideal way to create a method that can be called to handle the collision for all future PicBox's added instead of writting code independently for each key press and each NewBlock along with all 4 sides of the NewBlocks?If I created 100 PicBoxes as obsticles too create a maze type game for my Sprite to navigate through?
[Code]...
View 1 Replies
Apr 7, 2012
I'm designing a system to detect whether a projectile arc impacts a stationary square target. However, the detection is very limited and only seems to work if I use a while loop and a very large area, whereas if possible I'd prefer to animate it using a for loop and have the target somewhat smaller.Here's what I have at present:
Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
If (Not errorState2) Then
[code].....
View 12 Replies
Nov 22, 2006
I am having problem with my FYP that my application is based on the detection of Insertion and Removal of a device. I am aware that this would happen using Win32_VolumeChangeEvent class or WMI. (Please notify me if I am wrong). Kindly solve this problem and send the code for Console Application in VB.NET. Please do not send code in any script language or C#. Also to get the device information.
View 6 Replies
Jul 28, 2011
scardgetstatuschange DOES wait(timeout is set INFINITE by -1) for card-insertion after connecting the reader-device to the pc. After a card is being insterted the first time and removed again, it won't wait any longer and returns immediately everytime;
lResult = SCardGetStatusChange(DethContext, -1, rgReaderState(0), 1)
So, scardgetstatuschange CAN work. But why only when i re-attach the cardreader-device to the pc????
View 3 Replies
Jun 18, 2009
I have a problem in detection edges in a picture. Im going to use this to make some recognition of pictures. I have found a way of doing Sobel filtering without the use of system.drawing.bitmat with BitmapSource.CopyPixels. I have posted code fore Sobel filtering here:
[Code]....
View 7 Replies
Mar 16, 2011
I have a function to do edge detection that works fairly good with one pass and without using a convolution filter. The only thing is that it will shift by one pixel the resulting image when I runt it from top to bottom and from left to right. I can live with that. Just a curious thing that I got when I ran it several times in a loop to see the effect of applying it several times on the resulting image.A deformed image appears at the beggining and then, bit by bit it splits appart and after shifting it the width of the original image I get a double image. I wonder how the computer keeps track of the first image and is able to separate the two after several iteractions.I know that in electronics you can have several signals in a circuit and you can separate them with frequency filters, or you can simultaneously download several files with the same modem aand the two computers will synchronize each one, but this surprissed me.
Here is a simplified version of my function
Private Function Preview(ByVal Thumb As Image) As Image
Dim bm As New Bitmap(Thumb)
Dim X As Integer
Dim Y As Integer
[code]....
I have tried with more complicated images and with larger sizes, but to make upload smaller I includes these two images of simpler and smaller size. A view of the GUI and an animation of the process:reload to see the animation.
View 1 Replies
Nov 7, 2011
I am currently working on a game with collisions. I am using a picturebox with an animated gif in the Image property. I am currently using the following function call to detect collision:
pictureboxPlayer.Bounds.IntersectsWith(pictureboxOfBadGuy.Bounds)
When an pictureboxOfBadGuy collides with some of the whitespace of my picturboxPlayer the above line returns true. Does anyone know if VB has detection for images within a pictureBox.
View 2 Replies
Sep 14, 2009
I am slowly getting my little RPG going - My issue now is working out how to allow the player to walk over sometiles and not other. The tiles for now are painted to the form by the use of a Select Case i.e:
Case "1"
Draw Grass
Case "2"
Draw Wall
I would like to know how to set it up - the tile can be passable or not i.e:
[Code]...
View 5 Replies
Nov 18, 2010
my advance project for the final semester of software engineering is an intruder detection system which is based on motion detection. I'm using a web camera in order to capture the images sequently and let them to process for further checking to see the difference.
first of all i want to know, is this possible in vb.net (image processing)? if it is possible, please give me some ideas about this to start.i have a brief imagination about the structure but i'm not sure about the success
View 4 Replies
May 22, 2010
I want to be able to do collision detection with graphics and a picturebox. I have a character that is moving on the screen and I have drawn both the background and the character using graphics. I have put a picturebox in place of the block that is suppose to be like a square which the character has to jump over. How would I do this?
View 6 Replies
May 29, 2010
I have two rectangles; a character and a block. The character is suppose to jump onto the block and then either jump off it or walk off it. I am really getting frustrated with this because I cannot get it to work.
View 9 Replies
Jul 1, 2010
I have two questions.
1- I have two labels on a form, that I want to move randomly in the form. How can I do that?
2- How to work with collision detection in VB?
View 29 Replies
Jul 1, 2010
I want my program to detect and do something when ToolStripMenuItem is clicked.
View 17 Replies
Mar 30, 2010
I have recently learnt vs '05 and am creating a project in vb.net '05.my question is-During project development, we connect it to MS SqL server 2005 express installed on my system and it works.( I use add datasource wizard,add sqldataadapter,add gridview control,generate dataset,connect dataset to gridview method). But after the project is finished and we create its executable, the project will be run on adiffrent machine with a different server name and hence a new connection string will be required.
How can i make my project detect server details and connect to it, at runtime ? because the user is only expexted to start the server and open my application.the app must connect to the new server on its own. If anybody has an answer or if you know some resource where i can find it, please post here. Any suggestions are welcome.
View 1 Replies
May 5, 2011
I am using the following method to detect the Caller ID when someone calls.
On form load I set the following code:
this.serialPort1.PortName = "COM3";
this.serialPort1.BaudRate = 9600;
this.serialPort1.DataBits = 8;
[Code].....
View 1 Replies
Jun 18, 2012
I am using a tab control on my mdi parent forms. when i open a child window i hide the tab control. but i want the tabcontrol to show itself on child close event. but i cant figure out the code.
View 2 Replies
Feb 2, 2010
Where I can find virus scanning/detection algorithms?
View 3 Replies
Feb 25, 2012
I'm trying ot make a top down rpg, or pokemon like game, but I can't find any proper tutorials for collision detection. I have found one, but when I did it it doesn't seem to work properly, and I get errors everytime I go to the edge of the form. What I can do to make good collision detection for walls?
HTML Code:
Public Class Form1
Public Level1 As New clsLevel()
Public Dude As New clsSprite(Level1)
Dim CanWalk As Boolean = True
[Code] ......
View 1 Replies
Aug 11, 2010
I have loaded two mesh's from .x files onto the screen, a map and a sprite. The sprite moves around, but because they aren't colliding the sprite goes straight through the mountains, and straight over the undulations. I have looked for a way to find the co-ordinates of a particular spot on the mesh, as I figured by finding the X and Z co-ordinates of the sprite, I could just set his Y co-ordinate to be the same as the map, and he would 'stick' to the ground... however I don't know if this is possible, and I haven't found it yet.
View 7 Replies
May 14, 2011
I'm having trouble with hit detection in a game i'm working on and can't seem to figure it out. I made another game before that also has hit detection and that works fine but when i tried to translate the code from that one to the Galaga game its doesn't seem to work the same.Heres my code, its all commented so you can see what you need.
Code:
Public Class GameForm
'Player Variables
Dim Direction As String
[code]....
View 2 Replies
Aug 21, 2011
I'm planning to create an application that counts the number of calls recieved based on the type of calls. For example: When a person gives a call an audio menu provides various options. If the person choose option 1 then the count value under option 1 will increment;If the person choose option 2 then the count value under option 2 is incremented, ect, ect,ect.
View 5 Replies
Aug 28, 2009
I'm using DirectDraw to create a (very) simple little movement game... (so far not really a game, but hey, gotta start somewhere) And I'm having a little trouble with my collision detection... ok, it's probably not conventional collision detection, but I'm just learning so far...I have a few surfaces set up etcetc, and have animated a sprite on a tile based background... but the problem is whenever I collide with a certain tile (which I've set as unpassable) from the top or the left, it screws the position of my player immensely... this is quite a headache as I can't seem to see a problem...
ps. Another thing, I can't seem to be able to open my pictures without using the entire directory.
View 2 Replies