|
I am simply settingteh height based on a configuration. The actual code is something liek this:
frmLot.DefInstance.Height = (lblslots(1).Height * Rows) + + (id(1).Height * Rows) + (600) ' / hf)
If I do the math with an instant watch it comes up to 1400. When I execute the line and look at the height it shows 1212 even though the formula works out to 1400 in the instant watch window. In my watch window I can change it to anything under 1212.
|
|
|
|
|
How do you hide a tabPage within a tabcontrol?
There is no visible property in the tabPage properties
-- modified at 15:01 Wednesday 7th September, 2005
|
|
|
|
|
You can't. (Microsoft control design is pretty stupid sometimes).
There are several workarounds. If you don't mind the tabpage itself still being visible, you can either set all the controls on the tabpage to invisible, or better still, put all the controls on a tabpage on a Panel and set the Panel to invisible.
If you want tab pages to be visible or not visible, what you can do is store a copy of ecxah tab page in a form level collection. Then you can delete the tab page from the Tab Control's TabPages collection, and later restore it from a copy you saved in the form level collection.
|
|
|
|
|
I cannot see the property visible for tabpages within tabcontrol?
Or what is the syntax to make a tabpage invisible or visible.
|
|
|
|
|
There is no property of this type for a tab page.
Take the suggestion of saving a copy of the tabpage somewhere then delete it from the tabcontol.
'Save a copy
Dim tp As TabPage
tp = TabControl1.TabPages(0)
'Delete the tab page
TabControl1.TabPages.Remove(TabControl1.TabPages(0))
'Add the tab page
TabControl1.TabPages.Add(tp)
the problem with this is that when the tab page is deleted and/or added, the order of the tabs becomes out of original order.
|
|
|
|
|
KaptinKrunch wrote:
the problem with this is that when the tab page is deleted and/or added, the order of the tabs becomes out of original order.
Yes. I advise caching all of the original tabpages in a form level collection. This way when you need to restore any particular TabPage what you can do is simply call the Clear method of the TabControl.TabPages collection to remove all the tabpages. The enumerate the collection, adding each copy of the original tabpages back to the TabControl.TabPages collection. This will restore the original tabpages in their original order.
|
|
|
|
|
I have the code.....
Dim myDataView As DataView
Dim dt As DataTable
dt = League.Tables(0)
myDataView = dt.DefaultView
myDataView.Sort. = "Points"
But when it sorts the points, it does it in reverse. Lowest to highest instead of highest to lowest.
E.G. Instead of
0 8
2 6
3 3
6 2
8 0
|
|
|
|
|
|
I have a fixed size dataset which I need users to be able to update, but not add new records.
so I need to be able to disable inserting/adding rows in datagrids in VB.Net without turning off updating.
The only way I have found to disable updating in any way is the set the datagrid readonly property to true.
Any suggestions will be welcomed
Tim Emjay
Small Systems Developer
|
|
|
|
|
Setting readonly=true is the best solution since you don want to update the datagrid....You can update the dataset anytime
_mubashir
|
|
|
|
|
I do want to be able to update the datagrid, I want to stop the addition of rows in the datagrid.
Tim Emjay
Small Systems Developer
|
|
|
|
|
Can you display text box values in one form that was entered in another form rather than assign them as global variables. If so how is this done?
Example
Form1
TextBox1 = 3
Form2
TextBox1 = Form1.textbox1.text
|
|
|
|
|
Your on the right track.
'Form1
Textbox1.text = "TEST"
'Create new instance of form 2
Dim frm as new Form2
'Assign the textbox properties
frm.Textbox1.Text = Textbox1.text
'Show the form
frm.ShowDialog
|
|
|
|
|
Hi,
I´m new in the forum and in VB.NET and i have a few doubts. I want to do and aplicattion which should get documents from a folder and show them in a form as a link but i don´t now how to do that. If any of you should now how to do that i´ll apreciate it.
Thanks for all,
Rincito
|
|
|
|
|
Code to get files from directory.
Function GetMyFiles(byval directory as string) as string()
Dim theFiles() as string
theFiles = System.IO.Directory.GetFiles(directory)
return theFiles
End Function
Code to add link to form.
Sub AddALink(ByVal name As String, ByVal x As Integer, ByVal y As Integer)
Dim aLink As New LinkLabel
aLink.Text = name
Dim thisSpot As New Point(x, y)
aLink.Location = thisSpot
Me.Controls.Add(aLink)
End Sub
Code to Make it all work
Sub RunIt()
Dim s As String
Dim x As Integer = 5
Dim y As Integer = 10
For Each s In GetMyFiles("C:\")
AddALink(s, x, y)
y += 25
Next
End Sub
The only problem left that maybe someone else can answer is how to wire up all of the click events. As of this point the links are added to the form, but if you click one, nothing happens of course.
|
|
|
|
|
Thanks,
I´m going to try it as soon as possible.
R
|
|
|
|
|
I am an developer and use SharpDevelop and OpenOffice.org Base for database purpose. Can i connect an OpenOffice database to an sharpdevelop project, so i can begin the programming. How i do programming an simple database with an datagrid in sharpdevelop?
|
|
|
|
|
I dont know anything about open office but i do use sharp develop quite a bit. Its pretty much the same as VS2003 but missing some of the wizards. It has exactly the same designer support for the datagrid and any code that works in VS will work in SD. You can use any of the samples here on CP or anywhere else and load them straight into SD. The main difference is SD uses 'Combines' instead of VS's 'Soloutions'. Just go to file and Import in SD to import a VS soloution into SD then use as normal.
Jon
|
|
|
|
|
As I have to add new funcionalities I'm thinking to take an app originally made with VB6 and migrate it to .Net platform.
Should I do this migration just to modernize it?
As I haven't developed any app under .Net, what's the best language to do it: VB .Net, VC++ .Net or C#?
I come from the VC++6 world and I've always believed that VC++ was the best platform to build Object Oriented apps that needs an straight control of the hardware, windows messages, reusable code, ... and VB6 was made for "office" apps that needed db connection and with a faster design and development.
AFAIK VB .Net has improved quite a lot because it's been powered with full O.O. characteristics, multithreading, inheretince, ... so now, VB .Net permits to build better reusable code than its predecessor.
What's the role of C# in this world? Is it just a Microsoft alternative to Java but it has the same targeted apps as VB.Net?
Thanks for your comments,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
-- modified at 3:05 Wednesday 7th September, 2005
|
|
|
|
|
If the app was written in VB, then VB.NET is probably a reasonable choice.
C++ is still the best choice if you have issues like hardware control and other low level functions. As far as OOP, any of the NET langauges are suitable.
marcdev wrote:
What's the role of C# in this world? Is it just a Microsoft alternative to Java but it has the same targeted apps as VB.Net?
Yes. Exactly. VB.NET and C# atre essentially identical in functionality. VB.NET syntax is familiar to VB programmers, and C# is familiar to Java programmers, but they both run on the same framework and compile to identical machine code.
|
|
|
|
|
rwestgraham wrote:
C++ is still the best choice if you have issues like hardware control and other low level functions
I have to access to serial and parallel port, so I think VB .Net has full access to this. In the near future I'm planning to access via sockets so I think it either won't be a problem in dot net.
What about using VC++ mixing managed and unmanaged code? Is it a solution to make the classical VC++ coder having their mouths closed or it's, and it'll be, a good option?
I know that these questions are difficult to answer because they depends on microsoft plans ... I just want to know your impressions.
Thanks,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hello everybody. One small question:
How can i make a console window not to be visible and hide it from Task manager. I am trying to make a program that it's not visible to the users and since app.Taskvisible is not supported in vb.net, i need to create a console application to bypass this.
Thank you.
Still trying to find the way
|
|
|
|
|
You may want to consider making the program a service.
|
|
|
|
|
KaptinKrunch, I forgot to mention that i have the Standard version of VB.NET and it doesn't make programs as services. I am tinkering with an Application Console, but i can't hide it from the Task Manager. I have heard that you can do that. But how??????
Thank you though for your input.
Still trying to find the way
|
|
|
|
|
Can some guide me?
Actually I want to convert a Java Class into the .Net DLL.
What should I do for this?
|
|
|
|