|
Hi all,
We have a program where in we write code to activate a AS400 machine and connect to it ,so that we have to get some text file from there and paste into our system.So anyone pls suggest the code pleaseeeeeeeeee.
Thanks in advance
Preethi
preethishivbaba
|
|
|
|
|
How is this text file exposed on the AS400?? Is it available via a web page? FTP server? Telnet? Without knowing how this file is made available, it's impossible to tell you how to get at it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
Any help or advice is appreciated. I am very new to programing VB.net 2005.
I have a table name Product in SQL2005 database. The product table has productName and Price. If the user select one of the product from combo box, I want to see the price only for that product listed in the text box.
Thanks for your help
TT
|
|
|
|
|
It depends on how you've written your code and database. But, in general, you have to get the Primary Key of the record that's selected in the ComboBox and use another SQL query to lookup the price associated with that record. You did put in ID column in your Product table, didn't you?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i want to show the text value from form in the data report but i have try many ways it just not working... or data memeber not found.
in my data report code i put:
label2.caption= module1.textfromform
textfromform which is a global varible i set in my module1.
but having error :"Object required".
i try to set the code in form. which is :
dareport1.label12.caption=text1.text
but Error:data memeber is not found
Hope someone can save me~~~
|
|
|
|
|
Try declaring your form with the data outside of any sub routines as Public frm1 as Form1 (or whatever it is that your form is called) & then modify
campbells wrote: dareport1.label12.caption=text1.text
to dareport1.label12.caption = frm1.text1.text
|
|
|
|
|
actually my text1.text= stringtext -- which is a global variable~
|
|
|
|
|
Global variables should be avoided. Nevertheless, in your module declare your string variable with either Public or Friend access modifier (Friend if it's withing the same assembly). Then try dareport1.label12.caption = modulename.variablename
|
|
|
|
|
i'm using vb6, i think dont have friend this command.
It is not working when i put this command
dareport1.label12.caption = modulename.variablename
it said Method or data memeber not found.
I try to check enter the datareport name first then i found that it only link to report properties, can found those label or text in m report...
|
|
|
|
|
I think you misunderstood my code snippet - modulename.variablename is supposed to represent the public variable in the module you are using to populate your data report, I put it in italics for as an example for you as I don't know what you've named the module or the variable.
The point I'm trying to make is, from what I understand, you have a module that populates the data report
Public Module basDataReport
Public strCaption As String '<--- global string variable
Function GetReportCaption()As String '<--- your method that gets report caption
''''''
''' <--- put your processing here e.g.
'strCaption = blah blah blah
'''''''
Return strCaption '<--- string variable with data
End Sub
End Module
Inside whichever method call it is that you're using to set the caption you could call MyReport.Caption = basDataReport.strCaption to get the global variable after it's already been assigned OR if you're using a function like in the example above you could call on the function by name e.g. MyReport.Caption = GetReportCaption() .
See what I mean?
|
|
|
|
|
is ok nvm , i solve my problem with this
<br />
With Vdetail<br />
.Sections("reportheader").Controls.Item("datefrom").Caption = strFromWhen<br />
.Sections("reportheader").Controls.Item("dateto").Caption = strToWhen<br />
End With
|
|
|
|
|
help guys... how can i enter next character in the text box using vb6? it so happen that i'm using hardware - buttons - in this program... using the inpout32.dll and the sort of thing... when i click the button to an specific number then click it again for other number, its just keep on changing the number in the text box - not adding the number that i have click... example: when i click number 1, 1 will appear in the text box, and then i will again click number 2 - the text box should display 12, since i click 1 before, ryt? but in this case, when i click the 2nd number which is 2, it simply replaces the 1st number - which is 1. guyd, can you help me with this? needed it badly thanks!!!
|
|
|
|
|
Try this:
In the code for the button, type:
TextBox.Text = TextBox.Text + Varible1
And replace "Varible1" with what you want to come next.
Hope this helps!
|
|
|
|
|
I am having a problem with the SelectedValue of a list box. I have a List Box that has its data source as a table. The columns in the table are ID and Name. ID is an Integer and Name is a String. I have them bound to the ListBox in this fashion:
ListBox.DataSource = Table1DataSet
ListBox.DisplayMember = “Table1.Name”
ListBox.ValueMember = “Table1.ID”
Whenever I try to use the value member of the list box I get an error. For instance if I declare:
Dim x As Integer = ListBox1.SelectedValue
It says InvalidCast Exeption. If I try to put it as a parameter for a sql query like
MyCmd.Parameters.AddWithValue("@FID", ListBox1.SelectedValue)
It gives an argument exeption when I try to fill my data adpater. Could someone tell me what I am doing wrong.
|
|
|
|
|
Have you used the debugger to see what's in the ID property ? Have you tried Convert.ToInt32 to convert it to an int ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have used
Dim x As Integer = Cint(ListBox1.SelectedValue)
and I still get an error message.
How do you use the debugger to see what is in the ID property?
|
|
|
|
|
Set a breakpoint and type ListBox1.SelectedValue in the watch window.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a VB.Net project, have to some websites, many webpages contain images, take a lot of bandwidth. Does anyone know how to disable image download in web broswer programmtically?
Thank you very much
|
|
|
|
|
You can't disable downloading just certain types of files. It's all or nothing. The web browser control uses the set settings as the user has setup for IE. Changing the settings just so your web browser control works the way you want it to will also change the settings system-wide for every copy of IE that the user has open at the same time.
Also, IE doesn't let you turn off downloading certain file types.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey,
I have one final Registry question. I have scanned the Registry for a couple of hours and cannot figure out how to change the path of where the Bootskin or Logon skin is. It must be possible because I found how to change the Windows theme.
Can anyone help me please? Thank you.
|
|
|
|
|
What are you talking about? What "Logon skin"?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
When you boot up, the screen that you see when you log onto your computer if you have it password locked. (I.e. LogonSkinFile.logon or LogonSkinFile.logonxp).
And the bootskin is what you see when Windows is booting up. (I.e. BootSkinFile.bootskin).
|
|
|
|
|
You can't change the "BootSkin" without resource hacking the NTOSKRNL.EXE file. It's not a seperate file anywhere, it's an image built into the .EXE. I HIGHLY recommend against doing this yourself since you can render your machine unabel to start, even in safe mode. Use an already developed tool if you really want to change that screen. Example[^].
The background you get when the machine is locked specified by the Desktop configuration settings of the .DEFAULT user. Look in the Registry under HKEY_USERS and you'll find "him". The WINDOW that shows up when Windows is locked is generated by GINA.DLL, or a replacement. The only way to replace that window is to create your own GINA.DLL. Don't bother asking me how. It's VERY low-level Windows internal crap and can't be done using VB.NET or and other .NET Managed language.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I have a class in which I declare and expose all the forms in my application, I wish to have all form load operations/calls to be done by 1 subroutine in my class, thus...
Public Class X
Public Shared frm1 As myForm
Public Shared frm2 As hisForm
Public Shared frm3 As herForm
Public Shared frm4 As ourForm
Public Shared Sub LoadForm(ByRef theForm As Form)
Dim t As Type
t = theForm.GetType
theForm = CType(Activator.CreateInstance(t), Form)
theForm.Show()
End Sub
End Class
The above code will not run because the object "theForm" has not been initialized, and obviously I cna't intialize it w/o knowing which form I am loading, it throws a "System.NullReferenceException" event.
Any idea on how I could detect or get the object type, or type name of an object before it has been created/initialized? The code blows up at the line "t = theForm.GetType", any help is greatly appreciated, thank you.
|
|
|
|