|
Hi all,
I am doing my first setup project for the addin I wrote and can't solve following problem.
I want to deploy an addin for Visual studio. So I need to look in registry for the HKLM\SOFTWARE\Microsoft\VisualStudio\7.X\InstallDir (where 7.X is 7.0 or 7.1) and take it into MyPATH0 and MyPATH1 variables. For the installed version(s) I need to make TARGETDIR to MyPATH0\..\..\\Vc7\VCWizards.
I have no idea how to solve this. Setup wizard seems to have very simple logic, so how can I program in the wizard
"
1.TAKE REGISTRY KEY XX\7.0 into VAR
2. If success Make VAR+AAA to the TARGET DIR
3.Install
4.TAKE REGISTRY KEY XX\7.1 into VAR+AAA
5. If success Make VAR to the TARGET DIR
"
Thank you very much for your help,
Boni
|
|
|
|
|
Hi.
I can't seem to get my¨callback function to work... plz help.
This code will throw an error:
Public Function myCallBack(ByVal lwnd As Long, ByVal lpVHdr As Long) As Boolean<br />
<br />
Dim VideoData() As Byte<br />
Dim gh As GCHandle = GCHandle.Alloc(lpVHdr, GCHandleType.Pinned)<br />
Dim AddrOflpVHdr As IntPtr = gh.AddrOfPinnedObject()<br />
<br />
' The error come's here.<br />
Dim VideoHeader As VIDEOHDR = CType(Marshal.PtrToStructure(AddrOflpVHdr, _<br />
GetType(VIDEOHDR)), VIDEOHDR)<br />
<br />
gh.Free()<br />
<br />
End Function
The error is:
An unhandled exception of type 'System.NullReferenceException' occurred in Unknown Module.
Additional information: Object reference not set to an instance of an object.
|
|
|
|
|
Marshal.PtrToStructure(ptr,structure) is a Shared Sub and doesn't return a value. Try this revised code. I can't test it live but this is what i suspect is wrong with your code.
Public Function myCallBack(ByVal lwnd As Long, ByVal lpVHdr As Long) As Boolean
Dim VideoData() As Byte
Dim gh As Runtime.InteropServices.GCHandle _
= Runtime.InteropServices.GCHandle.Alloc _
(lpVHdr, Runtime.InteropServices.GCHandleType.Pinned)
Dim AddrOflpVHdr As IntPtr = gh.AddrOfPinnedObject()
Dim VideoHeader As New VIDEOHDR
Marshal.PtrToStructure(AddrOflpVHdr, VideoHeader)
gh.Free()
End Function
|
|
|
|
|
This error appeares when it comes to:
Marshal.PtrToStructure(AddrOflpVHdr, VideoHeader)
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: The structure must not be a value class.
The structure look like this:
<br />
Structure VIDEOHDR<br />
Dim lpData As Integer '// address of video buffer<br />
Dim dwBufferLength As Integer '
Dim dwBytesUsed As Integer '// see below<br />
Dim dwTimeCaptured As Integer '
Dim dwUser As Integer '// user-specific data<br />
Dim dwFlags As Integer '
<VBFixedArray(3)> Dim dwReserved() As Integer '// reserved; do not use}<br />
<br />
'UPGRADE_TODO: "Initialize" must be called to initialize instances of this structure. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1026"'<br />
Public Sub Initialize()<br />
ReDim dwReserved(3)<br />
End Sub<br />
<br />
End Structure<br />
|
|
|
|
|
I found a WebCam class here's a link "http://dotnetjunkies.com/WebLog/principal/articles/32662.aspx" it's in C# but you can either convert it to vb or compile it as a .dll and use it that way.
This is the structure I pulled out of the class example in the link above.
<code>
<StructLayout(LayoutKind.Sequential)> _
Public Structure VIDEOHDR
<MarshalAs(UnmanagedType.I4)> _
Public lpData As Integer
<MarshalAs(UnmanagedType.I4)> _
Public dwBufferLength As Integer
<MarshalAs(UnmanagedType.I4)> _
Public dwBytesUsed As Integer
<MarshalAs(UnmanagedType.I4)> _
Public dwTimeCaptured As Integer
<MarshalAs(UnmanagedType.I4)> _
Public dwUser As Integer
<MarshalAs(UnmanagedType.I4)> _
Public dwFlags As Integer
<MarshalAs(UnmanagedType.ByValArray, SizeConst := 4)> _
Public dwReserved() As Integer
End Structure 'VIDEOHDR
</code>
|
|
|
|
|
I've found the problem: the garbage collector.
Solved it by using GC.KeepAlive()
Thanks for you help.
|
|
|
|
|
I am trying to add a delete button. I need it to delete the selected row in a datagrid. My Dataset is called as DS.I am working with an xmlfile.I already have an add button that is functioning properly:
<br />
Dim myRow As DataRow<br />
<br />
myRow = DS.Tables(0).NewRow()<br />
<br />
myRow(0) = TextBox1.Text<br />
myRow(1) = TextBox2.Text<br />
myRow(2) = TextBox3.Text<br />
myRow(3) = TextBox4.Text<br />
myRow(4) = TextBox5.Text<br />
<br />
DS.Tables(0).Rows.Add(myRow)<br />
<br />
TextBox1.Clear()<br />
TextBox2.Clear()<br />
TextBox3.Clear()<br />
TextBox4.Clear()<br />
TextBox5.Clear()<br />
I just need the delete button. any help would be greatly apprecitated.
|
|
|
|
|
Datagrid? or Dataset?
I am assuming you mean you want to delete a row from your dataset. If that is the case, you first need to know what row you want to delete. once you know that, you should be able to do DS.Tables(0).Rows.Remove or .Delete. Can't remember off the top of my head.
Are you displaying this data in a datagrid object? If so, you will need to capture the id of the row you are on, and will then want to utilize the ItemCommand event of the DataGrid.
Levi Rosol
Blog By Levi[^]
|
|
|
|
|
I want the user to be able to delete any row selected. Yes the data is displayed in a datagrid. how do I capture the ID?
And just as a little memory refresher its Remove.
thanks for the help.
|
|
|
|
|
hii guys..I have a simple question.I havent got a clearly guide about how to connect with database in mysql using vb yet.Please explain to me step by step.thanks 4 ur help
|
|
|
|
|
Try to check the information from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
When I create a thread in my VS .NET application (Dim trdSocket As Thread = New Thread(AddressOf Socket.Listen)), when I close the application with the X in the top right corner, my application still in the list of process... I guess I need to kill the thread when I exit the program ? Which event do I need to use and with which method of the Thread class I can kill the thread ?
Thanx a lot!
|
|
|
|
|
Hi.
I use this.
<br />
Protected Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)<br />
trdSocket.Abort <br />
End<br />
End Sub<br />
|
|
|
|
|
|
Hello everyone, I am trying to create splash screens for my software. I have no idea where to start, can anyone please help me get started.
Thanks
[CDH]
Thanks cPod....
|
|
|
|
|
Yes, try to search for 'splash' in the codeproject articles.
Please before posting here make one search on codeproject and one search in google. Thx.
|
|
|
|
|
I did do a search on codeproject. If you are not going to help I would prefer you to keep your commits to yourself. I am here trying to learn like everyone else...
[CDH]
Thanks cPod....
|
|
|
|
|
Try to check the information from here[^] and here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Is there anyway we can design crystal report at VB.NET runtime? I've been doing research about it but couldn't find anyone doing it.
If you know a website where I can buy it, please help. Thanks
John
|
|
|
|
|
it is possible, but is neither easy, nor cheap.
do research on the RDC tool within Crystal. I worked with a group of people who had a .net web app create reports, with both data and formatting done on the fly. No rpt file was ever created on the server. However, with crystal, licensing will bite you in the ass. If you expect to have more than 50 concurrent connections, expect to spend well over $100,000
I should also say that it has been 1.5 years since i've done anything with crystal, and some of what i just said may have changed. I believe we were using 8.5 or crystal 9 at the time.
Have you looked into using Reporting Services[^] from Microsoft? I would suggest using RS over Crystal any day. Only misleading thing about RS is that if you have your web server on one box, and sql on another (as you should), you will need 2 SQL server licenses. SQL Standard is fine if you are fine with windows auth for security, otherwise, you will need at least one of the licenses to be Enterprise.
hope this helps more than it confuses
Levi Rosol
Blog By Levi[^]
|
|
|
|
|
Does anyone know how to create a class library (dll)with visual basic 2003 standard? Standard does not come with class library template!
|
|
|
|
|
I am trying to work out client server application using VB .NET Remoting. MY APPLICATION IS RUNNING AS FOLLOWS:
Server has a set of DLL's to be loaded via reflection from the client.There is also a host application running on server that
returns the reference of an anchored(Not Serializable) object to the client(listening at some port on server machine for
client requests). This Host application is invoked remotely by the client.When i invoke this host application directly from
some DLL (ON CLIENT) & CALL ITS METHODS, it works fine. However when i load some assembly via reflection on the client
(dynamic loading) & that dynamically loaded assembly in turn try to call some method on that object (returned from remote
Host on server) then a SECURITY EXCEPTION IS RAISED.This Security exception is only raised for those methods that accesses
the database on the server & not for any other Methods. I am unable to find a solution to this problem.
CAN ANYBODY HELP ME ?
|
|
|
|
|
I like using frames. VB.NET does not (or so it appears). I have a header frame with a navigation sub (Nav) that changes a title grapher (in the header frame) and the URL of the main frame. This works fine when I call it from the header frame, but when in import the header class and call it from the menu frame, it crashes because the focus is on the menu frame and not the header frame. I have tried:
With ("javascript:parent.frames('header').document.items('Image2')) but this does not work. Is this really this hard to do? Here is my subroutine I am trying to use from both the header frame and the menu frame:
Public Sub Nav(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
Dim strName As String = e.CommandName
Dim strArg As Integer = CInt(e.CommandArgument)
Dim strURL As String
Select Case strArg
Case 1
Me.Image2.ImageUrl = "images/Page1.png"
Me.Image2.AlternateText = "Welcome"
Case 2
Me.Image2.ImageUrl = "images/Page2.png"
Me.Image2.AlternateText = "About Us"
Case 3
Image2.ImageUrl = "images/Page3.png"
Image2.AlternateText = "Mission"
Case 4
Image2.ImageUrl = "images/Page4.png"
Image2.AlternateText = "Gallery"
Case 5
Image2.ImageUrl = "images/Page5.png"
Image2.AlternateText = "Services"
Case 6
Image2.ImageUrl = "images/Page6.png"
Image2.AlternateText = "References"
Case 7
Image2.ImageUrl = "images/Page7.png"
Image2.AlternateText = "Contact Us"
Case 8
Image2.ImageUrl = "images/Page8.png"
Image2.AlternateText = "Favorites"
End Select
'Response.Redirect(strURL)
End Sub
|
|
|
|
|
Your question would be better handled in the ASP.NET Forum. It has nothign to do with VB.NET, even though the code is written in it.
BTW: VB.NET/ASP.NET does work perfectly fine with frames, if done correctly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|