|
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
|
|
|
|
|
|
Hi,
I am adding 4 dynamic datagrids to my webform. all columns are bound columns.
do i need to add template columns if i want to do inline editing. how do I do this.
I need the datagrid row to open up into edit mode with the textboxes so that the users can edit the data.
how do i capture which datagrid row is clicked.
please help me with this.
Thanks,
Soujanya
|
|
|
|
|
Hi all,
Here's my problem. I have an MDI but I don't want the user to be able to open more than one instance of a form at a time. I have written the following function. I think I am close but this still allows more than one instance open at one time or in other words allways returns False:
Private Function checkExistingForm(ByVal frm As Form) As Boolean
checkExistingForm = False
Dim frmArray() As Form
frmArray = Me.MdiChildren()
Dim frmArrayLength As Integer
frmArrayLength = frmArray.Length
Dim i As Integer
For i = 0 To frmArrayLength - 1
If frmArray(i) Is frm Then
Debug.WriteLine(frmArray(i))
checkExistingForm = True
Exit For
End If
Next
End Function
I call the above function in this code:
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
If e.Button Is Me.tbStock Then
Dim stockForm As New Stock
If Me.checkExistingForm(stockForm) = True Then
Exit Sub
End If
stockForm.MdiParent = Me
stockForm.Show()
End If
end sub
Any help would be greatly appreciated.
|
|
|
|
|
Hi ,
Check out this one..........................
Private Function IsFormOpen(ByVal OpenForm As Form) As Boolean
Dim intOpenForms As Integer
Try
Dim formExists As Boolean = False
For intOpenForms = 0 To MdiChildren.Length - 1
If MdiChildren(intOpenForms).Name = OpenForm.Name Then
formExists = True
MdiChildren(intOpenForms).Activate()
Exit For
End If
Next
Return formExists
Catch exc As Exception
Throw exc
End Try
End Function
Private Sub ToolBar1_Buttonclick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonclickEventArgs) Handles ToolBar1.Buttonclick
If e.Button Is Me.tbStock Then
Dim stockForm As New Stock
If IsFormOpen(stockForm) = True Then
stockForm.Dispose()
Exit Sub
End If
stockForm.MdiParent = Me
stockForm.Show()
End If
end sub
Hope this will help u..............................:->
Ritesh
|
|
|
|
|
Thanks Ritesh,
That worked great.
Mark.
|
|
|
|
|
in a accountancy project i have to print some reports from a dotmatrix (OKI 321 ML) printer. But it doesnt work. The same code works while printing in a deskjet or laserjet printers.? what s wrong? any idea? thanks a lot.
|
|
|
|
|
Greeky Creek wrote:
what s wrong? any idea?
Not without seeing your code, what your trying to print, and how your trying to print it. Are you trying to print straight Text or are you trying to print the contents of a RichTextBox, graphic image, what?
Since your using a dot matrix printer, your going to find a very small base of developers who still use one for any purpose, and hence, a small pool of developers who can help you with this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
good afternoon.
i'm currently using vb.net and sql server.
i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word.
what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable...
thanks in advance...
|
|
|
|
|
Hi,
If u r thinking to save Files in dB than better u set Column's datatype as image........
u can easily convert the file into array of bytes as
Dim reader As New FileStream(strFileName, FileAccess.ReadWrite)
ReDim pi_arrbyteFiles(reader.Length - 1)
reader.Read(pi_arrbyteFiles, 0, pi_arrbyteFiles.Length)
reader.Close()
When u want so save the file back on the m/c u can call
Dim strWrites As FileStream
If File.Exists(strFileName) Then
File.Delete(sfdFile.FileName)
End If
strWrites = File.Create(strFileName)
strWrites.Write(pi_arrbyteFiles, 0, arrbyteFiles.Length - 1)
strWrites.Close()
End If
Regards,
Ritesh
|
|
|
|
|
good morning...
thank you very much for the advice...
more power...
|
|
|
|
|
|
good morning...
thank you for sharing me the site.....
|
|
|
|
|
Hi, can any one tell me how to prevent the right click on the combobox or textbox??? I can prevent the user from typing by using keypress event, but I could not prevent the user from right click and paste the value to override my value in the combobox or text box.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Quick and easy TextBox1.ContextMenu = New ContextMenu , otherwise you will have to inherit from the TextBox and Override the WndProc method. To intercept the paste:
Public Class MyTextBox
Inherits System.Windows.Forms.TextBox
Protected Overrides Sub WndProc(ByRef m As Message)
'Call base method if not the paste message
If m.Msg <> &H302 Then MyBase.WndProc(m)
End Sub
End Class Hope this helps
Tom
|
|
|
|
|
|
I need to pass a string value into an window form app where the string will be used to validate wheather the form should or should not be shown/loaded base on a hardcode ID. How should i do it?
ANd what command should i type if i wish to test run in Start->Run
|
|
|
|
|
You don't need to do anythign special to pass parameter to the exe.. just call like this:
myExe param1, param2, param3
inside your exe, your must look for command line parameters and take appropriate action.
----------------------------------------------------------------------
T Manjaly
My C# Tutorials articles www.dotnetspider.com
|
|
|
|
|
i see okiee thankzz for the tips
|
|
|
|
|
Hello ,
i know this seems crazy to ask ,but better ask then assume, i have a project to finish and programing it's not for me , can someone help me with this?
here is what i need to get done:
that the form contains multiple group boxes, DateTime Picker controls, and a NumericUpDown control.
The cost of a hotel room is based on the following rules:
• The base rate for the room depends on the room type. Standard = 84.50, Deluxe = 104.50, and Suite = 154.50.
• If the number of guests is greater than 2, a $10.00 charge is imposed on each additional guest per night.
• An additional rollaway bed costs $5.00 per night.
• Declare constants as necessary to store the various rates.
• Using the rules described in the previous list, write the code to calculate the cost of the hotel room and display the output. Format all of the output. Make the Calculate button the accept button.
• The Clear button should clear all of the output values, set the arrival and checkout date to the current date, and set the room type to standard. Remove the check from the Additional Rollaway Bed check box and, finally, set the default number of guests to 2.
• and the code for the Exit button to exit the solution
|
|
|
|
|
bdobruna wrote:
programing, it's not for me. Can someone help me with this?
No, not without a personality transplant.
Why does everyone expect help with code when all they do is copy and paste the homework assignment? You're going to have to start the code yourself. If you have specific questions on the code or language, we'll help with that. We won't write the project for you.
|
|
|
|