|
i am creating pictureboxes with images on a panel at runtime & now i want to copy those pictureboxes to another panel in vb.net,how to do it.pls tell me the code for copying not moving them.thanks in advance
parag
|
|
|
|
|
Guys, I have this project that i've deployed and then i needed to do some changes to the code..no matter what, the code keeps ignoring any changes i've done and act as the deployed code!
HELP
|
|
|
|
|
How have you deployed your project?
What do you mean by code changes? You deploy compiled assemblies where you cannot change the code...
|
|
|
|
|
what i meant is, after the deployment, any changes to the original source code won't apply!
|
|
|
|
|
|
Well that's the weird thing, ANY changes to the original source won't apply..i re-compiled so many times but it keeps acting as the old code would!
It's like a fix code!
I don't get any compilation errors tho't
|
|
|
|
|
Are you sure you are using the correct binaries? I mean, the new assemblies do actually have the current date/time on them? The only thing I can think of is that you are getting the assemblies from an old directory, or you are looking in Debug or Release, when it is compiling to the other.
Have you tried deleting the bin directories in your project then getting it to rebuild the whole solution? That way at least you know that the files in the bin directories are new.
If it isn't any of the above, then I am not sure what it could be because I have never come across anything like this.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
also make sure that after u have compiled ur project u rightclick on ur setup project and select rebuild option.
if problem still exist try to remove the setup project from the projectlist and then add a new setup project.
Hope it will work.
Computer... Programming... What That
|
|
|
|
|
how to find the key ascii values of the buttons preseed in vb.net? THANKS
THANKS
|
|
|
|
|
use keypress or keydown event
if u want to get the code at form level don't forget to set the keypreview property of the form to true.
Computer... Programming... What That
|
|
|
|
|
I was wondering if there is a way to show animated Gifs in the program. If so what controll should i use to hold the Gif? Any help would be greatly accepted.
Thanks in Advanced
|
|
|
|
|
Im in the same problem, please help!
|
|
|
|
|
Hi.
I'm trying to play an .AVI file from a .dll, but the mmioInstallIOProcA fails.
It returns NULL (eg. error)
The code is:
In module:
<br />
Declare Function mmioInstallIOProcA Lib "winmm" _<br />
(ByVal fccIOProc_4 As String, ByVal pIOProc As Integer, ByVal dwFlags As Integer) As Integer<br />
<br />
Public Function AsAny(ByVal obj As Object) As IntPtr<br />
Dim MyGC As GCHandle = GCHandle.Alloc(obj, GCHandleType.Pinned)<br />
'get address of variable in pointer variable<br />
AsAny = MyGC.AddrOfPinnedObject()<br />
End Function<br />
<br />
Public Const MMIO_INSTALLPROC = &H10000 'mmioInstallIOProc: install MMIOProc <br />
Public Const MMIO_GLOBALPROC = &H10000000 'mmioInstallIOProc: install globally <br />
Public Const MEY = &H2059454D 'This is the value of "MEY " run through FOURCC <br />
<br />
<br />
In form:
<br />
<br />
Public Delegate Function IOProc(ByRef lpMMIOInfo As MMIOINFO, ByVal uMessage As Integer, ByVal lParam1 As Integer, ByVal lParam2 As Integer) As Integer<br />
<br />
Public Structure MMIOINFO<br />
Public dwFlags As Integer<br />
Public fccIOProc As Integer<br />
Public pIOProc As Integer<br />
Public wErrorRet As Integer<br />
Public htask As Integer<br />
Public cchBuffer As Integer<br />
Public pchBuffer As String<br />
Public pchNext As String<br />
Public pchEndRead As String<br />
Public pchEndWrite As String<br />
Public lBufOffset As Integer<br />
Public lDiskOffset As Integer<br />
Public adwInfo0 As Integer<br />
Public adwInfo1 As Integer<br />
Public adwInfo2 As Integer<br />
Public adwInfo3 As Integer<br />
Public adwInfo4 As Integer<br />
Public dwReserved1 As Integer<br />
Public dwReserved2 As Integer<br />
Public hmmio As Integer<br />
End Structure<br />
<br />
In function:
<br />
hInst = LoadLibrary("C:\test.dll")<br />
hRsrc = FindResource(hInst, "#101", "AVI")<br />
hGlobal = LoadResource(hInst, hRsrc)<br />
lpData = LockResource(hGlobal)<br />
fileSize = SizeofResource(hInst, hRsrc)<br />
<br />
Dim IODlgPro As IOProc<br />
IODlgPro = AddressOf myIOProc<br />
<br />
Dim res As Integer<br />
res = mmioInstallIOProcA(MEY, AsAny(IODlgPro).ToInt32, MMIO_INSTALLPROC + MMIO_GLOBALPROC)<br />
Error comes here.... returns 0
<br />
'Play the AVI file <br />
res = mciSendString("open AVI.MEY+ type avivideo alias AVI parent " & ParentHandle & " style child", 0&, 0&, 0&)<br />
DisplayError(res)<br />
<br />
res = mciSendString("play AVI", 0&, 0&, 0&)<br />
And ideers???
|
|
|
|
|
Never mind..... made it work.
But thanks anyway.
|
|
|
|
|
th error is when i run the project i get "An unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe
Additional information: Object reference not set to an instance of an object.
-----------------------------------------------------------------------------
Option Strict Off
Public Class Form1
Inherits System.Windows.Forms.Form
Private Declare Function getAdapterNames Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Function openAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function checkPacketQueue Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function GetQueuedPacket Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Sub closeAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String)
Private Const SIMULTANEOUS_READS As Short = 10
Private Const MAX_ADAPTER_LEN As Short = 512
Private Const ADAPTER_DELIMITER As String = "|"
Private Const MAX_PACKET_SIZE As Short = 10000
Private Const ERR_SUCCESS As Short = 1
Private Const ERR_ADAPTER_ID As Short = 2
Private Const ERR_INVALID_HANDLE As Short = 3
Private Const ERR_INVALID_ADAPTER As Short = 4
Private Const ERR_ALLOCATE_PACKET As Short = 5
Public adapter As String
Private Sub btnstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.Click
Dim qid As Short
Dim packetbuffer As String
Dim adapters() As String
Dim opensuccess As Short
Dim PacketQueue As Short
Dim packetlen As Short
Dim rawadapterdetails As String
Dim posdefaultadapter As Short
rawadapterdetails = Space(MAX_ADAPTER_LEN)
getAdapterNames(rawadapterdetails)
posdefaultadapter = _
rawadapterdetails.IndexOf(adapter_delimiter)
adapter = rawadapterdetails.Substring(0, posdefaultadapter)
opensuccess = openAdapter(adapter)
If opensuccess <> err_success Then
MsgBox("Unable to start. Check wincap is installed")
Exit Sub
End If
Do
PacketQueue = checkPacketQueue(adapter)
For qid = 1 To PacketQueue
packetbuffer = Space(max_packet_size)
packetlen = GetQueuedPacket(packetbuffer)
packetbuffer = packetbuffer.Substring(0, packetlen)
tbpackets.Text = tbpackets.Text & Replace _
(packetbuffer, Chr(0), " ")
tbpackets.SelectionStart = Len(tbpackets.Text)
System.Windows.Forms.Application.DoEvents()
Next
System.Windows.Forms.Application.DoEvents()
Loop
End Sub
Private Sub btnstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstop.Click
closeAdapter(adapter)
End Sub
End Class
|
|
|
|
|
Without further information, like what library your using and a link to it, and what line the error occured on, it's difficult to tell what the problem is.
But, looking at you Declares, my first guess would be that your not passing parameters to all these functions correctly. Without the documentation on the library, it's impossible to tell.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
First thing is to go to
http://network.programming-in.net/downloads/rvpacket.zip
and download the file. file name is "rvpacket"
and then go to
http://winpcap.mirror .ethereal.co
and download "winpcap"
-----------------------------------------------------------------------------
the error is at line PacketQueue = checkPacketQueue(adapter)
im textbook programming this one and i don't have a Clue what I mean to say is in the book it told me to go to those two sites and download the DLLS that I would need to build and run this application I don't know what I have done wrong if you can please take a look and help if you can thank you
|
|
|
|
|
I have a string data field that I want to convert to Int32 that can contain negative numbers. When I run my code I keep getting an error.
What can I do to get this conversion to work?
Thanks, Anthony
|
|
|
|
|
Would you mind terribly showing us your code so we can see what you're doing. Without it, it's impossible to tell you what to do to get "it" to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Nevermind. I realized that my error was not the negative number, but rather that my value was a decimal and not an Int32.
Thanks
|
|
|
|
|
i want to build a project that
automatically encrypt/decrypt the incomming/outgoing packets in a LAN. It
would be by some hooking thing, build a network card driver or add an
additional layer on network layer. So can you please help me in building this
project by giving tips? you can help me in either ways:
if i want to build a hooking thing type which listen on all TCP and UDP ports
for data , automatically encrypt/decrypt the incomming/outgoing packets, how
can i do that?
OR
if i want to build network card driver, which automatically encrypt/decrypt
the incomming/outgoing packets in a LAN how can i do that? i have no idea
about writing a device driver.
OR
how can i write an additional later like a layer of NDIS protocol which
automatically encypt/decrypt the incomming/outgoing packets in LAN?
you can tell me the link to the source codes, examples, ebooks, books,
articles or tell me in your own way.
i will be very thankful to you as i am feeling so busted to write such type
of application in just in a week.
i am looking forward to you.
|
|
|
|
|
You're not going to do this in VB or VB.NET. Period. This is going to be a device driver project.
This is a project soley in the realm of C++ and the Winodws Device Driver Development kit. If you've never written a device driver, shelve this project now and learn. You're getting into a dark and not very well documented area of Windows development and you've got ALOT to learn before you tackle a project like this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
We've found that if you have logic checking the existence of a file and you don't have access to the folder, the logic simply comes back as not exists.
For example if there is definitely a file called test.txt on the H:\ drive root directory and we don't have access to that drive the following logic simply executes the else part of the logic.
if file.exists("H:\test.txt") then
msgbox("It exists")
else
msgbox("It does not exist")
end if
How can we check if we first have access to a specific directory or drive?
Any help is appreciated.
Lost in the vast sea of .NET
|
|
|
|
|
You just did. Since you can't see the object, you can't get your access rights on it either. If you try to get your rights to the object, Windows will come back with something like "We can neither confirm nor deny the presence of H:\, let alone your rights to it."
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
We found that the following code worked well.
Try
………
Directory.GetFiles("c:\test")
………
Catch ex As UnauthorizedAccessException
Msgbox(“Sorry you’re not able to access the file….. yada yada yada”)
End Try
Thanks for your assistance!
Lost in the vast sea of .NET
|
|
|
|