|
WuJunyin wrote: Do you know other way to improve efficiency?
Depends on a whole heap of factors, not the least of which is the size of your database, what database engine you are using, the number of transactions on the database (including your app and others that may be accessing it concurrently) etc...
Simply reducing the number of database queries by caching data already retrieved will improve it too (saves a round trip to the database server).
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
Thanks for your reply.
I using MS Access as my database engine. And my app is a simple app. there is alway one transaction when app running.
--
Steve Pullan wrote: Simply reducing the number of database queries by caching data already retrieved will improve it too (saves a round trip to the database server).
If vb6.0 has a control or class like .NET component 'DATASET', can it improve efficiency?
If answer was yes, how do I written a class or control like 'Dataset'.
Any assistance would be really appreciated.
|
|
|
|
|
I developed a prototype GUI with Visual Basic .NET 2005. The problem that I am having is with window redrawing itself. I have two forms (two windows) and when one form shows the second form { .Update() and .Show() } and hides itself { .Hide() }, the second form redraws itself twice - one before .Hide() and the other one after it. I need to prevent this redrawing, because it is useless and looks ugly. Do you have any suggestions on how to do that?
Thank you
|
|
|
|
|
Why are you calling Update on this second form, then Show?? You're telling the form to redraw itself twice, then it might do it again after you call Hide on the first form. Don't call Update when you don't need it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The thing is that this is supposed to be a "fancy interface". When a user does some manipulations and clicks a button, one window gradually disappears while the other gradually appears. The implementation based on changing Opacity property. I have just tried without update and show, and I am getting the same effect - right after the opacity reaches 100% for one and 0% for another form, the visible form starts redrawing itself completely. Looks like something tells the window to redraw itself completely with all its children. And this something seems to reside outside my code...
|
|
|
|
|
Now I know what you're talking about. No, there is nothing you can do about it. This is something that happens in Windows Forms. I haven't been able to find anything documenting what's causing it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i m amking my project for IDE so i want the button code for
Find and replace
form1 contain Richtextbox
form2 contain find and replace form
from form2 search text in form1
i want the code please help me
zabsmarty
|
|
|
|
|
Would you care to read the documentation on the RTB's Find[^] method before asking us to write a bunch of code for you? (Which we won't do, BTW.)
We're here to help you with YOUR code, not write it for you. If you've got specific questions about problems you're having, great! You've come to the right place! We'll point you in the right direction so you can learn something while writing your code. If you have other people write it for you, you won't learn anything...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:32 Sunday 12th March, 2006
|
|
|
|
|
Hi.
Is there any method to enumerate, start, kill processes in vb6? I searched a lot but didn't find anything useful.
Thanks
|
|
|
|
|
There's nothing native to VB6 that will do this. You can do it using WMI though, and its Win32_Process[^] class.
You can find out more about using WMI in your own apps here[^]. VB6 would be using just about the same techniques as VBScript.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to fix the directory of the File Open/Save dialog and NOT allow the user to change it ?
For example:
c:\fixeddiretory
|
|
|
|
|
That's not supported in the standard OpenFileDialog. You can set the InitialDirectory property to the path you want, but you can't prevent the user from navigating out of it.
You could implment your own OpenFileDialog class by inheriting from CommonDialog and writing you own control from there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Do you know of any examples ? or know where to start ?
|
|
|
|
|
Or you can use .NET components such as FileListBox, DirListBox, DriveListBox
chatura
|
|
|
|
|
I suggest you that add a form for this function.
Add some controls on it.
Then, you can do anything you want.
|
|
|
|
|
vb.net 2003
I create 3 Textbox put in to a form (Form Name : Find) Tab order is 0 ,1 ,2.
I take MDI application. Then select the menu using keyboard Example( Alt E) then
select find menu Then PressEnter key. The "Find" form is open. To automatically
call the First Textbox keyup Event. How can I stop this firing.
Continue...
|
|
|
|
|
This is the way that I thought……
Dim X As Boolean = False<br />
<br />
TestBox_KeyUp Event<br />
<br />
If X = False Then<br />
X = True<br />
Else<br />
(your code)<br />
End If
chatura
|
|
|
|
|
i was trying to make change on the text from the other form by using the array in a loop but the error about which it's not a member of the form1??? y?? i check properly the label was there and with correct name....
C:\Documents and Settings\acer\My Documents\Visual Studio Projects\SnL1\SnL1\PlayerSelect.vb(492): 'com' is not a member of 'SnL1.Form1'.
here my coding:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim com As Label() = ControlArrayUtils.getControlArray(Me, "com")
Dim x As Integer
Dim game as new form1
Game.NumPlayer.Text = ComboBox1.Text
Game.PTurn1.Text = TextBox1.Text
Game.PTurn2.Text = TextBox2.Text
Game.PTurn3.Text = TextBox3.Text
Game.PTurn4.Text = TextBox4.Text
For x = 1 To Val(ComboBox1.Text)
Game.com(x).Text = y
Next
Game.Show()
Me.Hide()
End Sub
|
|
|
|
|
"com" is a variable in your code, not a member of the form.
---
b { font-weight: normal; }
|
|
|
|
|
actually i found a lot of tis similar problem even i change the name it still hapen especially when refer to other form and not itself...
|
|
|
|
|
'com' is a local variable in your event handler method.
When you define a local variable in a function/method this variable is not in the group of from's/class's member variables so if you wish to use it just call it with it's name.
HL
|
|
|
|
|
rompnet wrote: i was trying to make change on the text from the other form
You should NOT be doing this. In proper OOP and UI design, one form should not be making any modifications to the controls of another. You should be exposing the data on your second form as Public Properties, so any other form that creates this form can retrieve any data it needs and can update it's own controls with that data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
help in making the code for the following buttons
1. copy
2. cut
3. paste
4. select
4. redo
5. undo
6. find and replace code
please reply me soon
zabsmarty
|
|
|
|
|
If you use a RichTextBox or a TextBox, it is very simple.
Eg :
RichTextBox1.Copy() …….. <br />
RichTextBox1.SelectAll() <br />
RichTextBox1.Undo() ……<br />
RichTextBox1.Find(……..), <br />
RichTextBox1.SelectedText = ………………..
chatura
|
|
|
|