|
for problem one can you paste your code your should have somthing like
ComboBox.DisplayMember = "table.colum"
ComboBox.ValueMember = "table.colum2"
Private Sub ComboBox_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox.SelectedValueChanged
TextBox.Text = ComboBox2.SelectedValue
End Sub
this should give you whatever record is in colum2 when colum one is selected
make sure you spell the table and colum values right or it WILL give you just the text a good trick is if you are setting programically get the values by setting in designer first then just copy and paste
|
|
|
|
|
Thanks a lot.
We misssed on SelectedValue property. It's working fine now.
thanks,
Madhav
|
|
|
|
|
I am developing a custom component in the form of a specialized panel. To this panel i have added another panel. When a user adds a control to the specialized panel i want it to capture this action and place the new control in the panel i have already in my control. I have therefore, overrident the OnControlAdded Sub and added the following:
MyBase.OnControlAdded(e)
For Each c As Control In Me.Controls
If c.Tag = "BottomPanel" Then
c.controls.add(e.control)
End If
Next
However when i tell it to do this i get an error from visual studio itself saying, "'child' is not a child of this parent."
|
|
|
|
|
Reckon you need to use a for loop ( not for each ) so you can remove items from the existing controls collection, on the basis that I doubt a control can exist in two at the same time.
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 seen all the image that you have send , u thing you are getting error for Select Query, some "Object not found" error is coming , can you check the query again that wheather the table name correct or not !!!
|
|
|
|
|
I load an excel spreadsheet via oledb driver into a datatable. I fill in some blank fields. Now I want to save the changes. I tried using a commandbuilder and issuing myExcelAdapter.Update(myExcelDt) but I got an error that it couldn't generate an update command for a table with out a key field. No new records were added and none were deleted. I just want to overwrite or update the spreadsheet with the copy in the datatable as it has some fields that were blank filled in now. How is the best way to accomplish this?
|
|
|
|
|
It would seem if I want to update a record I will have to do it with a custom sql command for each record I want to update. As there is no key fields in the excel table I have no idea how to specify and update command either. I guess that is why the command builder couldn't come up with anything. I thought about deleting all the records in the excel database and writing back all the modified records from the datatable but then I read that the jet engine would not allow me to delete records from an excel db so I didn't even bother to try. My only choice now as far as I can see is remote control of excel or building another excel table and adding the records to that. I do not wish to do remote control of excel. It all would have been so much easier if I could have stayed connected to the excel spreadsheet read the record looked up the necessary data and written changes to the records then done a skip to get the next record and repeat.
|
|
|
|
|
hi
I lost my source code which was on my thumd drive now is it possible to get the source code from the exe file which is only pcs left from my project on my desktop. If so can someone please help
Thank you
steve Haris
|
|
|
|
|
You can NOT retrieve the source code from a Visual Basic 6 application, because it is converted into machine language (unlike .NET EXE which is reversable since it is interpreted by the CLR). The most you can get out of a VB 6 application is what they call a semi-decompile, which is the actual form elements (like textbox, combo, etc) using an application such as this one:
http://www.decompiler-vb.net/[^]
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
if I had an app which was developed in vb.net and does similar function would i be able to get the source code out of it like actuall function etc.... I was able to get the funtions name and stuff but not the way the function was written ??
if so could you please shade some light in how to archive that goal
thanks
|
|
|
|
|
S.Haris wrote: if I had an app which was developed in vb.net and does similar function would i be able to get the source code out of it like actuall function etc.... I was able to get the funtions name and stuff but not the way the function was written ??
if so could you please shade some light in how to archive that goal
thanks
Hi,
Assuming that the .NET application has not been Obfuscated, you can get all the code, including functions, classes and form elements (100% of the code) back. One of my favorite .NET decompilers is Dis#, which will can give you back C# or VB.NET code out of .NET exe or dll (depending on which one you choose). It can be downloaded here:
http://www.netdecompiler.com/[^]
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
as far as i know i dont think its been Obfuscated but on second hand how could i bee sure thats it has not been is there any way to tell
if so can you please shade some light I I dont mean to be a compelet Leacher... Sorry If I am being one...
|
|
|
|
|
S.Haris wrote: as far as i know i dont think its been Obfuscated but on second hand how could i bee sure thats it has not been is there any way to tell
Download the trial version of Dis# software and try to open it. If it opens it without a problem it means its not Obfuscated.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
You could always try using the suggested tool and see if it successfully completes and produces usable code..
Michael Davey
|
|
|
|
|
Apologies.. didn't see that the conversation had gone over the page!
Michael Davey
|
|
|
|
|
DigiOz Multimedia wrote: Assuming that the .NET application has not been Obfuscated, you can get all the code, including functions, classes and form elements (100% of the code) back.
Does that include comments and #ifdef'ed out sections? What reason exists for throwing all the source code into an executable? What purpose does it serve?
|
|
|
|
|
supercat9 wrote: Does that include comments and #ifdef'ed out sections?
You get the equivalent of the original code back. I don't believe you can get the comments back though, because the CLR just ignores those. Not sure about #ifdef.
supercat9 wrote: What reason exists for throwing all the source code into an executable? What purpose does it serve?
You don't throw the source code into the executable, the source code is used to compile the executable.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
in general a decompiler returns a synthetic source code that, when compiled again,
results in the same EXE/DLL. It will not include parts the compiler did not need,
such as comments, code snippets ignored by preprocessing, redundant statements, etc.
And it will not necesserally look like the original:
- variable names may be fictitious (local variable names typically are not present in EXE);
- program flow control may look different (for, while, ...) but will be equivalent
- the optimization may have moved lines around;
etc.
A .NET decompile will resemble the original much closer, since there is a lot of metadata
in the assemblies; decompiling a debug build may look very similar to the original,
except for the comments. In fact, compile then decompile is one way to translate a
source file to another programming language (e.g. VB.NET to C#), again loosing comments.
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
|
|
|
|
|
A .NET decompile will resemble the original much closer, since there is a lot of metadata
in the assemblies; decompiling a debug build may look very similar to the original,
except for the comments.
Okay, that makes sense. So it's not really storing the source--just enough information to figure out what the code is up to, plus (if debug information is enabled) a full symbol table.
BTW, why did compilers get in the habit of throwing debug information into a .EXE file? When debugging one could just as easily have the information in another file, and when not debugging it's not only useless bloat but it may also undermine any secrets stored within the application.
|
|
|
|
|
supercat9 wrote: why did compilers get in the habit of throwing debug information into a .EXE file? When debugging one could just as easily have the information in another file, and when not debugging it's not only useless bloat but it may also undermine any secrets stored within the application.
A lot of development systems (such as Visual Studio) give you a choice (Debug/Release,
several switches) about the amount of debug info in an EXE/DLL. They typically use extra
files (.PDB) for symbol definitions, and only use source files for showing the current file/function/line. Needing/wanting all these files is fine on the development machine,
it is troublesome on other machines where early testing shows some problems (files missing,
files out of sync, ...).
In .NET more info must be present in the EXE/DLL because of reflection: by default one can
interrogate an assembly as to what classes, fields, methods it is holding. Obfuscating
hides that information and would disable reflection, except for the names that are specially
flagged for this purpose.
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
|
|
|
|
|
sample code from intro to vb using .net (dana l.wyatt)
is as follows
********************************
Private Sub btnShowAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowAll.Click
If lstAnimals.SelectedItems.Count < 1 Then
Exit Sub
End If
Dim s As String
Dim index As Integer
s = lstAnimals.SelectedItems.Item(0)
For index = 1 To lstAnimals.SelectedItems.Count - 1
s &= ", " & lstAnimals.SelectedItems.Item(index)
Next
MessageBox.Show(s, "Selected Animals")
End Sub
***************************
and it works
but in my program it doesnt
I have to add .ToString to avoid
Cast from type 'DataRowView' to type 'String' is not valid.
but then it prints "System.Data.DataRowView" instead of the value member I need
**************************************
my code
If ListBox1.SelectedItems.Count < 1 Then
Exit Sub
End If
Dim s As String
Dim index As Integer
s = ListBox1.SelectedItems.Item(0).ToString
For index = 1 To ListBox1.SelectedItems.Count - 1
Console.WriteLine(ListBox1.SelectedItems.Item(index).ToString)
Next
MessageBox.Show(s, "Selected Animals")
any assistance would be greatly appreciated
also get invalid cast when try this
Private Sub btnShowAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowAll.Click
Dim s As String = ""
For index As Integer = 0 To lstAnimals.SelectedItems.Count - 1
Dim drv As DataRowView = CType(lstAnimals.SelectedItem(index), DataRowView)
s &= drv.Item("name or index of field") & ControlChars.CrLf
Next
MessageBox.Show(s, "Selected Animals")
End Sub
|
|
|
|
|
I am using VB6 and am trying to copy the text from a form to the windows clipboard and paste it into another program (ie MSWord)
In my program I have a button, when clicked it runs, pulls the data of my
Clipbpard.SetText COPY_MY_DATA.TEXT
this appears to copy the text in the COPY_MY_DATA field. If I ctrl-v to another field with in my program I can past the data.
But
If I alt-tab to word and ctrl-v I get something totaly differant
How do I updated the windows clipboard so I can paste to any application?
|
|
|
|
|
Have you solved this problem?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Yes thanks
Im my form I fill in my "CopyThisData" multiline text box.
Then I have a button that runs:
Clipboard.Clear
Clipboard.SetText CopyThisData.Text
When I Alt-Tab to MSWord and Ctrl-p I get the text that was copied.
Though, some times when I paste into word I dont get anything so I need to click the "Copy" button in my program again
|
|
|
|