|
I tried the same code u wrote it shows the error message like
'ItemData' is not member of 'System.windows.forms.combobox'
please suggest what to do with this error....
thank u in advance...
|
|
|
|
|
ComboBoxes are handled differently in .Net than in VB6, so much so that it is beyond the scope of a forum post to explain. If you Google for VB.Net combo box tutorials I'm sure you'll find something.
But saying that, it seems like you want to populate the combo box with the months of the year, right? What I would do is create a user defined structure called Month with 2 properties, MonthName and MonthNumber and then bind the combo box to a collection of Month structures, setting the ValueMember and DisplayMember properties of the combo box.
Hope this helps.
(you could also do it by populating the ComboBox with strings and by using ComboBox.SelectedIndex - 1 to get the month number but I think this may be regarded as bad practice.)
|
|
|
|
|
For your purpose you could use the DateTimePicker control, and set the CustomFormat property to MMMM
The DatTimePicker looks like a combobox, and with the CustomFormat property set to four M's, it will show you the name of the month. When opened it shows the user a calendar.
In your code you can access the chosen month's number (an integer) like so:
DateTimePicker1.Value.Month
If you need to do more with dates, the DateTimePicker value is of type Date, so you can access a lot of other values from a chosen DateTime. Like DateTimePicker1.Value.Day, DateTimePicker1.Value.Hour, DateTimePicker1.Value.Year, etc.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
May i know how can i invoke msi thru a batch file....
|
|
|
|
|
Edit the bat file with following command
msiexec /i "FileName.bat"
|
|
|
|
|
The general command line is for an unattended install with a minimum GUI:
msiexec /i installername.msi /qb
If you need to add a Transform file:
msiexec /i installername.msi TRANSFORMS=transformname.mst /qb
All the available options for MSIEXEC can be found by just typing MSIEXEC into a Start/Run box.
|
|
|
|
|
You can run any windows.exe from dos by putting the word 'Start' infront of it.
start myfile.msi
or
start notepad.exe
or
start http://www.yahoo.com
etc
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hi Friends,
I am using Microsoft Visual Interdev 6.0 in my system. It was working fine. But for the last 2 days i am facing problem, that when I click Visual Interdev 6.0 to open its giving error:
"Development Environment has Encountered Problem and needs to Close. We are sorry for the inconvenience."
I tried uninstall and install again. Still I am facing the same problem. I have Visual Studio 2003 installed in my system and with that interdev was working fine for the past 1 year. Please Please help me. Because formating system and installing again is a rock work. Please friends help me..give me ur suggestions...
Thanks in Advance.
|
|
|
|
|
Visual InterDev isn't supported anymore, and hasn't been for quite some time now. This[^] Google result is about the best you're going to find for such an old app.
|
|
|
|
|
it sounds like your solution file is corrupt. have you tried to recreate?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
dear all
how to format the code of vb 6? sorry to ask for this point. i am a newbie. thanks a lot.
|
|
|
|
|
if you're new to programming, then choose a decent programming language.
VB6 is obsolete, dead and buried.
Microsoft has development tools for VB.NET, C++/CLI and C# downloadable for free; look for Visueal Studio Express Editions. And VS takes care of formatting for you.
|
|
|
|
|
As Luc said STOP doing any more work with VB6, download the FREE express tools and start with a language that is not DEAD
And yes I am shouting, you are making one of the worst mistakes in your young life.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
dear all
i am a newbie in vb6, so far i entountered a problem, how to calculate the value for listview subitem, my part code is here, anyone can help me, thanks a lot.
actually i am calculating the pixel amount in each index: for example: index value: 0, 1, 2 ...255.
when i click Button Execute in form frmHistogram: the code is following:
Private Sub cmdExecute_Click()
'Execute the computing
EasyMain1.Histogram EBW8Image1.object, frmHistogramVector.EBWHistogramVector1.object
frmHistogramVector.EBWHistogramVector1.Refresh
frmHistogramVector.Show
End Sub
and i wanna put the variable a as my subitem value, the code is the following:
Private Sub Form_Load()
Dim Min As Long
Dim Max As Long
Min = 0
Max = 255
With ListView1
.ColumnHeaders.Add 'add a couple columns
.ColumnHeaders.Add
.ColumnHeaders(1).Text = "Index" 'name the columns
.ColumnHeaders(2).Text = "Count"
.ColumnHeaders(1).Width = .Width * 0.35 'column width based on width of list view
.ColumnHeaders(2).Width = .Width * 0.5
Dim I As Long
Dim a As Single
With .ListItems
For I = 0 To 255
a = EasyMain1.AnalyseHistogram(EBWHistogramVector1.object, eImgPixelCount, 0, 255)
With .Add(, , I)
.ListSubItems.Add , , a
End With
Next I
End With
End With
End Sub
however when i run program, one popup dialog remind me: invalid number of vector elements.
what is problem here. thanks.
modified on Monday, April 13, 2009 10:19 PM
|
|
|
|
|
Are you stuck supporting an existing VB6 program or are you creating a new app?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks for your reply, i created new app using uersys lib.
|
|
|
|
|
Hi all
I have a listview with checkboxes which populates correctly
I want to be able to select items and have the actual file saved to any location using sfd
The items in listview are populated from TIF and are files such as *.swf, *.flv...etc
I want to be able to save the items(files) that are checked
The form has 2 buttons...button1 does the searching and button2 invokes the sfd
The listview has columns for number, filename, size and location
I am not able to accomplish this so any help is appreciated.
Thanks
sao
|
|
|
|
|
siralphaomega wrote: have the actual file saved to any location using sfd
And "sfd" is what???
siralphaomega wrote: The items in listview are populated from TIF
What do you mean by "TIF"??
siralphaomega wrote: I want to be able to save the items(files) that are checked
Are you talking about the strings in the CheckBoxList or are you talking about getting the files from a source location and saving them to a folder on the local machine??
|
|
|
|
|
Hi Dave
"And "sfd" is what???"
sfd is savefiledialog
"What do you mean by "TIF"??"
TIF is temporary internet files
"Are you talking about the strings in the CheckBoxList or are you talking about getting the files from a source location and saving them to a folder on the local machine??"
No not the strings but as you mentioned getting the files from a source location (tif) and saving them to a folder by using the savefiledialog.
The listview populates correctly fetching all *.swf for example
The user then places a checkmark next to items and clicks button2 to save the files...not the strings
I have the savefiledialog configured correctly and know how to call it but i don't know how to get the program to only save checked files.
Thanks for taking a look
sao
|
|
|
|
|
Dave...I'm posting the entire code
Button1 works perfectly. I need help with Button2 to link checked items to the savefiledialog
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' button 1 searches for items
' get cache path from registry in case it has been moved...
Dim path As String = My.Computer.Registry.GetValue _
("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Cache", Nothing)
If RadioButton1.Checked = True Then ' radio button 1 for *.swf
Me.ListView1.Items.Clear()
Dim fileSize As Integer = 0
Dim i As Integer ' counts items
i = 0
For Each foundFile As String In My.Computer.FileSystem.GetFiles(path, FileIO.SearchOption.SearchAllSubDirectories, "*.swf")
i = i + 1
fileSize = My.Computer.FileSystem.GetFileInfo(foundFile).Length
With ListView1.Items.Add(i) 'i is item number
.SubItems.Add(foundFile.Substring(foundFile.LastIndexOf("\") + 1)) ' Remove Path From Name
.SubItems.Add(FormatNumber(fileSize / 1024, 2, TriState.UseDefault)) ' convert to KB
.SubItems.Add(foundFile.ToString) ' path + filename
End With
Next foundFile
Label1.Text = "total =" & " " & i & " " & "items" ' displays total # of items
End If
''''''''''''''''
If RadioButton2.Checked = True Then ' radio button 2 for *.ico
Me.ListView1.Items.Clear()
Dim fileSize As Integer = 0
Dim i As Integer
i = 0
For Each foundFile As String In My.Computer.FileSystem.GetFiles(path, FileIO.SearchOption.SearchAllSubDirectories, "*.ico")
i = i + 1
fileSize = My.Computer.FileSystem.GetFileInfo(foundFile).Length
With ListView1.Items.Add(i)
.SubItems.Add(foundFile.Substring(foundFile.LastIndexOf("\") + 1)) ' Remove Path From Name
.SubItems.Add(FormatNumber(fileSize / 1024, 2, TriState.UseDefault))
.SubItems.Add(foundFile.ToString)
End With
Next foundFile
Label1.Text = "total =" & " " & i & " " & "items"
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
' Open SaveFileDialog box
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
For Each checkeditem In ListView1.CheckedItems
My.Computer.FileSystem.CopyFile(SaveFileDialog1.FileNam, True)
Next
End If
End Sub
End Class
|
|
|
|
|
loop through each item in the listview and test the checked property, process the item appropriately using the text and subitem information from the item.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi RAH
I have posted the entire code...Please take a look
sao
|
|
|
|
|
Instead of the savefiledialog try getting the target folder using the directory browser, then concat the target folder to the filename from the listview and use fileinfo.copy
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
i have an html file in Webserver..and when i invoke it from client it should create a registry in the client machine...im able to achieve this using Wshell.Regwrite but as shell is an activeX control it depends upon internet options and I should write registry without depending upon internet options....
Pls let me know regarding the same...
|
|
|
|
|
See this[^] thread on limitations and restrictions between a client and webserver. It is literally located about 2/17ths of an inch under this word. Stupid signature, about 1.5 inches under this word.
|
|
|
|