|
He's so pathetic most of the time I think it's a joke account.
|
|
|
|
|
What I find amusing is the assumption that the VB forum is the best place to help someone who asks in the lounge ( OK, he said VB or C#, and so it had to be one or the other )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
We could just make his posts disappear. No one would care.
|
|
|
|
|
Reading skills + Google
(sorry, its sarcasm friday!)
|
|
|
|
|
Why would you ask this ? You plainly don't have access to a touchscreen, or you'd know it just acts like a mouse. I rolled out a touch screen version of our app without even having access to one, all I had to do was make places you need to click all big enough to be fingertip friendly.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone know how to add buttons to a form dynamically.
Ex:
I am getting information from a database. It could return 1 item or 50. I want to be able to created a button on the screen no matter how many items are returned.
Right know I have this but it does not work. It only creates one button because I have not figured out a way to change the new Button's name.
For Each row In Me.UwPdataset.Level1.Rows
btn = New Button
cmbobxLevel1.Items.Add(row(0).ToString)
btn.Location = New Point(lastbtnX + 120, lastbtnY)
Controls.Add(btn)
btn.Text = row(0).ToString
btn.Width = 120
btn.Height = 120
lastbtnX = lastbtnX = 120
Next
Does anyone know how to do this.
|
|
|
|
|
Try this, I believe it should work
Dim index as Integer = 0 '<--- This has been added
For Each row In Me.UwPdataset.Level1.Rows
index += 1 '<--- This has been added
btn = New Button
btn.Name = "Button" & index.ToString '<--- This has been added
cmbobxLevel1.Items.Add(row(0).ToString)
btn.Location = New Point(lastbtnX + 120, lastbtnY)
Controls.Add(btn)
btn.Text = row(0).ToString
btn.Width = 120
btn.Height = 120
lastbtnX = lastbtnX = 120
Next
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
Hi, the .Name property for runtime created buttons is irrelevant. Your code is creating multiple button controls but I don't think they're being positioned correctly - shouldn't the line before Next read lastbtnX = lastbtnx + 120?
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
I found a post suggesting that one find the length of the second dimension of a two-dimensional array by doing something like this:
secondDimensionLength = array.Length / (UBound(array) - LBound(array) + 1)
because the Length property returns the total number of elements, and UBound and LBound return the upper and lower bounds of the first dimension, respectively.
However, Visual Basic 6.0 doesn't seem to like the Length property. How does one do this in 6.0?
|
|
|
|
|
|
Hello all I am putting together a active x web control following this guide.. http://www.vbdotnetheaven.com/UploadFile/dsandor/ActiveXControlInVBdotNET04112005081747AM/ActiveXControlInVBdotNET.aspx below is a snippet of my code
<code>
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports sharpPDF
Namespace ActiveXDotNet
Public Interface AxMyControl
'Property orderids() As String
End Interface 'AxMyControl
Public Class myControl
Inherits System.Windows.Forms.UserControl
'Private mStr_orderid As String
'Public Property orderids() As String
' Get
' Return mStr_orderid
' End Get
' Set(ByVal Value As String)
' mStr_orderid = Value
' 'Update the text box control value also.
' orderid.Text = Value
' End Set
'End Property
'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
#Region "systemcode"
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(myControl))
Me.tabcontrol = New System.Windows.Forms.TabControl
Me.TabPage1 = New System.Windows.Forms.TabPage
Me.Button2 = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TabPage2 = New System.Windows.Forms.TabPage
Me.Button3 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.MovablePictureBox1 = New movablepicturebox.MovablePictureBox
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.bMovablePictureBox2 = New movablepicturebox.MovablePictureBox
Me.PictureBox2 = New System.Windows.Forms.PictureBox
Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument
Me.PrintPreviewDialog1 = New System.Windows.Forms.PrintPreviewDialog
Me.tabcontrol.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.TabPage2.SuspendLayout()
CType(Me.MovablePictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.bMovablePictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'tabcontrol
'
Me.tabcontrol.Alignment = System.Windows.Forms.TabAlignment.Right
Me.tabcontrol.Controls.Add(Me.TabPage1)
Me.tabcontrol.Controls.Add(Me.TabPage2)
Me.tabcontrol.Location = New System.Drawing.Point(461, 3)
Me.tabcontrol.Multiline = True
Me.tabcontrol.Name = "tabcontrol"
Me.tabcontrol.SelectedIndex = 0
Me.tabcontrol.Size = New System.Drawing.Size(278, 152)
Me.tabcontrol.TabIndex = 1
'
'TabPage1
'
Me.TabPage1.BackColor = System.Drawing.Color.White
Me.TabPage1.Controls.Add(Me.Button2)
Me.TabPage1.Controls.Add(Me.Button1)
Me.TabPage1.Controls.Add(Me.TextBox1)
Me.TabPage1.Location = New System.Drawing.Point(4, 4)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(251, 144)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Front"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(6, 77)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(75, 23)
Me.Button2.TabIndex = 2
Me.Button2.Text = "Button2"
Me.Button2.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(115, 38)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(6, 38)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 20)
Me.TextBox1.TabIndex = 0
'
'TabPage2
'
Me.TabPage2.BackColor = System.Drawing.Color.White
Me.TabPage2.Controls.Add(Me.Button3)
Me.TabPage2.Controls.Add(Me.Button4)
Me.TabPage2.Controls.Add(Me.TextBox2)
Me.TabPage2.Location = New System.Drawing.Point(4, 4)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(251, 144)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Back"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(6, 77)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(75, 23)
Me.Button3.TabIndex = 5
Me.Button3.Text = "Button3"
Me.Button3.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(115, 38)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(75, 23)
Me.Button4.TabIndex = 4
Me.Button4.Text = "Button4"
Me.Button4.UseVisualStyleBackColor = True
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(6, 38)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(100, 20)
Me.TextBox2.TabIndex = 3
'
'OpenFileDialog1
'
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
'
'MovablePictureBox1
'
Me.MovablePictureBox1.BackColor = System.Drawing.SystemColors.ActiveCaptionText
Me.MovablePictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.MovablePictureBox1.Location = New System.Drawing.Point(103, 86)
Me.MovablePictureBox1.Name = "MovablePictureBox1"
Me.MovablePictureBox1.Size = New System.Drawing.Size(253, 387)
Me.MovablePictureBox1.StayWithinParentBounds = False
Me.MovablePictureBox1.TabIndex = 2
Me.MovablePictureBox1.TabStop = False
Me.MovablePictureBox1.Visible = False
'
'PictureBox1
'
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(458, 519)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PictureBox1.TabIndex = 3
Me.PictureBox1.TabStop = False
'
'bMovablePictureBox2
'
Me.bMovablePictureBox2.BackColor = System.Drawing.SystemColors.ActiveCaptionText
Me.bMovablePictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.bMovablePictureBox2.Image = CType(resources.GetObject("bMovablePictureBox2.Image"), System.Drawing.Image)
Me.bMovablePictureBox2.Location = New System.Drawing.Point(103, 86)
Me.bMovablePictureBox2.Name = "bMovablePictureBox2"
Me.bMovablePictureBox2.Size = New System.Drawing.Size(185, 48)
Me.bMovablePictureBox2.StayWithinParentBounds = False
Me.bMovablePictureBox2.TabIndex = 4
Me.bMovablePictureBox2.TabStop = False
Me.bMovablePictureBox2.Visible = False
'
'PictureBox2
'
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
Me.PictureBox2.Location = New System.Drawing.Point(0, 2)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(458, 519)
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PictureBox2.TabIndex = 5
Me.PictureBox2.TabStop = False
'
'PrintPreviewDialog1
'
Me.PrintPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)
Me.PrintPreviewDialog1.Enabled = True
Me.PrintPreviewDialog1.Icon = CType(resources.GetObject("PrintPreviewDialog1.Icon"), System.Drawing.Icon)
Me.PrintPreviewDialog1.Name = "PrintPreviewDialog1"
Me.PrintPreviewDialog1.Visible = False
'
'myControl
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.Controls.Add(Me.bMovablePictureBox2)
Me.Controls.Add(Me.MovablePictureBox1)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.tabcontrol)
Me.Controls.Add(Me.PictureBox2)
Me.Name = "myControl"
Me.Size = New System.Drawing.Size(739, 520)
Me.tabcontrol.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage1.PerformLayout()
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
CType(Me.MovablePictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.bMovablePictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents tabcontrol As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents MovablePictureBox1 As movablepicturebox.MovablePictureBox
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents bMovablePictureBox2 As movablepicturebox.MovablePictureBox
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
Friend WithEvents PrintDocument1 As System.Drawing.Printing.PrintDocument
Friend WithEvents PrintPreviewDialog1 As System.Windows.Forms.PrintPreviewDialog
#End Region
Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitializeComponent()
End Sub
</code>
However when I try to run this control in a web browser all I get is the missing image icon.. here is my html
<code><html>
<body color=white>
<hr>
<font face=arial size=1>
<OBJECT id="myControl1" name="myControl1" classid="T-ShirtDesignerControl.dll#ActiveXDotNet.mycontrol" width=739 height=520 VIEWASTEXT>
</OBJECT>
</font>
<hr>
</body>
</html></code>
Any help would be much apprechiated I just dont know what I am doing wrong this is the first web activex control I have written..
|
|
|
|
|
I would suggest you work on your understanding of this code. If you want help, it would help if you didn't post all the auto generated code that we really are unlikely to have any comment on, bringing your post down to a readable level.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to supply the user a combobox in a cell ("called Warehouse"- I add programatically to a datagridview) so they can select from the options. I want this datagridviewcombobox column to display the default value and if the use doesn't select a different value and then clicks save it saves to the database this default value. If they change selections and save it must save the selected value.
Please Help
|
|
|
|
|
Hi
Convert the column you want to plcae the dropdown in to template column and place the dropdown in the item template and edit item template and give the dropdown the selected value u want to the dropdown note that this way works for VS 2005.
if any problems mail me back
Mohammad Al Hoss
|
|
|
|
|
I've designed Custom Office ribbon for my access 2007 legacy application which based on XML
When opening database without holding shift key it display default Office ribbon with along with my old access menu Add In which was created in access 2003.
I found this on MSDN but this article doesn't say much about how to make default ribbon available all the time even in development mode.
Bypassing Customizations
Hold down the SHIFT key when opening the database to open it with the default Office Fluent Ribbon in Access rather than with your custom Office Fluent Ribbon.
Ayaz Hoda
Developer
MSc(Networks System),BSc (Comp. Engg),MCP
UK
|
|
|
|
|
Hi,
I have a class that has a few properties that accepts an optional boolean parameter. For example:
<br />
Private _venues AS BSVenue<br />
<br />
Public ReadOnly Property Venues(Optional ByVal forceupdate As Boolean = False) As BSVenue()<br />
Get<br />
If _venues Is Nothing Or forceupdate Then<br />
_venues = BSVenue.GetVenuesByCourse(CourseID)<br />
End If<br />
Return _venues<br />
End Get<br />
End Property<br />
When i try binding a member of this class to a control it says it cannot find the property. It works fine if the property has no parameters. Whats going on?
|
|
|
|
|
Have you tried defining the Property twice? One without a parameter and one with e.g.
Public ReadOnly Property Venues() As BSVenue()
Get
Return Venues(False)
End Get
End Property
Public ReadOnly Property Venues(ByVal forceupdate As Boolean) As BSVenue()
Get
If _venues Is Nothing Or forceupdate Then
_venues = BSVenue.GetVenuesByCourse(CourseID)
End If
Return _venues
End Get
End Property
Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)
|
|
|
|
|
I got the same answer off a guy i work with. I think thats the way to do it. I dont get why the databinding process doesnt just ignore the optional parameter.
Thanks for your response!
|
|
|
|
|
Hi,
i upgraded my application from VS 2003 to VS 2005 and the application is closing while i am in debug mode but if it run the application without Debugging it wil not stop and it will work normally and in the output window i am having "A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll" and application is not accepting to add this dll again.
thanks
Mohammad Al Hoss
|
|
|
|
|
You can set up visual studio to break on any exception, perhaps this will help you to work out where it's going wrong.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello to anyone,
I'd like to know how to retrieve informations about an audio cdrom. In particular, I'm interesting in reading information (and write information) about cdtext, track index, isrc, author an so on like Ahead Nero does, but without using nero sdk.
I want to use VB_NET or at least C#.
Thanks in advance to anyone who can help me.
|
|
|
|
|
The disc title and track titles are not stored on the CD. You have to use a service like freedb to get that information. There's a good example [^] on this on Codeproject.
Is that what you were after?
|
|
|
|
|
I've seen this, but what I'm specifically looking for are informations about all kind of markers put inside tracks used, for example, to mark some interestin point during the music.
Can you help me?
Readind MSDN I found something about IOCTL, but I don't know how to use these information especially because I don't know how to program in C language.
Thanks for your interesting.
Bye bye.
|
|
|
|
|
|
How do I get the Maximum Field Length property of a Column in a MS Access Database?
|
|
|
|