|
It's a bit difficult to diagnose the problem without an error, but the only thing i can think of is that your form's instance hasn't been instantiated properly.
Try the following:
---- Main form click event:
Dim frm2 As New Form1()
frm2.Show()
Label8.Text = frm2.tbFilename.Text
frm2.Close()
If that doesn't work, then you're doing something else wrong that you haven't specified.
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
i need the text in the textbox, which is in form1, to load into the label, which is in the properties form, when the properties form is opened from a menustrip.
|
|
|
|
|
You need to pass the value of the textbox to the new form when you instantiate it
oFrm = New frmSource(Text1.text)
Then in the sub new on the form you put the text into the label
Sub New(ByVal sText As String)<br />
<br />
' This call is required by the Windows Form Designer.<br />
InitializeComponent()<br />
<br />
' Add any initialization after the InitializeComponent() call.<br />
Label1.text = sText<br />
End Sub
Quote from Great Outdoors:
its a confident traveller who farts in India
|
|
|
|
|
Wow - I spent two hours fighting bad internet and you're still not got a good answer
Member 3694999 wrote: it comes up with some type of error.
This is ridiculous. IF you want help, tell us the error message.
Member 3694999 wrote: im temForm1 As Form1
This may work, IF you set this to be the form1 instance that is visible on your screen. If not, it's a waste of time, and my guess is you got a null reference because you gave it no value at all
What you need to do is read the article on this site on passing values between forms, especially the section on delegates. Use delegates always to pass values between forms. Every other way is a hack
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
There was a topic posted last week about this same problem, but I think mine is a bit more specific.
Now, I want to get files from rapidshare using my premium account, however haven't the first clue where to start. There are plenty of articles on the web about how to download binary files over http, but its the requesting data from rapidshare and providing the login credentials that I can't find anything on. I *think* I need to use NetworkCredential, but again, haven't a clue where to start with this one.
If anyone could give me any pointers or send me in the right direction it would be much appreciated.
Thanks.
John.
|
|
|
|
|
I'm writing an application that manipulates various office documents, but am having trouble with Fields containting dates that automatically update.
All my efforts so far are too late in the process. As soon as I perform a wrd.Document.Open(filename), the fields have updated.
Is there a way to open a word document and unlink, or lock, the fields before they update?
Cheers,
Anthony
|
|
|
|
|
atregent wrote: Is there a way to open a word document and unlink, or lock, the fields before they update?
This question is geared more towards a Word-centric forum than VB.NET. AFAIK, there's no way to stop the field from updating, but I could be wrong.
|
|
|
|
|
how can i change the ruler measurement in vb.net 2003 crystal report???
thank you in advance!!!
jyn
|
|
|
|
|
Do I have to Import any namespaces when I set up a TableAdapter and/or DataTable?.
I am having a problem, where if I drag and drop a Table Adapter to the form then if I do anything at all the form shows errors. The errors are in designer generated code that I did not change. I am wondering about something else. If this is not as simple as just importing the right namespace or class, then it might be because I started this program in Visual Basic 2003. Then I let Visual Basic 2005 do programatic changes to it, so that it would work with VB 2005.
This does not happen when I remove the TableAdapter. I downloaded 2008, but am not sure if I want to use it yet. There has got to be some bugs.
Is there another way to do this?
|
|
|
|
|
The DataTable class lives inside a namespace of System.Data
Try creating an untyped DataTable in code manually to see if it recognizes the object successfully without errors. If it does, then the problem lies elsewhere...
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
I need to know how to get the column names of a database. I want to offer my users the ability to choose a database from a list of databases and then have them select what columns they want. I want to know how to get the column names and store them in a combobox. Does anyone know how to do this or where I can find an article? Thank you.
|
|
|
|
|
This is from something I wrote a while back for checking the structure of an Access table, it might be of some help to point you in the right direction:
Dim tblExport As DataTable<br />
Dim TableName as string = "tblTest"<br />
tblExport = TestConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, TableName, "TABLE"})
|
|
|
|
|
The Microsoft SQL Server equivalent is:
SELECT syscolumns.name
FROM syscolumns INNER JOIN sysobjects ON syscolumns.id = sysobjects.id
WHERE sysobjects.name = ''
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
Unless specific server takes the default,
That specified in the settings of your computer?
Fulvio
|
|
|
|
|
Member 1996543 wrote: Unless specific server takes the default,
That specified in the settings of your computer?
Uhhh... what? Your question makes no sense and there isn't enough information to even guess at what you're trying to get at.
|
|
|
|
|
But that was an excellent answer anyway Dave
Daniel Minnaar
.NET Solutions Architect
|
|
|
|
|
when the windows logon comes i should show my application before coming desktop how
|
|
|
|
|
You can't show it 'before' the desktop. You can run it on startup, many different ways.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have the following If statement
bmi = weight/(height * height)
If bmi < 18.5 then
Response.Write("Your underweight")
Else If bmi >= 18.5 And bmi <= 24.9 then
Response.Write("Your normal")
Else If bmi >=25 And bmi <=29.9 then
Response.Write("Your overweight")
Else
Response.Write("Your obese")
End If
But keep getting this error:
Microsoft VBScript compilation (0x800A03F6)
Expected 'End'
I know that this means that it is expecting the if statement to end which when i look at it it is closed. I'm new to programming and sleep depravation is probably causing me to over look the minor detail. If any one can spot where i'm goin wrong it's much appreciated.
Thanks
|
|
|
|
|
The correct syntax is ElseIf
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
Mc--Gann wrote: bmi >=25 And
there is a logical error in your code, what if bmi equals 24.95?
solution: you should drop all the >= conditions
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I am working a visual basic program that I would like to start at either restart, or a users selected time.
I am new at programming, I have yet to figure out how to launch a program automatically, currently I use
the task scheduler to launch it on my pc, can any one aid in assistance.
|
|
|
|
|
Task Scheduler is about it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
What access modifier would I use so that:
Functions within the class have read and write access to the subject &
Anything external has read-only access?
Many thanks with this stumping question,
Fahad Sadah
|
|
|
|