|
i'm not sure that i understand your question, and i got a pretty 'Go-Around' solution for the question i *think* you have asked.
you can load and display any image on any object, using BitBlt.
read this article i wrote
http://www.codeproject.com/vb/net/Bitblt_wrapper_class.asp[^]
you can load a bitmap and use this class to show it over the tabcontrol.
or you can think about it and probably find a better way to do it
Fade (Amit BS)
|
|
|
|
|
Hi There,
Who can help me with this one.
I need to import data from a Data Interchange file (*.DIF) to a Dataset or Datareader
I was thinking to do that with a deserialization but I can not define the Dif format.
Any Idea how to solve this ?
Here an example how I load data from a binary file to a hashtable
Dim ConfigFile As New FileInfo(GetTypePath())
If ConfigFile.Exists Then
Dim bfConfig As New Formatters.Binary.BinaryFormatter
Dim fsConfig As New FileStream(Me.GetTypePath(), _
FileMode.Open, _
FileAccess.Read)
Me.oDataStore = CType(bfConfig.Deserialize(fsConfig), Hashtable)
fsConfig.Close()
Return True
End If
I was thinking to replace the Hashtable with System.Windows.Forms.DataFormats.Dif
But that is not working. May be I need todo this with Direct Cast but I do not know how to that
Any help or info is welcome
Thanks
|
|
|
|
|
I have a problem with VB.Net 2003, ever since upgrading Windows XP sp 2.
Msgbox now does not show anything in the text or the buttons. The same exe works correctly on a Windows 2003 server, but not on another machine that runs sp 2.
This must be a known problem, what do I do to fix it.
Please help
|
|
|
|
|
The first thing I'd do is update the drivers for your video card.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Already done. This is also happening on at least one other PC with sp2. Mine is an HP the other is a Dell.
|
|
|
|
|
How can i show sort icon (Arrows) in the column header of the listview in vb.net can any body help me....
Ravi
|
|
|
|
|
Hi,
I have developed a VB application. That simply have two Database, One source database is MS Access and destination database is SQL Server. Through this application it will import data from source db (Access) to destination db (SQL Server). when running application it works efficiently bout if yo see its status in windows task manager it display as "Not Responding", while it import all data successfully.
Does anyone find its solution?
Thanks
Amit Chowdhury
|
|
|
|
|
This is because your application is not yielding every once in a while so it's message pump can execute. Inside the loop that is processing your records, include a Application.DoEvents() statement.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Do anyone know how can i make use of TAPI in VB.NET for developing Telephony Applications like Answering Machine.Thank U
|
|
|
|
|
The TAPI 3.0 wrapper has "issues" to say the least. Your best bet is to use TAPI 2.0 instead. There is a wrapper class available on GotDotNet, here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I would like to know how to share a folder which is on the C drive of a PC which is on a network.
I have 2 computers hooked on to the server.
On the first machine (C DRIVE) I have created a folder and set its property to sharing.
From the second PC I want to access only that folder of the first PC.
The Server is on Win2003 and the workstations are on win2K
I have Administrative rights too.
can some one help
Tnx
|
|
|
|
|
Your question has nothing to do with VB.NET. Post it in the Operating SYstems/SysAdmin Forum[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You should post this question to the Operating System forum, but anyway I still answer your question.
Paps2 wrote:
From the second PC I want to access only that folder of the first PC.
In case if you are using client/server with DHCP server, you must know the computer name and share name of your folder. If you the first PC name pc1 and the share folder name is test then on the second PC go to Start menu -> Run and type \\pc1\test and press enter.
In case if you are using static IP address of each machine, you must know the computer name or an IP address of the destination machine. If you the first PC name pc1 with IP address 192.168.1.10 and the share folder name is test then on the second PC go to Start menu -> Run and type \\pc1\test or \\192.168.1.10\test and press enter. But make sure that you have the following options:
1. Client: Client for Microsoft Network.
2. Service: File and Print sharing for Microsoft Network service.
3. Protocol: TCP/IP protocol.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks a bunch. Apreciate your prompt reply.
Sorry for my stupidity in putting the question here in this forum. Next time I will put them in approprite forums.
Tnx
Paps
|
|
|
|
|
I would appreciate it if some one could help me. I don't know how to write the code to save or save as in my forms. Here is the code that I have so far. Note that my parent form has file(new,open, save, save as, close) on it. I have already done the new code and I have been searching through the help files of .Net for 2 hours now with no help what so ever. Also please note that opion strict is set to on.
Public Class frmMDI
Inherits System.Windows.Forms.Form
Dim counter As Integer = 1
Private Sub frmMDI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Dim j As Integer
'For j = 1 To 3
' Dim frmDocForm As New frmChild
' frmDocForm.MdiParent = Me
' frmDocForm.Show()
'Next
End Sub
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
If e.Button.Tag Is "new" Then
NewFile()
ElseIf e.Button.Tag Is "open" Then
ElseIf e.Button.Tag Is "save" Then
ElseIf e.Button.Tag Is "bold" Then
Dim frmActiveChild As frmChild = Me.ActiveMdiChild
If (Not frmActiveChild Is Nothing) Then
'process the child form – save, close, whatever
frmActiveChild.txtDoc.Font = New Font(Me.Font, FontStyle.Bold)
End If
End If
End Sub
#Region "Menu Code"
#Region "Window Code"
Private Sub mnuCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuCascade.Click
Me.LayoutMdi(MdiLayout.Cascade)
End Sub
Private Sub mnuHorizontal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuHorizontal.Click
Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub
Private Sub mnuVertical_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuVertical.Click
Me.LayoutMdi(MdiLayout.TileVertical)
End Sub
#End Region
#Region "File Code"
Private Sub mnuNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuNew.Click
NewFile()
End Sub
Private Sub mnuOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuOpen.Click
End Sub
<b> Private Sub mnuSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSave.Click
End Sub
Private Sub mnuSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSaveAs.Click
End Sub</b>
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
End Sub
#End Region
#End Region
#Region "Procedures"
Private Sub NewFile()
Dim frmDocForm As New frmChild
frmDocForm.MdiParent = Me
frmDocForm.isDirty = False
frmDocForm.newDoc = True
frmDocForm.docName = "Document" & CStr(counter)
counter += 1
frmDocForm.Text = frmDocForm.docName
frmDocForm.Show()
End Sub
#End Region
this is the code in my child form.
Public Class frmChild
Inherits System.Windows.Forms.Form
'---------------------------------------------------
'Public attributes (instance variables)
'isDirty: Set True if document needs to be saved
Public isDirty As Boolean
'newDoc: Set True if form was just created using New
'(no file on disk yet)
Public newDoc As Boolean
'docName: Set to filename of document (no path info)
Public docName As String
'pathName: Set to path (directory) where file saved
'(does not include filename)
Public pathName As String
End Class
|
|
|
|
|
if all you need is to write to a file, simply use the FileStream object in the frameworks
(if it is then the title of your message is VERY misleading, if not, then my reply is useless )
the basics are to create a FileStream object reference
Dim MyFileStream as System.IO.FileStream
and then you need to create the file stream, by opening the file
if it is a new file (there isn't a file with the same name at the same directory)
you should create the file like so:
MyFileStream = IO.File.Open(MyFilePath, IO.FileMode.CreateNew)
if the file already exists, you would probably want to erase the data and rewrite it do:
FileStream = SystemIO.File.Open(MyFilePath, IO.FileMode.Truncate)
to check whether the file exists use:
If System.IO.File.Exists(MyFilePath) Then ...
if you want to be really smart about it, you can scan the file to see what segements of have been chaged and only write those parts (mostly usefull in large files)
Fade (Amit BS)
|
|
|
|
|
Does anybody know how to get the ‘X’ click event?….the ‘X’ in the upper right hand corner of a form.
I want to perform a function if the ‘X’ is used to close the form (something like frmMain_ClickX) but if I use frmMain_Closing it causes certain functions to execute twice.
I’m assuming that frmMain_Click is not specifically associated with the click event of the ‘X’.
Thanks
Brad
|
|
|
|
|
Private Sub whatever_you_want(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
|
|
|
|
|
I’m still a bit confused.
I have the following sub that I want to be sure is executed whenever the form closes:
SaveData()
I have programmed the sub ‘SaveData()’ to execute under the ‘mnuExit_Click’ (and other areas).
My problem is that ‘SaveData()’ is executed once when ‘mnuExit_Click’ is executed and then again during frm1_cloising.
I assume that it is bad practice to just execute ‘SaveData()’ in ‘frm1_closing’ and in no other location.
Thanks
Brad
|
|
|
|
|
Brad Fackrell wrote:
I assume that it is bad practice to just execute ‘SaveData()’ in ‘frm1_closing’ and in no other location.
The reason why it's getting executed twice is because you execute it in the mnuExit handler AND your doing it again when the Closing event is fired. If you want to handle all possible ways of closing a form, then the Closing event is the way to go...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
If you want to handle all possible ways of closing a form, then the Closing event is the way to go...
Okay. I thought that would work but then I "second guessed" myself because I thought; Why add any sub routines under mneExit?
Thanks Dave.
|
|
|
|
|
Replace SaveData() in mnuExit_Click and all other locations (except frm1_closing) by Me.Close().
|
|
|
|
|
Works perfect! Thank you
Brad
|
|
|
|
|
Hi, I am having a problem with the drop down mode in a combo box. I have set up a combo box that allows the user to type values and the list will filter out and select the next closest item. It is a multicolumn, autocomplete combobox. The value member, text, and other properties can be found when the item exists in the list, but when the user types a value not found within the list, I get index 0 problems. I was wondering if anyone has any suggestions on how I can fix or get around this problem. Thank you.
|
|
|
|
|
I am rewriting a VBA excel funtion that has ranges in VB.NET
I have no clue how to do the ranges in vb.net (most likely a 2 D array).
The following is the VBA excel function that I am trying to rewrite.
strip(Today,EndDate1Yr,$L$120:$L$122,$A$20:$B$23,$E$4:$F$9)
today = startdate (date datatype)
enddate1yr = fordate (date datatype)
intraday = range
serial = range
standard = range
Does any one suggest me or share any code pointers that can help me to proceed.
thanks
nath
|
|
|
|