|
?? ??
What does it mean?!!
|
|
|
|
|
Hi, I am programming in vb6 a program that deals with huge arrays which need to be saved/loaded. I used a simple for-next and Print# to print any item in the array to the file and Input# to load it.
But it is too slow... I need a better algorithm/method to do this if available...
could you please help me out?
|
|
|
|
|
I can't believe a 20min process now is done only .6sec!!!!!
Print #1, Join(a,",")
to save and split to load..
|
|
|
|
|
In C# I can do the following:
<br />
int nSize = 24;<br />
object[] pObjArray = new object[nSize];<br />
How do I do the same in VB.NET? Thanks.
|
|
|
|
|
Integer nSize = 24
Object() pObjArray = new Object() {nSize}
|
|
|
|
|
Wooster2006 wrote: Integer nSize = 24
Object() pObjArray = new Object() {nSize}
This is not correct.
This creates an array containing 1 element whose value is 24.
|
|
|
|
|
Dim nSize As Integer = 24<br />
Dim pObjArray(nSize) As Object<br />
<br />
'// And to test it:<br />
pObjArray(24) = "Test"<br />
MsgBox(CType(pObjArray(24), String))
There you go!
-- modified at 11:38 Tuesday 23rd May, 2006
|
|
|
|
|
j-on wrote: Dim nSize As Integer = 24
Dim pObjArray(nSize) As Object
Not quite right.
This array contains 25 elements. Not 24.
In VB.NET, the value that you use to set the array size does not represent the "Capacity" of the array like how it's done in C#. It represents the max "Index" of the array. And remember that arrays in VB.NET are zero based. So, if you count the elements from 0 to 24, you have a total of 25 elements. What you want to do is this instead.
Dim nSize As Integer = 24<br />
Dim pObjArray(nSize - 1) As Object
This is one of the major difference between C# and VB.NET's handling of arrays.
-- modified at 18:51 Tuesday 23rd May, 2006
|
|
|
|
|
Hello Blue Bird.
The first 2 responses that you received were not quite correct. Please look at my responses to them.
The following C# code...
int nSize = 24;
object[] pObjArray = new object[nSize];
Will look like this in VB.NET...
Dim nSize As Integer = 24
Dim pObjArray(nSize - 1) As Object
The big difference here is that the array initializer in VB.NET represents the largest index (ie: upper bound) and not the capacity of the array. That's why you should tack on a "-1" as shown above.
You can also generate an array like this via the "ReDim" statement.
Dim pObjArray() As Object ' Array not created yet.<br />
ReDim pObjArray(nSize - 1) ' This create a new array.<br />
ReDim pObjArray(1) ' This creates a new array having 2 elements.
You can also create an array and initialize it at the same time like this...
Dim pObjArray() As Object = {1, 2, 3}
Or like this...
Dim pObjArray() As Object<br />
pObjArray = New Object() {1, 2, 3}
I hope this helps!
|
|
|
|
|
Our Instant VB C# to VB.NET converter produces:
Dim nSize As Integer = 24
Dim pObjArray As Object() = New Object(nSize - 1){}
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
DEAR CANDIDATES,
tHIS IS MY WARNING MESSAGE ABOUT WWW.YARDI.COM -A SOFTWARE COMPANY AT PUNE.THOSE PEOPLE ARE MAKING FOOL TO ALL NEW DEVELOPERS.
THEY ARE TAKING EXAM ON VB.NET AND SQL.QUESTIONS ARE SIMPLE.
BUT IN TECHNICAL INTERVIEW THEY ARE PRESSURISING CANDIDATES TO JOIN AS TRAINEE ON VBSCRIPT-MANUAL TESTING.SALARY IS JUST RS 6500/- PER MONTH GROSS WITH 2 YEARS BOND.
FEW FOUL QUESTIONS ON SQL IN INTERVIEW:
1.IS THIS SQL OR STORED PROCEDURE:
DECLARE @EMP INT
SET @EMP=(SELECT AVG(QTY) FROM EMPLOYEE)
SELECT * FROM EMPLOYEE WHERE EMP_ID=@EMP
ANS: IT IS AN STORED PROCEDURE-SHOCKED ! ANSWERED BY PROJECT LEADER
2. HOW DO YOU CREATE CRYSTAL REPORT FOR EACH TAG OF AN XML FILE.
CAN YOU ANSWER SUCH QUESTIONS .WELL IT'S MEAN YOU DONT KNOW.
SO JOIN AS VBSCRIPT DEVELOPER WHICH IS A PART OF VB.NET------WAOOOO?
3. STATE DIFFERENT TYPE OF STORED PROCEDURE?
ANSWER THREE AS PER MICROSOFT.
BUT BY YARDI GROUP ANSWER FOUR.
EXTENDED IMPLICIT STORED PROCEDURE.
CAN YOU EXPLAIN WHAT EXACTLY IT IS!
IF YOU STILL DONT BELIEVE YOU CAN GO SUCH FUNDOO PEOPLE IN YARDI.
I SAY FOOL HARDY.
ADDRESS:
2 ND FLOOR SIGMA HOUSE,
OFF. SENAPATI BAPPAT ROAD,
PUNE.
Encryption and decryption with .NET
|
|
|
|
|
Hi all!
My issue is very simple and is as follows:
Is there any way to hide controls just in Design View? Let me explain my situation. I'm currently working on an app that will have an Outlook 2003 look and feel with an outlook navigator panel on the screen's left with a contents panel on the right. Based upon the user's selection from the navigator panel, the contents panel will need to display the appropriate controls, data, etc. I have found no easy way to hide a particular set of controls from the contents panel (assigned to one choice from the navigator panel) so I can begin work easier on the next collection of controls for the contents panel (based upon a new selection from the navigator).
Any ideas?
|
|
|
|
|
I'm not entirely sure about what you are trying to accomplish but it seems like you are looking for the Visible property that makes controls visible or not based on the selection.
|
|
|
|
|
Let me phrase it another way:
Suppose I had four buttons with each button assigned one specific panel that should be displayed when its button is clicked. Each panel would have its own set of controls and the like about it. What I'm asking is not how to hide certain controls (or an entire panel) via code but rather how to do it in the Design View as I am working on designing the panels.
As it is right now, what I have is the following: a panel manager with four subpanels (buttons if you will) that are used to select what it is you would like to view in a main, contents panel which takes up most of the screen. This contents panel needs to be updated with the appropriate controls and such based upon what the user chose to view from the panel manager. Think of it like a webpage with frames where the left, thin frame holds links that when clicked display the result in the main, larger frame. My problem is that I can't design the UI effectively when I have nine million controls sitting on the screen and I have no way of hiding them so I can work on the next "button"'s content.
|
|
|
|
|
As far as I know there is no way to hide the controls in the design view...
But once I had to do some panel work like what you mentioned... I designed each panel in a separate form and when I was sure that everything is okay, I copy&pasted all in a single form...
|
|
|
|
|
There might be two different ways, Try using tabs, one tab for each subset of controls, or try child forms, Forms within forms, much like documents in a word processor.
Either way allows you to place controls into groups, that are only visible when the form, or tab is active, both at design time and at run time.
JohnSQLer
|
|
|
|
|
The only way I have seen this work, is to go ahead and place all your panels on the form, one on top of the other. Then when you are not working on the panel that is currently on top, right-click on the panel, and select "send to back". Repeat this until the panel you want to work on is on top. I hope you don't have too many panels .
Roy.
|
|
|
|
|
Thank you for all the responses! I was able to figure out a solution to my problem and as a result I've got to admit I feel like such a VB.NET rookie.
I come from a C/C++ background where most of the UI and its functionality was done in code rather than from a form designer. As such I was unaware of the applications of "User Controls" in VB.NET and just how powerful they can be. What I did to solve my problem was simple: I created a new User Control for each "panel" I wanted displayed based upon the user selection from the Navigation panel. When a selection is made the "SelectedPanelChanged" event fires in which I have a series of test cases to test what selection the user made. Within each test case I have code along the lines of the following selection-specific example:
If (panMain.SelectedPanel.Text = "Search") Then
Dim xSearchControl As New TQTSearchControl
With Me.panContentsContainer.Controls
.Clear()
.Add(xSearchControl)
End With
End If
-- modified at 9:16 Thursday 25th May, 2006
|
|
|
|
|
Hi This is Ruchika.
working with images n getting difficulties while resizing the pics.trying to use controlpaint class but didnt get success.
Is there anyone can help me.
thanks.
|
|
|
|
|
I use FSO to make a treeview of all he folders on my harddrive (or watever folder was selected). I would like to be able to quit the search for folders in the middle but I cannot do anything until the program is finished. How can I stop it in the middle? Also, while it searches down the folder, i want it to display 'the folder it is currently on' in a label but the label does not update until the program is finished. Can any advise?
Almerica
|
|
|
|
|
Run the folder search procedure on a different thread than the UI update thread. This will solve your label update problem and make it possible to abort the search before it has completed its task.
|
|
|
|
|
I am new to Windows programming. Can you guide me in the right direction of how I would a ccomplish this.
|
|
|
|
|
It would be much easier to show you what I want but I will try to describe it. We have a big office with 10 receptionists and we want to create something like a calendar control where they can schedule many patients in a particular time slot on a particular week day. Let me try to draw the control that I want:
Checkbox for Schedule immediate/walk-in Appointment
This Week Next Week
Appointment Time|05/22/2005|05/23/2006| 05/29/2005|05/30/2005
8:00 | 5 | 2 | 4 | 3
9:00 | 6 | 3 | 8 | 2
10:00 | 0 | 0 | 1 | 4
All the information would be read from a database so the appointment times and the number slots would be different from day to day. This is how it would work: if a receptionist clicks on the first slot that shows 5 (under 05/22/2005) to schedule an appointment for a patient, then the 5 should be decremented to 4. If 2 receptionists click on this same slot, then the resulting number should be 3, as the information will be shared by all 10 receptionists.
To design the control, I was thinking of using 2 datagrids but I'm not sure how to start. Also,
1. I would like to put one color for This Week data and another color for Next Week data.
2. When the receptionist clicks on a slot, they should get a pop-up window
3. Past information would be greyed out (If it is 12 p.m today, the receptionist shouldn't be able to schedule appointments for 8:30 this morning.)
4. It would be good if the control could be designed so that other applications could use it and not just my reception application. (Custom or user? which is best?)
5. The information would have to be constantly refreshed in the control as receptionists use the slots. Note that the receptionists cannot change the values of the slots.
Sorry for making this so long. Please point me in the right direction! Thanks in advance.
Sanna
|
|
|
|
|
Hi Friends
i Created 1 application of Three -tier Architecture. all three layers are running well on My Single PC but when i kept 2 layer(Business and Data Layer) on server then My User Interface Layer Cant connect Those layer on Server because of Port. so Please Help me to solve this Problem and Please Give me information about Port.
Dilip
|
|
|
|
|
I set ListView.ShowGroups=TRUE but i couldnt see the groups on listview at Windows 98 client
W H Y ?
H
Y
?
|
|
|
|