|
:(Hi All! I am Kunal Mukherjee from Kolkata(Garia Station), India. I am facing a problem while coding in VB.Net. If you can PLEASE HELP ME!! Here goses the problem:
Suppose I am binding all the controls on my form to a dataview. But when I want to add a new record or if I want to mofify records and then update the datasource(database) then i am facing a problem. The dataset is getting updated but the datasource is not. I am using the dataadaptor's update method. But in all examples I found that if they are using dataview then they are using sql statements for update and insertion of records. What I want to know if I can use the update method of dataadaptor's to update the datasource, even if I use the dataview object. But if I go as per logic then whatever I have done is correct. Because changes made to the dataview automatically gets reflected on the datatable it is attached with. so when I use the update method of the dataadaptor then the records whose state has been changed should get updated in the datasource. Well that's as per my knowledge is concern. If you know how to solve this problem then please help me.
Also tell me that do I have to write sql statements for INSERT, UPDATE, or DELETE through the dataadaptor.
|
|
|
|
|
hi all, could you tell me how i can make a treeview to be right to left as in arabic, i work on vb6.0 hope its easy to be done
Thanks alot
Metal Man
|
|
|
|
|
The easiest way to do it in VB6 is to use a 3rd party component. Although the TreeView control does have a RightToLeft property (in VB.NET, not available in VB6), the TreeView is drawn left to right, while the test is draw right to left. It makes the control a bit difficult to read in R-t-L languages.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi man, thanks alot but i dnt understand what do u mean by 3rd party, at the end do u mean that i cant make it right to left on vb6
Thanks alot
Metal Man
|
|
|
|
|
"3rd party" means a control written by someone else besides yourself or Microsoft.
It could be done in VB6, but not easily. The technique is very poorly documented, unless your using VB.NET.
Your best bet is to use a control that's already been written and has support behind it if you run into problems.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need barcode font 2 of 5 can someone tell me where can i get free it cause most of the sites i have checked out are paid.or can someone give me the function or module etc.... thanx in advance.
|
|
|
|
|
Hello everyone,
I'm up to speed with VB.NET now after years of VB6, but I've just started to experiment with the graphics functionality to customise my forms.
I wanted to use ColorMatrix and ImageAttributes so that I can manipulate Alpha, etc... when drawing my graphics.
I've looked high and low, and no one seems to be experiencing the same problem I'm having. In VB.NET it doesn't recognise types ColorMatrix and ImageAttributes. Am I not doing something I should be? Should I be referencing GDI+ or something?
I'm developing in Windows 2000 with Visual Studio 2002.
Any advice would be much appreciated as I'm on a tight time scale!
Many thanks,
Richard
|
|
|
|
|
Make sure your are including the following at the top of your code:
Imports System.Drawing.Imaging
Otherwise, every reference to ColorMatrix that you use would have to be prefixed like this:
Dim myCM As New Imaging.ColorMatrix()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you SO MUCH!!! School boy error, I feel a bit stupid, I did look everywhere for ColorMatrix tho, but didn't see it in Imaging. This has been driving me mad, just popped it in to my code and it's worked!!
|
|
|
|
|
Dear friends,
From my server application I want to send messages to all the clients connected to the SQL database. How can I achieve this? The scenario is like this...
At the day end, on the server the administrator of my system runs the day end option. This option is suppose to transfer the records of a particular day to respective files and so on. Before running the day end option, all the clients has to log out. Now the server is in a server room and clients can be any where in the office. So it’s not possible for the administrator to tell everyone individually to close the system. So I want to develop an option, which tells the administrator that who all are using the system, and the administrator can send them a message to close the system. I am able to display the name of the users logged into the system at a current time but I am not able to send the message. I know that I can use windows sockets for that purpose but can't I use windows messaging service for this??
Operating System: Windows 98/2000/XP/2003
Language: Visual Basic
Backend: SQL 2000
Regards,
Chintan
Chintan
|
|
|
|
|
Hello,
I want to read (RTF) files in my VB.NET programme. How can i do it. I apply the same method of reading text files, but it does not save the formatting of text like (bold, italics, underline) etc.
So , how can i make programme which allows me to read (RTF) Rich Text Format files or Microsoft WORD files in VB.NET through FILE HANDLING.
Plz help me
EsHbAn BaHaDuR
|
|
|
|
|
Public Sub LoadMyFile()
' Create an OpenFileDialog to request a file to open.
Dim openFile1 As New OpenFileDialog()
' Initialize the OpenFileDialog to look for RTF files.
openFile1.DefaultExt = "*.rtf"
openFile1.Filter = "RTF Files|*.rtf"
' Determine whether the user selected a file from the OpenFileDialog.
If (openFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) _
And (openFile1.FileName.Length > 0) Then
' Load the contents of the file into the RichTextBox.
richTextBox1.LoadFile(openFile1.FileName, _
RichTextBoxStreamType.RichText)
End If
End Sub
.NET Framework Class Library
RichTextBox.LoadFile Method (String, RichTextBoxStreamType)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsrichtextboxclassloadfiletopic.asp
|
|
|
|
|
Hello,
Kindly tell me that "how can i READ A SPECIFIC STRING IN TEXT FILE"
The problem is that:
In my Vb.NET application, i have a listbox, which contains different headings. I also have many text files containg data.I want that when i click on Heading1 of Listbox, then the program shows me the information related to the Heading1, after searching from the text files and display it in RICH EDIT BOX.
Kindly help me in this regard.
EsHbAn BaHaDuR
|
|
|
|
|
Imports System.IO
Imports System.Text
Public Class Form1
Inherits System.Windows.Forms.Form
#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
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 ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.Location = New System.Drawing.Point(8, 8)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(120, 199)
Me.ListBox1.TabIndex = 1
'
'RichTextBox1
'
Me.RichTextBox1.Location = New System.Drawing.Point(144, 8)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(192, 200)
Me.RichTextBox1.TabIndex = 2
Me.RichTextBox1.Text = "RichTextBox1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(352, 230)
Me.Controls.Add(Me.RichTextBox1)
Me.Controls.Add(Me.ListBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.Items.Add("This")
ListBox1.Items.Add("Is")
ListBox1.Items.Add("A")
ListBox1.Items.Add("Way")
ListBox1.Items.Add("This")
ListBox1.Items.Add("Can")
ListBox1.Items.Add("Work")
RichTextBox1.Clear()
End Sub
Private Sub GetFiles(ByVal di As DirectoryInfo, ByVal searchPattern As String, ByRef MyFiles As ArrayList)
For Each fi As FileInfo In di.GetFiles(searchPattern)
MyFiles.Add(fi.FullName)
Next
For Each d As DirectoryInfo In di.GetDirectories()
GetFiles(d, searchPattern, MyFiles)
Next
End Sub
'this is the search and it is CASE Sensitive
'it searches for the first occurrence of the search word
'and records the path and filename in the richtextbox1
Private Function ReadMyFile(ByVal MyFilePath As String) As String
Dim MyStreamReader As StreamReader = IO.File.OpenText(MyFilePath)
Dim MySB As StringBuilder = New StringBuilder
Do While MyStreamReader.Peek() >= 0
MySB.Append(MyStreamReader.ReadLine())
Loop
Dim index As Integer = -1
Do
index += 1
index = MySB.ToString.IndexOf(ListBox1.SelectedItem, index)
If index >= 0 Then
RichTextBox1.AppendText(MyFilePath & vbCrLf)
Exit Do ' remove this to find all occurrences
End If
Loop Until index = -1
MyStreamReader.Close()
Return MySB.ToString()
End Function
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
RichTextBox1.Clear()
' files to search for
Dim searchPattern As String = "*.xml"
' directory to start recursive search in
Dim InitDirectory As String = "C:\xmldata\"
Dim MyFiles As ArrayList = New ArrayList
Dim di As DirectoryInfo = New DirectoryInfo(InitDirectory)
GetFiles(di, searchPattern, MyFiles)
For Each s As String In MyFiles
'Debug.WriteLine(s)
ReadMyFile(s)
Next
End Sub
End Class
|
|
|
|
|
I am attempting to convert a UTC time into a normal date and time using a dataset and the dataset's .GetXML() method.
I currently have the following UTC Time:
2004-08-16T16:30:54.0000000-05:00
I would like it to display as:
8/16/2004 4:30:54 PM
This is so that when I create an Excel file through XSLT, I can set the column type to Date and then have a date that is User Friendly.
Thanks for any help that can be provided.
|
|
|
|
|
Daytime, Internet Time Service Class
By Alastair Dallas
http://www.thecodeproject.com/vb/net/daytime.asp
|
|
|
|
|
hI ALL, My problem is this:
Im writting a control that reads a list of graphics from an embedded text file. This file is generated by soap formatter.
The Soap F. serialises a class that holds info.
My program then uses soap to deserialise the file, back into the orig class and reads the info and loads the embedded pictures into variables
This all works fine at runtime, but when you add the control to a form in design time it returns an error : Cast not valid.
I can Deserialise it back into a object type though.
i.e
Dim SoapF as new soapformatter
Dim MemoryStream as memoryStream
Dim obj as Object
Dim tstClass as TestClass
'This works at designtime/runtime :
obj = soapf.deserialise(MemoryStream,Object)
'This works at runtime (but i need it to work all the time!) :
tstClass = soapf.deserialise(MemoryStream,TestClass)
Any Ideas?
__________________
Thanks for your help!
|
|
|
|
|
I have a bitmap(.bmp) I want to read bitmap's 1st pixel or other pixels. How I read it? How I find pixel coordinate?
Is it possible on the vb6?
You should to visit this site. http://www.2ncielbilgisayar.com and http://www.crosscable.net
|
|
|
|
|
try here
http://www.vbaccelerator.com/home/VB/Code/vbMedia/Image_Processing/index.asp
|
|
|
|
|
|
I have to do something similar in file manger(like Norton Commander etc)in VB.Net and I need some free code for that cause I found big difficulties in building that.Anybody can help me?
|
|
|
|
|
Your going to have to be a bit more specific about what you're looking for. There's free code all over this site, but what do you need help with?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there a reliable way to determine if any given path is on a local device, rather than a mapped or shared device? (I know I can scrape the string for C:, etc. but I want this to work even if the PC has several partitions.) Thanks.
Jerry
|
|
|
|
|
Jerry,
You could do somthing like this i suppose.
Imports System.Runtime.InteropServices
<DllImport("mpr.dll", SetLastError:=False, CharSet:=CharSet.Auto)> _
Friend Shared Function WNetGetUniversalName( _
ByVal lpLocalPath As String, _
ByVal dwInfoLevel As Int32, _
ByVal lpBuffer As IntPtr, _
ByRef lpBufferSize As Int32) As Int32
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim bufSize As Int32 = 2000
Dim bufPtr As IntPtr = Marshal.AllocHGlobal(bufSize)
Dim sMapPath As String = "Z:\"
Dim ret As Int32 = WNetGetUniversalName(sMapPath, 2, bufPtr, bufSize)
If ret = 0 Then
Debug.WriteLine("This is a Mapped Network Drive " & ret)
End If
If ret = 1200 Then
Debug.WriteLine("The specified device name is invalid. " & ret)
End If
If ret = 2250 Then
Debug.WriteLine("This network connection does not exist. " & ret)
End If
Marshal.FreeHGlobal(bufPtr)
End Sub
|
|
|
|
|
Dang, I hate when it does that.
<DllImport("mpr.dll", SetLastError:=False, CharSet:=CharSet.Auto)> _
Friend Shared Function WNetGetUniversalName( _
ByVal lpLocalPath As String, _
ByVal dwInfoLevel As Int32, _
ByVal lpBuffer As IntPtr, _
ByRef lpBufferSize As Int32) As Int32
End Function
|
|
|
|