|
Thanks for Reply
Imports System.IO
Imports System.Configuration
Imports System.Net.IPAddress
Imports System.Net.Dns
Imports FSWatcher.SystemInfo
Imports System.Windows.Forms
Imports System.Net
Imports System.DirectoryServices
Imports System.Runtime.InteropServices
Imports Microsoft.Win32
Imports System.Net.NetworkInformation
Imports System.Threading
Public Class Form1
Inherits System.Windows.Forms.Form
Public workgroup As String
Public WGroup As String = ""
'Public WithEvents Nc As NetComp
Public CompNode As New TreeNode(), CompInfo(1) As String
Private Delegate Sub updatetextbox(ByVal newLabel As String)
'Create the Advanced File System Watcher
Private WithEvents myfswFileWatcher As AdvancedFileSystemWatcher
Dim ip1 As String
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
'I got tired of dealing with cross thread errors, so I am ignoreing them, not the way to code here so you should do it correctly
'I did it so I caould get the code running as soon as possible.
Control.CheckForIllegalCrossThreadCalls = False
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'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.
Friend WithEvents txtFolderToWatch As System.Windows.Forms.TextBox
Friend WithEvents btnBrowse As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents btnStart As System.Windows.Forms.Button
Friend WithEvents btnStop As System.Windows.Forms.Button
Friend WithEvents btnExit As System.Windows.Forms.Button
Friend WithEvents txtFileEvents As System.Windows.Forms.TextBox
Friend WithEvents chkSubFolders As System.Windows.Forms.CheckBox
Friend WithEvents fbdBrowserFolders As System.Windows.Forms.FolderBrowserDialog
Friend WithEvents chkSilentMode As System.Windows.Forms.CheckBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
Me.txtFileEvents = New System.Windows.Forms.TextBox
Me.txtFolderToWatch = New System.Windows.Forms.TextBox
Me.btnBrowse = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.btnStart = New System.Windows.Forms.Button
Me.btnStop = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
Me.chkSubFolders = New System.Windows.Forms.CheckBox
Me.fbdBrowserFolders = New System.Windows.Forms.FolderBrowserDialog
Me.chkSilentMode = New System.Windows.Forms.CheckBox
Me.SuspendLayout()
'
'txtFileEvents
'
Me.txtFileEvents.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.txtFileEvents.Location = New System.Drawing.Point(0, 64)
Me.txtFileEvents.Multiline = True
Me.txtFileEvents.Name = "txtFileEvents"
Me.txtFileEvents.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.txtFileEvents.Size = New System.Drawing.Size(803, 536)
Me.txtFileEvents.TabIndex = 0
'
'txtFolderToWatch
'
Me.txtFolderToWatch.Location = New System.Drawing.Point(0, 8)
Me.txtFolderToWatch.Name = "txtFolderToWatch"
Me.txtFolderToWatch.Size = New System.Drawing.Size(320, 20)
Me.txtFolderToWatch.TabIndex = 1
'
'btnBrowse
'
Me.btnBrowse.Location = New System.Drawing.Point(328, 8)
Me.btnBrowse.Name = "btnBrowse"
Me.btnBrowse.Size = New System.Drawing.Size(24, 16)
Me.btnBrowse.TabIndex = 2
Me.btnBrowse.Text = "..."
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(360, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(80, 16)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Browse Folder"
'
'btnStart
'
Me.btnStart.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnStart.Location = New System.Drawing.Point(809, 72)
Me.btnStart.Name = "btnStart"
Me.btnStart.Size = New System.Drawing.Size(80, 32)
Me.btnStart.TabIndex = 4
Me.btnStart.Text = "Start Watching"
'
'btnStop
'
Me.btnStop.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnStop.Location = New System.Drawing.Point(809, 120)
Me.btnStop.Name = "btnStop"
Me.btnStop.Size = New System.Drawing.Size(80, 32)
Me.btnStop.TabIndex = 5
Me.btnStop.Text = "Stop Watching"
'
'btnExit
'
Me.btnExit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnExit.Location = New System.Drawing.Point(817, 576)
Me.btnExit.Name = "btnExit"
Me.btnExit.Size = New System.Drawing.Size(75, 23)
Me.btnExit.TabIndex = 6
Me.btnExit.Text = "Exit"
'
'chkSubFolders
'
Me.chkSubFolders.Location = New System.Drawing.Point(448, 0)
Me.chkSubFolders.Name = "chkSubFolders"
Me.chkSubFolders.Size = New System.Drawing.Size(128, 32)
Me.chkSubFolders.TabIndex = 7
Me.chkSubFolders.Text = "Include SubFolders?"
'
'chkSilentMode
'
Me.chkSilentMode.Location = New System.Drawing.Point(152, 40)
Me.chkSilentMode.Name = "chkSilentMode"
Me.chkSilentMode.Size = New System.Drawing.Size(240, 24)
Me.chkSilentMode.TabIndex = 8
Me.chkSilentMode.Text = "Silent Mode to Log File"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(897, 605)
Me.Controls.Add(Me.chkSilentMode)
Me.Controls.Add(Me.chkSubFolders)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnStop)
Me.Controls.Add(Me.btnStart)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.btnBrowse)
Me.Controls.Add(Me.txtFolderToWatch)
Me.Controls.Add(Me.txtFileEvents)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "Form1"
Me.Text = "Folder Watcher"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
btnStop.Enabled = False
With System.Configuration.ConfigurationSettings.AppSettings
txtFolderToWatch.Text = .Get("PathToWatch")
chkSubFolders.Checked = CType(.Get("IncludeSubFolders"), Boolean)
chkSilentMode.Checked = CType(.Get("SilentMode"), Boolean)
End With
Catch ex As Exception
Throw ex
End Try
GetIPDomain(ip1)
End Sub
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
'fbdBrowserFolders.RootFolder = Environment.SpecialFolder.Personal
Try
fbdBrowserFolders.ShowDialog()
txtFolderToWatch.Text = fbdBrowserFolders.SelectedPath.ToString
Catch ex As Exception
Throw ex
End Try
End Sub
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
Try
'call the sub that will create and start the AdvancedFileSystemWatcher
StartFileSystemWatcher()
Catch ex As Exception
Throw ex
End Try
End Sub
Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click
Try
'Stop the AdvancedFileSystemWatcher from raising events.
StopFileSystemWatcher()
Catch ex As Exception
Throw ex
End Try
End Sub
Private Sub StartFileSystemWatcher()
Try
If txtFolderToWatch.Text.Trim.Length > 0 Then
'Create a new Advanced File System Watcher and set the network scan interval
myfswFileWatcher = New AdvancedFileSystemWatcher(5000)
'Add the handlers to handle the filesystemwatcher events
AddHandler myfswFileWatcher.Created, AddressOf OnCreated
AddHandler myfswFileWatcher.Changed, AddressOf OnChanged
AddHandler myfswFileWatcher.Deleted, AddressOf Ondeleted
AddHandler myfswFileWatcher.Renamed, AddressOf OnRenamed
'set the filewatcher path
myfswFileWatcher.Path = txtFolderToWatch.Text
'determine if the user wants to watch sub folders or not
If chkSubFolders.Checked Then
myfswFileWatcher.IncludeSubdirectories = True
Else
myfswFileWatcher.IncludeSubdirectories = False
End If
'Start the filewatcher watching for files.
myfswFileWatcher.EnableRaisingEvents = True
'set the GUI to reflect the fact the file system watcher is running
chkSubFolders.Enabled = False
btnStop.Enabled = True
btnStart.Enabled = False
Else
MessageBox.Show("Folder to watch is not Set", "No Folder Set", MessageBoxButtons.OK)
End If
Catch ex As Exception
End Try
End Sub
Private Sub StopFileSystemWatcher()
Try
'Stop the file system watcher from raising events
myfswFileWatcher.EnableRaisingEvents = False
'set the GUI to reflect that the file system watcher is no longer watching the folders.
chkSubFolders.Enabled = True
btnStart.Enabled = True
btnStop.Enabled = False
Catch ex As Exception
Throw ex
End Try
End Sub
Public Sub OnChanged(ByVal source As Object, ByVal e As FileSystemEventArgs)
txtFileEvents.Text &= "File changed: " & e.FullPath & " change type: " & e.ChangeType & " from " & Environment.UserDomainName & vbCrLf
End Sub
Public Sub OnCreated(ByVal source As Object, ByVal e As FileSystemEventArgs)
Call GetIPDomain(ip1)
Try
If chkSilentMode.Checked Then
WriteSilentLog("File Created: " & e.FullPath & " " & Now().ToString)
Else
If Me.InvokeRequired Then 'are we running on a secondary thread
Dim d As New updatetextbox(AddressOf updateTextboxHandler)
Me.Invoke(d, New Object() {"File Created: " & e.FullPath & " " & Now().ToString & vbCrLf})
Else
updateTextboxHandler("File Created: " & e.FullPath & " " & Now().ToString & " from " & vbCrLf)
End If
txtFileEvents.Text &= "File Created: " & e.FullPath & " " & Now().ToString & " from " & System.Net.IPAddress.HostToNetworkOrder(1) & vbCrLf
End If
Catch ex As Exception
Throw ex
End Try
End Sub
Public Sub Ondeleted(ByVal source As Object, ByVal e As FileSystemEventArgs)
Try
If chkSilentMode.Checked Then
WriteSilentLog("File Deleted: " & e.FullPath & " " & Now().ToString)
Else
'this is the correct way to deal with cross threading, and i was to much of a hurry to do the entire app this way so i ignore the errors now
If Me.InvokeRequired Then 'are we running on a secondary thread
Dim d As New updatetextbox(AddressOf updateTextboxHandler)
Me.Invoke(d, New Object() {"File Deleted: " & e.FullPath & " " & Now().ToString & vbCrLf})
Else
updateTextboxHandler("File Deleted: " & e.FullPath & " " & Now().ToString & " from " & vbCrLf)
End If
txtFileEvents.Text &= "File Deleted: " & e.FullPath & " " & Now().ToString & " from " & vbCrLf
End If
Catch ex As Exception
Throw ex
End Try
End Sub
Public Sub OnRenamed(ByVal source As Object, ByVal e As RenamedEventArgs)
Try
If chkSilentMode.Checked Then
WriteSilentLog("File renamed from: " & e.OldName & " to: " & e.Name & " " & Now().ToString)
Else
'this is the correct way to deal with cross threading, and i was to much of a hurry to do the entire app this way so i ignore the errors now
If Me.InvokeRequired Then 'are we running on a secondary thread
Dim d As New updatetextbox(AddressOf updateTextboxHandler)
Me.Invoke(d, New Object() {"File renamed from: " & e.OldName & " to: " & e.Name & " " & Now().ToString & vbCrLf})
Else
updateTextboxHandler("File renamed from: " & e.OldName & " to: " & e.Name & " " & Now().ToString & vbCrLf)
End If
txtFileEvents.Text &= "File renamed from: " & e.OldName & " to: " & e.Name & " " & Now().ToString & " from " & vbCrLf
End If
Catch ex As Exception
Throw ex
End Try
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
Me.Dispose()
End Sub
Private Sub WriteSilentLog(ByVal strTexttoWrite As String)
Dim fs As New FileStream(System.Configuration.ConfigurationSettings.AppSettings.Get("LogFileName"), FileMode.OpenOrCreate, FileAccess.Write)
Dim sw As New StreamWriter(fs)
sw.BaseStream.Seek(0, SeekOrigin.End)
sw.WriteLine(strTexttoWrite.ToString)
sw.Close()
End Sub
Private Sub chkSilentMode_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkSilentMode.CheckedChanged
If chkSilentMode.Checked Then
txtFileEvents.Enabled = False
Else
txtFileEvents.Enabled = True
End If
End Sub
Private Sub updateTextboxHandler(ByVal TextboxText As String)
' txtFileEvents.Text = TextboxText
End Sub
''' <summary>
''' This is the event that gets raised when the path becomes available after being unavailable
''' </summary>
''' <param name="Message"></param>
''' <remarks></remarks>
Private Sub myfswFileWatcher_NetworkPathAvailable(ByVal Message As String) Handles myfswFileWatcher.NetworkPathAvailable
Try
'Ok the network path is available now
StartFileSystemWatcher()
Catch ex As Exception
End Try
End Sub
''' <summary>
''' This is the event that gets raised if the path becomes unavailable, be it a network problem or the folder gets deleted.
''' </summary>
''' <param name="Message"></param>
''' <remarks></remarks>
Private Sub myfswFileWatcher_NetworkPathUnavailable(ByVal Message As String) Handles myfswFileWatcher.NetworkPathUnavailable
Try
'There was a network error we need to destroy the filesystemwatcher object and try to recreate it.
'Send an email saying there is a netowrk error????
'SendMail
'now we have to stop and kill the current filesystemwatcher. we will recreate it in the available event.
StopFileSystemWatcher()
myfswFileWatcher.Dispose()
Catch ex As Exception
Throw ex
End Try
End Sub
the above code get all information about file(created,changed,deleted,renamed).
In server ,there are many user access the file using our username and password. And I have to also run this program in server, server have status of all user who are connected to server using username and password.
Thanks
Regards
Vijay Kumar
India.
|
|
|
|
|
First of all, posting the entire app was completely uneccessary.
Second, why did you even post this at all?? The FSW cannot tell you which machine created/changed/deleted a file.
Third, ignoring all the cross thread calls is a really, really bad idea.
|
|
|
|
|
Member 4275928 wrote: 'I got tired of dealing with cross thread errors, so I am ignoreing them, not the way to code here so you should do it correctly
'I did it so I caould get the code running as soon as possible.
You choose to ignore one of the most fundamental rules in Windows programming?
You don't deserve any help on this site then. Read this.[^]
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thanks for Reply
i would like to know that if a file has been modified of created by a different user via lan in server(workgoroup/Workstation)how can we get the user name and ip address of that person(cliet/user/hostname) who is operating in the folder/files.
Thanks
Regards
Vijay Kumar
India.
Vijay Kumar S Pandey
Sector 3D, PitamPura
New Delhi
India
100034
|
|
|
|
|
You can't. NTFS does not track that information.
About the best you can hope for is to get the owner of the file. There is no way to map that user back to the IP address/machine name that they were using at the time.
|
|
|
|
|
Description: I have 1 textbox,button and one table.user entered data in the textbox and click save button the data is save to database table.i wrote some but iam getting some error
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'Dim ds As DataSet
If tbxNote.Text <> String.Empty Then
Dim NoteRow As ChemComp_adminDS.GeneralNotesRow = m_ccDb.Chemcomp_adminDS.GeneralNotes.NewGeneralNotesRow
'Dim crow As DataRow = ds.Tables("GeneralNotes").Rows(0)
'User entered comment for this susbstanceID for the first time so new row to be inserted in
'to AdminComment table
' NoteRow.NoteID = CInt(NoteRow.Item("NoteId"))
NoteRow.CreatedBy = My.User.Name
NoteRow.CreatedOn = Now
NoteRow.ModifiedBy = My.User.Name
NoteRow.ModifiedOn = Now
NoteRow.Note = tbxNote.Text.Trim()
m_ccDb.InsertRow(NoteRow)
End If
'm_ccDb.GetList(m_ccDb.Chemcomp_adminDS.GeneralNotes)
End Sub
End Class
at the time of insertrow function iam getting the following error.
Cannot insert explicit value for identity column in table 'GeneralNotes' when IDENTITY_INSERT is set to OFF.
|
|
|
|
|
Do not try to insert the primary key value in the database. It is set as a auto generated column.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi,
I wrote a program original in VB6 (I know it's old) and now in vb.net 2008.
When the program reads music files in some cases(most of the time on vista machines but sometimes on XP) the duration returns 0. Is there another way of retrieving the lenght of an mp3/wma file rather than open it into a mediaplayer control or a solution so that it 'always' returns the write time
Thanks Jan
|
|
|
|
|
|
Hi All,
I have made a project in VB2008 in which I have bind my Grid to Class as a datasource. The column names of Grid are the property names of the class. But I need to have customize column names for my properties in the Grid. One way is to add an attribute <displayname("name")> _ for example before each property. But it is so hard to name each and every property as i have thousands of properties in this project. Someone has told me that there is a way by using IListSource.. Does anyone have any idea about that??
Regards
Ovais
|
|
|
|
|
You could just create the columns in the grid yourself, then just setup the bindings for each column to property yourself.
|
|
|
|
|
Thanks for your reply dear, but I have only one grid which is binded by different classes at different scenarios..
For e.g.
Instead of having separate grids for Employees, Leaves, Allowances, Deductions (to show thier respective detail), i've a single grid. When i hit Employees button, it fills with Employees class, when i hit Leaves button, it fills with Leave class, and so forth..
Hope you understand my problem.
Ovais
|
|
|
|
|
Ovais Memon wrote: Instead of having separate grids for Employees, Leaves, Allowances, Deductions (to show thier respective detail), i've a single grid. When i hit Employees button, it fills with Employees class, when i hit Leaves button, it fills with Leave class, and so forth..
Then if you are able to, I would suggest that you have a Form for each category. Apart from this allowing you to do as previously suggested for the column binding, it will enable your users to do side-by-side comparisons between datasets.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
So what's stopping you from Clearing the Columns collection and creating a new set of columns in the same grid and binding those to the new object collection?
|
|
|
|
|
Thats what i was doing so far, but the problem is that i m unable to customize column names in the grid. Acc. to your suggestion, i suppose to name the columns for each class at the time of binding with the grid..
|
|
|
|
|
Each DataGridViewColumn derivative allows you to set the columnheader text, using it's HeaderText property, seperately from the column name it's bound to.
|
|
|
|
|
I do exactly the same in my main form, 1 DGV and throw tables at it. I have a static method that formats names according to the capitilasition eg "ContactID" becomes "Contact ID" and I use this to populate the header text, it is part of a method that is used to bind all DGVs and gives me a consistent format throughout the app. It also means you need to take your conventions all the way back to the database design. As I own the DB I have no problem with this.
My problem is that if you bind to the List<class> using the public properties you lose the sort/filter capabilities unless you implement iBindingList (I think) on each of your classes which is a PITA. So Ah Ha I though, turn each class into a datatable, at which point I chucked the entire bind to class list out and just bind to the original datatable.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am working on a windows application where the user should be able to move,resize and drag and drop a control (a Textbox in my case).
I am pretty much ok with the moving and drag and drop except that I cant differentiate between MouseDown and Click events, because everytime I press the mouse button on the control the MouseDown event fires up and I cant really use the click event. Is there a way that i can differentiate between MouseDown and Single Click.
Second: I am trying to highlight the control when the user selects the objects so that I highlight the control or get that resizing rectangle around the control so that user can drag it to resize the object. Something we do while creating a application (we add a control on the form and then resize it) . Can any one please help me out with this.
Thanks
If you can think then I Can.
|
|
|
|
|
As for differentiating MouseDown from Click , you can start a timer when MouseDown is fired. If you get a MouseUp before the timer expires, then it's a Click, otherwise it's starting a drag-and-drop.
Highlighting the control can be done for example by using the OnPaint event and adding GDI+ code to draw your highlighting depending on the component status (drag-and-drop active or inactive).
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Sorry sir,
Please Explain in brief or give me any suitable example.
If you can think then I Can.
|
|
|
|
|
This is a very raw example, it should give you the basic idea:
private bool DragActive = false;
System.Threading.Timer DragOrClickTimer = null;
private void DragOrClickTimer_Tick(object state)
{
DragActive = true;
Control c = (Button)state;
c.Invalidate();
}
private void button1_MouseDown(object sender, MouseEventArgs e)
{
DragOrClickTimer = new System.Threading.Timer(new System.Threading.TimerCallback(DragOrClickTimer_Tick), button1, 200, System.Threading.Timeout.Infinite);
}
private void button1_MouseUp(object sender, MouseEventArgs e)
{
if (DragOrClickTimer != null)
{
DragOrClickTimer.Dispose();
DragOrClickTimer = null;
}
if (DragActive)
{
DragActive = false;
button1.Invalidate();
}
else
{
MessageBox.Show("Click!");
}
}
private void button1_Paint(object sender, PaintEventArgs e)
{
if (DragActive)
{
Graphics g = e.Graphics;
Pen p = new Pen(Color.Red, 3);
g.DrawRectangle(p, 5, 5, button1.Width - 11, button1.Height - 11);
}
}
Of course it should be incapsulated properly in custom controls, or if you just want to implement it simply in a form, tweaked to work for all controls - the basics are all there.
Good luck!
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Thanks for help but i am using your code and it's not working.
If you can think then I Can.
|
|
|
|
|
It's copy and paste from a working example.
You can adjust the timer setting (it's 200 ms in my example) and play around with the code to adapt it to your needs, but I assure you it's working.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
eg_Anubhava wrote: user should be able to move,resize and drag and drop a control (a Textbox in my case).
I'll leave it to others to help you with most of this, but you might find it difficult to resize a TextBox, depending on what properties are set. AFAIK you can only resize a non-multiline TextBox horizontally, so you will need to consider this when implementing your drag-handles.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: AFAIK you can only resize a non-multiline TextBox horizontally only
FTFY
(and you could change font sizes to get different TB heights)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|