|
This is the first time I've EVER heard of a form moving up and down while doing some kind of processing. What is your coding doing during that process? Wiuthout knowing anything about your code, it's IMPOSSIBLE to tell you how to fix it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have a dll that is written on VB6 environment. I want to reflect it to get source code but I haven't tool to do it. would you help me?
Thanks a lot
Hung Nguyen Viet
|
|
|
|
|
VB6 is not like VB.NET, it is not written in MSIL, if there's a decompiler, it's not a reflector.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for your advice!
Agree that it's not a reflector, but I want to get the source code (by anyway). If you have experiences on this task, might you tell me about it?
|
|
|
|
|
AFAICT, you can't. I haven't seen any decompilers for VB6 code. If you do find something, at best, you're going to get an approximation of what the source MIGHT look like, and it may not even work!
There is no direct coorelation between the individual statements in the (machine code) .DLL and VB statements. There can be groups of (machine code) statements in the .DLL containing dozens of lines that amount to a single statement in VB. The problem is seeing that pattern in the machine code and know what it means. This is also complicated by optimizations that the VB compiler does to speed things up.
It's not like doing the same thing with C/C++ code. VB is a higher level language compared to C/C++, which is more closely related to machine code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If my datagrid is readonly = true.
Then it cannot be modified from inside datagrid but i want to allow deletion of row if 1 or more rows are selected and this is event raised after the delete button is pressed.
How will i code this
|
|
|
|
|
You don't delete anything out of the datagrid. You delete the records out of the underlying datasource, then refresh the datagrid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
tnx i have made it! using the command
index = datagrid.currentrowindex()
ds.Tables("tablename").Rows.RemoveAt(index)
i can delete the selected row from record on the datasource
a follow up question
how can i delete the records underlying the datasource, if i have selected 2 or more rows for deletion? because the command can only delete one row.
|
|
|
|
|
how TO ADD CRYSTAL REPORT TO WINDOWS APPLICATION
|
|
|
|
|
Add Crystal report component to your application. Are u using VB/ VB.NET?
<italic>Work hard, Work effectively.
|
|
|
|
|
How can I print the html code which I get as a parameter to the function. If I use "Printer.print" then it prints the html tags itself(ie......) But I want to print the output as it is shown in the web browser.
|
|
|
|
|
If you want to print it as HTML, you need to print it from a browser. You can embedd IE in your app.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I will explain you the whole scenario. I have an asp page (say print.asp) which generates reports depending upon the id passed to it(print.asp?id=52). I want to print this document using the printer on the server where asp application is installed.
For this I haev written an ActiveX dll in VB 6.0. So wht I'm currently doing is.... Reading the html of the asp page and passing the html code to the ActiveX dll.. I'm passing the html code to preserve the formatting of the page.
DO you have any other ideas for this kind of Scenario. or may be as u mentioned in ur reply ... how to embed IE in the ActiveX dll.
Thanks a lot Christian.
|
|
|
|
|
Adarsh Shah wrote:
how to embed IE in the ActiveX dll.
I doubt you can, I reckon you need a GUI app to do that.
I don't see how else you can parse HTML though. Why do you want the server to print it, can't you render it to a window on the server and print from there ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok..
1) Can I open an IE browser from the activeX dll which will have the link to the asp page (ie print.asp?id=52). and then print it some way that doesn't ask for print prompt.
2) Or may be I can call a VB application with WebBrowser control and print it.
3) Or I found something: which blocks the print dialog box .. and I can specify the direct path of the print page
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
a = Shell("rundll32.exe mshtml.dll,PrintHTML " & """" & temp & """") '""C:\a.html""")
wnd = FindWindow(vbNullString, "Print")
While wnd = 0
wnd = FindWindow(vbNullString, "Print")
Wend
Call Sleep(100)
AppActivate "Print" 'PageCount
SendKeys "{ENTER}", True
I think the 3rd method is the best one... Any suggestions on this?
Thanks again Christian.
|
|
|
|
|
Adarsh Shah wrote:
Any suggestions on this
I think it sounds the best as well, but the truth is I'm on the edge of my VB ability. Hopefully Dave will step in and fill the gaps for me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok Fine.. Thanks Christian.
|
|
|
|
|
1) Won't work. You don't have and can't put into your ASP.NET app, a Windows Form to host the control.
2) Will kind of work, but is a pain to work with. Since IIS doesn't interact with the desktop, the application is launches will never see the light of day.
3) Best option and least resource intensive.
I can see a couple of pitfalls if your code is not written correctly. When you save the HTML to a file to print, make sure your code gets a temporary filename from the system (there's an API for it, but I can't remember what it's called off the top of my head).
Also, you MIGHT have a problem with FindWindow, since this is dependent on having one. No desktop, means no window. Whether this works will depend on IIS (I'm no expert on it.) You'll just have to try it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I will try out the 3rd option and let u know how it went.
Thanks a lot Dave.
|
|
|
|
|
I created a console app using vb.net called MyApp.exe. The application is designed to use MyApp.exe.config. However, I cannot read any of the values in the config file. I get blank/null values for strDBConn when I use either of the following statements.
strDBConn = ConfigurationSettings.AppSettings("DBConnectionString").ToString
or
strDBConn = ConfigurationSettings.GetConfig("DBConnectionString").ToString
What am I missing?
Thanks,
Sam
|
|
|
|
|
Hi everyone,
I just want to ask what could be the fastest way to read a 2.3GB Sequential File in VB.NET? Below is the sample content of the file that I need to process(i.e Field Cound,Record Count, Edit Field Value,Remove Field Value, Insert New Record). Basically you will see RECORD TAGS(first 2 characters in each line - H0, A0, A1, A2, A3, A4, C0, C1 etc..)
H002/4810/03/4865000 200140 11163992 5 502D0312142055-298162 298162 A0
A0SAMPLE A. SAMPLE
A11234 ANYWHERE ST.
A2LOCATION SOMEWHERE
A3CITY OF ANGELS
A4ZIP12345
C0 100.00 30.00 117.00 534.00
C1 781.00 835.67 54.67 781.00
C221/02/4800005041 39
T0025842439 11564921/01/48SAMPLE LINE1 2 4.00
T0012840937 16050121/01/48SAMPLE LINE2 1 3.00
T0069263013 20212521/01/48SAMPLE LINE3 2 6.00
T0069263013 20251821/01/48SAMPLE LINE4 1 3.00
T0069263013 21541421/01/48SAMPLE LINE5 1 3.00
T0 ** TOTAL ** 150 534.00
A0SAMPLE B. SAMPLE
A11234 ANYWHERE ST.
A2LOCATION SOMEWHERE
A3CITY OF ANGELS
A4ZIP12345
C0 100.00 30.00 69.00
C1 199.00 212.93 13.93 199.00
C221/02/4800004848 23
A0SAMPLE C. SAMPLE
A11234 ANYWHERE ST.
A2LOCATION SOMEWHERE
A3CITY OF ANGELS
A4ZIP12345
C0 100.00 66.00 485.00
C1 651.00 696.57 45.57 651.00
C221/02/4800005698 22
T0097032980 15184121/01/48SAMPLE LINE1 1 2.00
T0062114547 12012822/01/48SAMPLE LINE1 1 2.00
T0097032980 13101022/01/48SAMPLE LINE1 2 4.00
T0097032980 13191322/01/48SAMPLE LINE1 1 2.00
T0040483534 08590724/01/48SAMPLE LINE1 1 2.00
Thanks/Regards
Sidney™
|
|
|
|
|
Hi everyone... just a follow up on my question above May be you can give me some input on how to acheive this. Co'z honestly all i can think of right now is to use Line Sequential Access, I dont think i can use BinaryReader right?
Thanks/Regards
Sidney™
|
|
|
|
|
how to make a label control grow in height with width constant at runtime (to show its entire contents) in vb.net?
|
|
|
|
|
Hello,
To change the width/height of a label control during run-time use:
Label.Width = SizeInteger<br />
Label.Height = SizeInteger
If you want the growth animated, use a timer control and some code similar to:
If Label.Width < MaximumWidthInteger Then Label1.Width += 1<br />
If Label.Height < MaximumHeightInteger Then Label1.Height += 1
I hope this helps,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|
|
This is my first post to this discussion board so please forgive me if I am not yet following all your posting rules. I have a simple question about wrapping headers in a listview.
Is it possible to wrap a header row in a listview so that the header row wraps on words to two rows? I am reading in a text file that contains the header data and the row data but some of the headers are verbose so I need them to wrap to two lines. Code included below.
Private Sub PopulateTable(ByVal name As String)
Me.Controls.Add(Me.ListviewTable2)
FsrStreamReader = New System.IO.StreamReader("PreviousSaves.txt")
'Use this variable to store a read line from the file
Dim sLineFromFile As String
FbReadingFirstLineOfFile = True
'First of all clear the listview completely
Me.ListviewTable2.Clear()
Me.ListviewTable2.Show()
'While our streamreader is not at the end of the file
While FsrStreamReader.Peek <> -1
'Read in the next line from our textfile
sLineFromFile = FsrStreamReader.ReadLine()
'If this is the first time that we read a string from the file, we take this string as the collection of columnheaders
If FbReadingFirstLineOfFile Then
'Split the string using the tabs between the columnheaders in the file
'Loop trough our split collection and for every columnheader we add a column to our listview
For Each sColumnHeaderString As String In sLineFromFile.Split(vbTab)
Me.ListviewTable2.Columns.Add(sColumnHeaderString, 125, HorizontalAlignment.Right)
Next
'We can reset this flag, the next lines is data, not columnheaderinfo
FbReadingFirstLineOfFile = False
'This is not in the first line from the file. We've read data now
Else
'Split the string using the spaces between the data chunks in the file
'Add an item (and it's subitems) directly by using the split array.
Me.ListviewTable2.Items.Add(New ListViewItem(sLineFromFile.Split(vbTab)))
End If
End While
'Close the streamreader to free the file
FsrStreamReader.Close()
End Sub
|
|
|
|