|
Thanks for the help.... I am new to vb.net 2005 and I cannot seem to figure out how to view the designer generated code. It isnt in the code view like it is in .net 2003. Is there a way to toggle the form generated code visible and not???
|
|
|
|
|
There's an icon in the Solution Explorer window that is labeled (hover the mouse of each icon) "Show All Files". I think it's the second one from the left side. Each form file will then get a little plus next to it. It think you can figure it out from there...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
There is a property in the property windows on the form designer called (UseWaitCursor) and this was set to true on most of my group boxes AND textboxes and is the reason why this was happening. I dont understand what this property is for when there is ALSO a cursor property... Anyway, its fixed so YAY for me!!!
Thanks for the help tho, have a good one...
|
|
|
|
|
Have you checked the cursor setting of the parents of the controls?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Is it possible to display the recent files in a combobox in the same way windows does it when you go to open a file. If you start typing text a dropdown is displayed with files that match the text being entered.
|
|
|
|
|
If you're trying to do this in your own ComboBox list, outside of a standard OpenFileDialog, then you'll have to write all the code that keeps track of which folder the user is in and get the list of files in that folder so you have something to populate the ComboBox with as the user types. Is this what you're doing?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
hi,
can somebody help me out?i have vb2005 and sql server table. i created an odbc.i want to display all the table data in a datagridview. the below code is not working. is there any property to set?
Dim con As New Odbc.OdbcConnection
Dim da As New Odbc.OdbcDataAdapter
Dim CB As New Odbc.OdbcCommandBuilder(da)
Dim ds As New DataSet
con.ConnectionString = "dsn=alphasql"
con.Open()
da.SelectCommand = New OdbcCommand("Select * from Company", con)
da.Fill(ds, "Company")
DataGridView1.DataSource = ds
|
|
|
|
|
since you are dealing with a dataset, you have the possibility of having multiple tables in the dataset so you have to tell the datagrid which table you want.
datagrdview1.datamember=ds.tables(0).tablename (or if you know the name give it)
to make the datagrid actually load the data. you need to run "Refresh()"
datagrdview1.refresh()
|
|
|
|
|
thank you very much.its working now
|
|
|
|
|
Hi,
I created a panel named "panel1" in a main form, and I tried to add one of child forms named "childForm1" to the panel by:
" panel1.controls.add(childForm1) "
but errors occured: "Top-level control cannot be added to a control."
Can I load other forms in a windows form ? , and how ?
Thank you very much
kaiwnyt
|
|
|
|
|
It's in C# so you got to convert to VB.
form is your form to be put in panel.
if(form != null)
{
form.ControlBox = false;
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
form.Dock = DockStyle.Fill;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.TopLevel = false;
panelTop.Controls.Add(form);
form.Show();
form.BringToFront();
}
else
{
panelTop.Controls.Clear();
}
|
|
|
|
|
Thanks DarkElv and Yone Low very much !
Main Form: Mainform
Child Form: Form1
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form1.ControlBox = False
Form1.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Form1.Dock = DockStyle.Fill
Form1.MaximizeBox = False
Form1.MinimizeBox = False
Form1.TopLevel = False
Panel1.Controls.Add(Form1)
Form1.Show()
Form1.BringToFront()
End Sub
kaiwnyt
|
|
|
|
|
Yes you can!
for some reason Microsoft decided not to include the property in the designer, but it does indeed exist. see the code below.
Dim frm2 As New Form2
frm2.TopLevel = False
Panel1.Controls.Add(frm2)
frm2.Show()
|
|
|
|
|
Thanks
|
|
|
|
|
Hi,
My problem is that, due to large data in SQL server, my Inventry software is getting to slow while loading data from the server, is there any solution from the database side to increase the performance, or i have to change the entire code of the software, which is going to be the worst thing to do, as i have written the code in VB, I have used distributed Database Access Layer to access the data from the database.
|
|
|
|
|
Maybe you may to consider not displaying all the inventory at one go. Let the user choose the category/level or whatever or filter the list by inventory code or name, ie user type in 'A*' in name filter box and your system only shows the inventory with name started with 'A'.
|
|
|
|
|
Hi,
First of all thanks for the solution, but the problem is that i am already using filters in my software for loading the data,i am using "for loop" to append new row in the datagrid, which takes lot of time, please suggest me other solution using which i can speed up my loading data process.
|
|
|
|
|
|
Hi,
First of all thanks for the solution, but the problem is that i am already using filters in my software for loading the data,i am using "for loop" to append new row in the datagrid, which takes lot of time, please suggest me other solution using which i can speed up my loading data process.
|
|
|
|
|
Sunil,
You just answered your own question.
(Guy goes to the doctor and says "Doctor, it hurts when I do this." Doctor says, (all together now),)
"DON'T DO THAT!"
The problem is not on your database side, it is on the client side, in your code.
Yes, using a for loop and adding one record at a time is the SLOWEST way to fill the grid.
Use databinding if at all possible.
But first of all, you haven't provided enough information to really help here.
Can't fix what ya can't see.
Tell which version of VB, which datagrid component you are using, which type of backing store you are filling the grid from (ADO recordset, .Net datatable, datareader, whatever), and show the sql.
|
|
|
|
|
hi there,
how can i save a project during runtime?
i have an arena config application and when i change the displays during runtime, i need a menu to save the changes. any info?
luke
|
|
|
|
|
You can't save the project at run time, as it isn't a project when it's running, it's a program.
Save the information (to a text file, as XML or whatever you like) that you need to be able to recreate the changes when the program starts.
---
b { font-weight: normal; }
|
|
|
|
|
yes that's what i meant to save the program. isn't there a code like application.save (i know that it doesn't exist) or some sort of thing?
luke
|
|
|
|
|
No, there isn't. There's no way to save the "application state" automatically.
You have to write the code that will serialize your applications internal database (you ARE using some kind of storage to track these controls, right?) and save the information your application needs to recreate the database.
I think you're using label controls that the user can move around? How are you tracking these controls? How many controls are you allowing for? What's the bare minimum information you need to recreate each of these controls? This is the information your code will have to write to a file so you can read it back in the next time the user wants to load this "project".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|