|
You have to change the following line of code.
Change: listBox1.Text = openFileDialog1.FileName
To: listBox1.Items.Add(openFileDialog1.FileName)
Have a great day.
Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.
|
|
|
|
|
thanks matey you'll be pleased to know i figured that out not too many seconds after i posted that message, stupid me. if your not to busy i could do with a bit more help on a couple of things.
how can i assign a command to select all items in the list and how do i move up and down the list
|
|
|
|
|
Hi, I'm creating an application for outlook 2003 using VS 2005(vb.net) and VSTO 2005 SE. However I am trying to add a button to the outlook toolbar, kinda like the send recieve button and an item to the "tools" menu. However I am struggling to get anywhere with it, does anyone know of anything that could be of help?
Thanks in advance
Chris
|
|
|
|
|
I am a beginer vb6 programmer, Now i m in big trouble, my need to make a multi column combo with auto complete and have header & sorting by header...
Please Help me..!!
Please Help me..!!
Please Help me..!!
|
|
|
|
|
I've made a programme similar to the Windows Wordpad. and i want to use a msgbox to choose whether to save the text stored in richtextbox before the Form is closd
if the result of msgbox is Yes, a function 'savefile' will be called and after that the Form will be closed, if the result of the msgbox is No, the Form will be closed, and if result is Cancel, the Form will stay open.
how can I do it?
i've tried several times but it doesn't work.
please help. ~~
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
MsgBox("The Text in the file has been changed.Do you want to save it?", MsgBoxStyle.YesNoCancel, "Wordpad")
If MsgBoxResult.Yes Then
savefile()
e.Cancel = False
ElseIf MsgBoxResult.No Then
e.Cancel = False
ElseIf MsgBoxResult.Cancel Then
e.Cancel = True
End If
End If
End Sub
sync_austin
|
|
|
|
|
You need to include the message in the if statement:
If MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand) = Windows.Forms.DialogResult.Cancel Then<br />
e.Cancel = True<br />
Else<br />
e.Cancel = False<br />
End If
Alternatively:
dim result as windows.forms.dialogresult<br />
<br />
result = MessageBox.Show("Exit?", "Exit?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Hand)<br />
<br />
if result = Windows.Forms.DialogResult.Cancel then<br />
e.cancel = true<br />
elseif result = result = Windows.Forms.DialogResult.Yes then<br />
' do whatever<br />
else<br />
' do whatever<br />
end if
This way the cancel is dependant on the result.
P.S. Msgbox is old now, use messagebox.show, it's much more versatile and easier to create dialogs.
-- modified at 5:33 Tuesday 12th December, 2006
Posted by The ANZAC
|
|
|
|
|
We have have 10 VB6.0 proejcts, all the 10 projects are refered by one Main Project (Vb6.0)
Using VS2005 upgrade wizard, we have migrated only the Main Project, .net automatically created interop for the other projects.
The application (migrated application) is running smoothly .net.
But while closing the applicaiton we are getting the following error :
"unhandled exception at 0x660688 (msvbvm60.dll) in DBCenter.exe: 0xc0000005: Access violation reading location 0xfeeeffaa"
Please help us to resolve this error.
Advanced thanks
Mano
|
|
|
|
|
Can anyone offer some advise on how to improve performance (VB application, VS 2005) ...
An mdi window has a tab control that I'm using to show/hide child windows i.e. tabpage1 shows child windows 1,2,3, tabpage2 shows child windows 4,5,6 etc. I use a for loop to show the windows assigned to the selected tab and hide the ones that aren't.
However as the number of tabs & child windows grows, it becomes sluggish.
I cured this by actually assigning the child windows to the actual tabpages but then have problems maximising the child windows.
Anyone know of another solution I could try?
|
|
|
|
|
dose any one know about dos printing i want to print Barcode on epson Lq 680
code39 . need help
|
|
|
|
|
Dot matrix printers are not the best for barcodes. There dpi is too low. Having said that, to print barcodes from DOS you will need a printer module. I have purchased these in the past from Fontware
Steve Jowett
|
|
|
|
|
Hey guys need help
I have a problem encounter this Imports ReportPrinting references. I need more infomation but when i search in web not much of information being retrieve.Hope u guys can help me out. Provide me link or information on this
Thanks a millons
KaKaShi HaTaKe
|
|
|
|
|
Sir/Madam,
I have a control ,I am passing that control in another function in the following way
like if i have invoked a datagrid , it's name is dg1.
sub abc()
{
binddata(dg1)
}
binddata(byval c as control)
{
'Now i want to assign the memory of c to datagrid control
dim d as datagrid
d = c
'But the above line shows error
}
'Please help.
|
|
|
|
|
amaneet wrote: dim d as datagrid
d = c
the type of c and d is not the same so you must use type casting to convert c to DataGrid
try this
d=(DataGrid)c
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
I have wrote timer routine in Visual basic Editor in Ms Excel2003 in which the timer will update the values of the cells of procedure opcavgtemp automatically after each 2 minutes .
Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "OPCAvgtemp"
sub opcavgtemp()
'code to be executed every 2 min
StartTimer
end sub
sub StartTimer()
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
End Sub
The problem is when Itry to migrate this macro code to VB 6.0 it show for me error , object required.
Could anyone help me please urgent ??
|
|
|
|
|
alhomed44 wrote: Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, _
schedule:=True
In VB6 you have NOT an Application object hence it complains about.
You can use a Timer control to obtain that stuff.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
how to add textbox to datagrid in winforms and display the value in it
|
|
|
|
|
Your question is somewhat vague. Would you care to elaborate?
Posted by The ANZAC
|
|
|
|
|
how to add textbox to the datagrid
|
|
|
|
|
By using datagrid view property,
Go to columns property and select what type of columns you want ie., u can add textbox,checkbox,button columns etc.
Janani
|
|
|
|
|
i have a question for this .. how can i retrieve a specific textbox but? because there would be for example about 5 rows with textboxes. how can i take control of the for example the second row textbox?
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
I am a newbie to vb.Net, I am self taught to a basic level on MSAccess. What i am trying to do is create an MDI application. Part of the application is to open a form with no data assigned to the controls, then open a form to set the query and return this result to the main form as the data. I m getting confused with datasets, tableadpators etc. Can someone point me in the right direction please. Also i want the filter form to be the topmost and hold the focus until a filter has been submitted or a cancel button clicked.
Confused newbie
|
|
|
|
|
http://msdn.microsoft.com/vstudio/express/vb/learning/default.aspx
Try this, should get you started on vb.net, if you want to go straight to database and skip the basics, i recommend episodes 8 and 9 of the beginner series. If you are new to vb.net though, it might be good to do the lot, they are great for learning.
Posted by The ANZAC
|
|
|
|
|
Thankyou for the reply i will certainly look through these. I have been using a book from the library by 'WROX' to get me started. It explains datagrid views, and in general i understand the concept of binding the form to a table through using Access, but I am getting confused with the passing of a dataset back to a form. Is it as simple as Open form 1 with databind to the empty dataset. Open form 2 (filter/query form), on click handle event use parameters to fill dataset. return focus to form 1 and fill with bind to dataset which has info in it now/or not dependant on parameters.
Am i barking up the wrong tree? and is there an easy example of this i can view for guidance?
With regards to the filter form remaining on top, I have set this form to property ON TOP and I am using the If form.focused = false then form.focus() to keep the form active/focused and the topmost. This is primitive i know and it is not working on all occasions though, any pointers appreciated.
|
|
|
|
|
I am trying to bring up an Excel sheet when I click on a command button in Access. Can someone help me with the code?
PS I am very green at programming VBA.
Thank you,
Jake Wagner
|
|
|
|
|
You have not sid if you want it on a form in Access or to bring it up in another window.
I am not sure if you can do this in VBA, but in VB6 to load the spreadsheet into a form you place it in an OLE Container.
To bring Excel up in a seperate window you could try using the excel object by setting a reference in access to the excel.olb
David Loring
!! Keep Music Live !!
|
|
|
|