|
Please help,there is any method or way to print data from datagrid.
|
|
|
|
|
Sure, there are some examples if you search on CP.
|
|
|
|
|
Have you investigated the PrintDocument class? You may want to subclass PrintDocument to output rows from the source of a datagrid.
|
|
|
|
|
Ok, anyone got an idea on how to do this in VB.NET? I need to know how to put Descriptions onto the Properties of my Classes that will show up in the "Tooltips" that display during Intellisense typing. Also, I'd like these descriptions availabe in the Object Browser.
You used to be able to do this in VB6 by going to "Tools --> Procedure Attributes". No, I am not looking for the "ComponentModel.Description" either...that is only for design time control properties (so it seems).
|
|
|
|
|
Can't you just use the <Description()> attribute?
[Edit]Sorry bout that, forgot that < wouldn't work in html [/Edit]
|
|
|
|
|
Well, no, that's what I said in my post..."ComponentModel.Description()" does absolutely nothing except display a Description in the Properties Editor on a Form. I want the Description to show up like it does in the Object Browser (with a Summary, etc.) and also to display a Tooltip while typing in Code.
|
|
|
|
|
You mean like the what the XML Comment does for C#? Well, if that's what you want, VB.Net doesn't support that, but I think there are 3rd party tools that replicate that somewhat. You'll have to look around.
|
|
|
|
|
I guess so. You know, that's retarded...I thought everything in the CLR was exactly the same no matter what language. So why does C# have more design-time enhancements than VB? For example, why do we always have to comment every ^%$%@ line of code instead of "/* .... */ ". Not that I am complaining...too much, because I do not like the syntax of C# / C++. I can understand and read it, but I don't think I'll ever code in it
|
|
|
|
|
|
Could someone please tell me if it is possible to select multiple rows with a msflex grid using the CTRL key? If not what component should I use?
|
|
|
|
|
I have a dll (written in PowerBasic) which I need to call from VB .NET. I dont want to rewrite the dll in .NET. So I decided to add a reference to the dll by adding a reference to it.
.NEt wont let me add the reference to the dll regularly.
how do i call functions in this dll??
P.S. It is not a COM dll, just a regular dll.
|
|
|
|
|
How can you get a button click event to search through multiple databases to bring up the results based on what is multiple drop down lists, check boxes, and list boxes?
How would you get labels for these results to appear? Some would have to match the columns in the database and some would have to match the contents of the drop down lists etc.
We want to do this in vb.net
|
|
|
|
|
This may be done someplace else, or even part of the .NET development package, but I have not found it so far. So I have created a small windows app called UGWarnDel that will remove those messages. The executable is under 6k zipped. If there is a need for this, you can contact me at my email address. Be forewarned, I am behind the email filter provided by INTERREACH.COM.
|
|
|
|
|
I am writing a program that accesses a CICS system using a socket. The problem I am having is that the server is slow and sends either a maximum of 393 bytes total (size of record) or a Chr(13) showing that the output is complete.
My question is that whether it is better to read byte for byte from the server (since it is slow) or set the receive window size in the tcpclient. The second solution has a limitation since I am waiting for a particular character in the output stream to show that my output has ended.
Thanks,
|
|
|
|
|
There is an Example in the MSDN help on receiving Data from a Socket. However, it uses the TCPClient Class instead of Socket, I am sure you can modify this. Do a search on "Chat" and it should find an example of a Chat application. In that example, it will show how to receive data Asynchronously.
|
|
|
|
|
I have an object that fires an event and a form that handles that event. When handling the event i show a new form but the new form hangs. It gets "Loaded", "VisibleChanged" and "Activated" events and hangs. I am attaching vb code as an example.
Please see and if you can figure out why it is so i will really appreciate if you tell me.
Thanks in advance!!!!
P.S. as I understand its a bug - the form must show without problems!!!
here is the sample code of the error in vb.net ))
'Class EventRaiser raises SomeEvent 3 seconds after it is loaded.
'EventHandlerForm handles that event and shows modeless form.
'Normally the new form must have no problems but actually it
'receives "Load", "VisibleChanged" and "Activated" events and hangs.
'Raises event "SomeEvent" 3 seconds after it is created.
Public Class EventRaiser
Public Event SomeEvent()
Private WithEvents myTimer As New System.Timers.Timer()
Sub New()
myTimer.Interval = 3000
myTimer.Start()
End Sub
Private Sub mytimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles myTimer.Elapsed
RaiseEvent SomeEvent()
myTimer.Enabled = False
End Sub
End Class
Public Class EventHandlerForm
Inherits System.Windows.Forms.Form
'EventRaiser raises SomeEvent 3 seconds after it is created.
Private WithEvents myEventRaiser As New EventRaiser()
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Label1 As System.Windows.Forms.Label
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(320, 32)
Me.Label1.TabIndex = 0
Me.Label1.Text = "New Form is shown after 3 seconds. After it is show it hangs."
'
'EventHandlerForm
'
Me.AutoScale = False
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(344, 53)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1})
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
'In the myEventRaiser.SomeEvent handler a new form is shown modeless.
'New form receives "Load", "VisibleChanged" and "Activated" events
'and hangs
Private Sub EventRaiser_SomeEvent() Handles myEventRaiser.SomeEvent
Dim ff As New Form()
ff.Show()
End Sub
End Class
|
|
|
|
|
There is something about creating the new form inside that event handler. Creating the few form inside the handler for a button works perfectly, but not inside the myEventRaiser.SomeEvent handler for some reason.
RageInTheMachine9532
|
|
|
|
|
You "Dim"-ed the Form variable inside the Event Handler. Remember that anytime a Routine goes out of Scope, the Variables in that Routine also get destroyed. This could be causing the problem. Dim the Form variable outside of the Event Handler routine.
Hope that helps!
|
|
|
|
|
I've tried that already. But in the example i use System.Timers.Timer class.
If i use the System.Windows.Forms.Timer then it works ok. I want to understand whats the difference in the events???
|
|
|
|
|
Ahh, Ok, then this might be because the System.Timers work on a separate Thread. The Windows.Forms.Timer works because it's on the same thread as the UI.
In your Code you need to say "Me.Invoke(..." in order to get your new Form loaded into the MAIN UI Thread. Other wise, it's loading your new Form into a separate Thread in which you cannot control this new Form. Read up on Multithreading...a good example is the Chat application in the MSDN.
|
|
|
|
|
I get it now!! ))
Thanks a lot!!!
|
|
|
|
|
I couldn't seem to find the answer from whatever documents I have right now... In C/C++ we have "default parameters" for functions, int Func(int nPara1, int nPara2 = 0); , but how do we achieve this in VB? Thanks a lot.
|
|
|
|
|
|
Thanks for your reply, I forgot to mention that I was using VBScript(ASP application) so the "Optional" keyword is not supported Is there anyway I can do that in VBScript? Thank you.
|
|
|
|
|
Option parameters are not supported at all. I haven't tried it, but since all variables in VBScript are of type Variant, you might look into passing an array of values to your function. This could be used to simulate optional arguments, but your function will have to be written to parse up the array and you can't pass parameters by reference at all.
RageInTheMachine9532
|
|
|
|