|
From your repeated question about the same thing, it's bloody obvious that you have no idea how the JIT compiler works.
When you start your application, only the code that is required to start is compiled by JIT. JIT compiles code on a per-method basis, and only done once per execution session. This means that when a new form is loaded, only it's startup and rendering code is compiled. If you have a button on the form, the buttons Click event and other handlers ARE NOT COMPILED! They are only compiled to machine code upon first execution. This means that your Click event handler code is only compiled when you click the button for the first time!
Here, read this[^] on Performance Considerations. It explains how alot of this stuff works. Read it, understand it, then apply this knowledge to your existing code. God forbid, you might even find and fix your own problems using this knowledge.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i created one vbcall.exe and working succes fully
and now wat i want is i have to call one another exe in the above exe(vbcall.exe) and pass values to that
can someone help me?
|
|
|
|
|
You can use process.start, and you may be able to pass values. It's not the right way to do things though. ShellExecute allows you to pass values on the command line, for sure.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for reply if posible send any example code to pass variables immediatly
|
|
|
|
|
What are you talking about? Since you have the application written already, are you sasying that you didn't design in any interprocess communication or processing of command line arguments?
If you answer yes to both of those, then you have to go back and rewrite your application to support this, otherwise, you can't send anything to it because it's not written to listen for it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Iam working on vb.net project. and my project is having three layers Prsentation,Business and data on different server.Iam accessing business layer through remoting(com+pplication)and business layer is giving call to data acess layer and then data access layer gives call to data and visa-versa.Problem is here that my application runs very slow It taken time to load my form under menu and it moves up and down while loading.
please help me to speed up the application.
Please give me the solution so that can be implimented.
Regards
Prashant.
Prashant
|
|
|
|
|
Why on earth are they on three servers ? Kill the COM+ stuff, move them to one server, and get them to talk to each other by importing the dlls that you build for the business and data layers. That's if you want to maximise speed.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello Prashant
though you did not helped me out of sending dataset from remoting component to application but here are some suggestions for you.
I had a COM+ application and it runs slow some times and some time faster I never knew why . what I did was the following
1. Used threads ... like I build Loadform procedure on every heavy form and used threading on it during load
2. Make that LoadForm procedure public and call it this way
Dim frm as new form1
frm.loadform()
frm.show
use
gc.WaitForPendingFinalizers
gc.collect
in finally tag for try so that there should not be any memory issue. as it often comes in these type of applications..
Actually your application needs optimization for the code and thats all.
best of luck
|
|
|
|
|
Hello RIzwan
Thanks for your reply.My problem is not for specific form but for whole application when it loads under my menu.Actually when i load my application my menu gets loaded and under my menu, my forms gets loaded when i select any form my problem is
1.Its take time to load
2.its move up and down when it loads
and this is case for every form alternetly
so please understand my problem and suggest me the solution
Regards,
Prashant
Prashant Pawar
|
|
|
|
|
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++
|
|
|
|