|
How is that.
I mean how it can be done
|
|
|
|
|
Magic.
(Many touch screens act just like a touch pad on a laptop--the drivers are part of the OS. You don't worry about it.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
System.Magic is only in .NET 3.5 though. I could really use Shazaam() in my current windows app. As it stands, I'm having to use some workarounds in System.Illusion. And we all know Illusion is not as good as Magic.
|
|
|
|
|
Okey dokey - did you miss that honking great piece of red text at the top when you posted this question? I mean - it's obviously very difficult to see; what with saying "No programming questions in the lounge". Perhaps it was a little bit too subtle.
|
|
|
|
|
Now you've done it. His tiny excuse for a brain won't be able to cope with all these metaphors and sarcastic remarks - it will overheat and explode.
|
|
|
|
|
Michael Schubert wrote: it will overheat and explode
Where is the downside?
|
|
|
|
|
|
Mike Mullikin wrote:
Where is the downside?
The cleaning lady will only come in next Monday...
|
|
|
|
|
I know that your brain already overheat and explode
|
|
|
|
|
Did this jerkoff really first post this in the lounge?!?
|
|
|
|
|
|
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
|
|
|
|