|
You'll need a 3270 emulation class library. If you don't have one, I highly suggest picking one up (Google results[^]) instead of trying to write your own.
You'll then have to send the appropriate commands to the mainframe to get what you want. Just like you would if you were sitting at the keyboard yourself. You'll then parse up the returned screen using the 3270 class to get the information.
We really can't be any more specific then that because 1) Each 3270 class library is going to be different, and 2) each mainframe implementation of whatever scheduler is going to be different.
For more information, consult the documentation on the 3270 library your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:53 Monday 20th February, 2006
|
|
|
|
|
Hi,
This question is more out of curiosity rather than a neccesity.
VB .Net is Object Oriented. It's my understanding that object can be referenced by other objects, does this mean that if it's value changes, other object needn't ask it what it's new value is?
I'm still trying to grasp the concept though.
If I have a "Public Overridable ReadOnly Property" which is in a class that I did not create, how can I add my code to that property? I can't edit code in a COM control's class, maybe override??
What I want is live tracking of any changes in the value of that property. (Hence the question above)
Is there any object I can put in a form to display the value of that property even when it changes without me having to poll that object to ask it for it's property's value?
Thanx!
|
|
|
|
|
Your questions are confusing, but I will give it a try...
It's my understanding that object can be referenced by other objects, does this mean that if it's value changes, other object needn't ask it what it's new value is?
No, it does not mean that. If you have a class C, which has a property x, from which you make an object O, then you can reference that property as O.x. If the value of x changes, and after it changes you reference O.x again, you will get the new value. Technically, you are asking for it's new value when you do this.
If I have a "Public Overridable ReadOnly Property" which is in a class that I did not create, how can I add my code to that property? I can't edit code in a COM control's class, maybe override??
Yes, if the class is overridable, then you can override it. You can define a class C2 which can inherit class C. In C2 you can define a new x method using your own code. Then when you make an object O2 from C2, you can reference O2.x and it will use your new code. However, if you reference some other property that you did not override is C2, say O2.y, then it will use the code from the original C.y.
I hope this helps.
Roy.
|
|
|
|
|
Hi,
I am creating a web parts control containing a listbox, a button and a context menu using visual basic.net. I have created both controls and would like to add a selectionIndexChanged event handler for the listbox but the intellisense list did not display the listbox control.
Here is a code snippet:
Protected Overrides Sub CreateChildControls()
listbox1 = new listbox //adding a listbox control
listbox1.ID = "List1"
listitem1.Text = "Testing"
listbox1.Items.Add(listitem1)
Me.Controls.Add(listbox1)
//intellisense didnt display the listbox for event handling! [?]
button1 = new button //adding a button control
button1.ID = "Button1"
button1.Text = "Test"
Me.Controls.Add(button1)
AddHandler button1.Click, AddressOf button1_Click //intellisense did include the button control for event handling
End Sub
How do I allow event handling for the listbox? It seems that vb was unable to recognise the listbox for AddHandler
|
|
|
|
|
KaKa` wrote: //intellisense didnt display the listbox for event handling! [?]
Intellisense will only work with controls and classes that are created at design time. It won't show you anything about the controls your added because they only exist, or are created, at run time. You'll have to code the event handlers and wire them up (using AddHandler) by hand.
listbox1 = new listbox
listbox1.ID = "List1"
listitem1.Text = "Testing"
listbox1.Items.Add(listitem1)
AddHandler listbox1.SelectedIndexChanged, AddressOf ListBox1_SelectedIndexChanged
Me.Controls.Add(listbox1)
.
.
.
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
' Your event handler code goes here.
End Sub
If you dynamically create controls at runtime, you have to wire up any event handlers yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You need to define your listbox variable at the class level using the 'withevents' keyword. Here's an example:
<br />
Public Class Form1<br />
Private WithEvents list1 As ListBox<br />
<br />
Private Sub Form1_Load(yada,yada) Handles MyBase.Load<br />
list1 = New ListBox<br />
list1.Text = "Testing"<br />
End Sub<br />
End Class<br />
You should find that intellisense will give you the options you were missing.
|
|
|
|
|
Thank you for the replies
I have followed both advice and there is now an event handler for the listbox
|
|
|
|
|
How to compare two email is the same or not?
In my Case, A email
From : Kay
To : Jay, Amy
CC : Apple
Compare with kay's inbox, Jay's inbox, Amy's inbox, and Apple's inbox.
They have the same email.
Does any ID helps?
PS. Some Email is internal email, SMTP ID cannot use in my case.
Thanks!
|
|
|
|
|
Hi!
Have created an OnScreenKeyboard in a VB.NET winform but the rendering of the buttons is so slow that when selecting a new keyboard layout you see the buttons disapear and come back one at the time. Although it's kind of a cool effect, it's not what I want for this prjoject.
I'd like to implement a BeginUpdate and EndUpdate functions. Do I override the onpaint event or how can I achive this?
-- modified at 3:16 Monday 20th February, 2006
|
|
|
|
|
You can try using the Form's SuspendLayout and ResumeLayout methods. Call SuspendLayout , add all your controls to the Forms Controls collection, then call ResumeLayout .
You've run into the problem with using LOTS of controls on a form. They're slow to create and draw.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to load command prompt from VB 6.0 for a click event of a button.
can this be done if it can be how to do it.
A. Miftha Idroos
B.Sc. Engineering, AMBCS, AMIE(SL)
Hatton National Bank,
Sri Lanka
|
|
|
|
|
Hi Miftha,
Here is the code:
Private Sub Command1_Click()
Shell "command.com"
End Sub
Regards,
Premalatha
|
|
|
|
|
On Windows NT Kernels (NT, 2000, XP, 2003, Vista, ...) it's proper to CMD , not Command.com .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:31 Monday 20th February, 2006
|
|
|
|
|
hi,
does anybody know how to add functions/procedures for selected properties in an inherited user control?
example:
my grid control has a column property >>> grid.column(x as integer)
i want to add a sum function in the grid.column property of my inherited control.. is this possible? i dont know how to access the grid.column property..
if this is possible i would really appreciate anybody's help.. thanks in advance!
|
|
|
|
|
Anyone know how to solve this warning problem ?
"Warning 1 Function 'report1' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used."
chung
|
|
|
|
|
There are paths in your function that will not set and return a value. For example:
Public Function ReturnExample(ByVal i As Integer) As Boolean
If i < 100 Then
Return True
End If
End Function
This will generate the very same error because if i is greater than or equal to 100, no return value will be set, but the function will terminate. Possible fixes would be:
Public Function ReturnExample(ByVal i As Integer) As Boolean
If i < 100 Then
Return True
Else
Return False
End If
End Function
or
Public Function ReturnExample(ByVal i As Integer) As Boolean
Dim rv As Boolean = False
If i < 100 Then
rv = True
End If
Return rv
End Function
What you do depends entirely on your code and what you expect it to return in ALL cases.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:35 Sunday 19th February, 2006
|
|
|
|
|
Thank Dave! i have solve this problem
chung
|
|
|
|
|
Hi all,
I have some screens in the WinForms app I'm working on which have datagrids with long column headers (such as "Cumulative % of Injection Demand" and I want to be able to show these in their entirety by somehow having the header row high enough... it doesn't need to be dynamic - I just want to do something like say "dataGrid1.HeaderRowHeight = 50". Since it can't be done via the normal datagrid properties (I can't beleive how much basic stuff M$ left out of the WinForms datagrid!!) what would be the best way of doing it? (Any examples or links would be appreciated - I didn't find much from Google)
TIA for any help/advice,
Mike
-- modified at 22:46 Sunday 19th February, 2006
|
|
|
|
|
This is a huge pain to implement. But, you can use a library written to do this for you right here[^] on CodeProject. It's a C# library, but it'll add the support you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave - that worked very well... except for grids that have sortable columns where the sorting icon (the little triangle) seems to screw the rendering up. Anyway, for one of two of the grids I need it on I don't need sorting so that's cool.
Cheers,
Mike
|
|
|
|
|
Well, I didn't say it was perfect!
You could always use VB.NET 2005! Good support for this is built right into the new GridView!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know whether its possible to turn off background compilation. I am sure its making my Visual Studio 2005 solution unresponsive.
|
|
|
|
|
From what i read[^], it's not possible to turn of the BC.
"While you can't turn off the background compiler..."
Why do you think that it's the BC that makes the solution unresponsive?
---
b { font-weight: normal; }
-- modified at 14:48 Sunday 19th February, 2006
|
|
|
|
|
Perhaps i've got it wrong and its not background compilation that is the issue. I am running visual studio 2005 on a solution that is upgraded from VB6 and has a vast quantity of errors. Hence my suspicion...
The fact that you can't switch it off, kind of suggests that its never an issue to worry about. If i get to the bottom of it i will let you know.
Thanks
|
|
|
|
|
I would recommend that you DON'T use the VB6 Upgrade Wizard. It puts alot of code in to simulate the way VB6 did things, which can be pretty inefficient when compared to correctly rewritten code in VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|