|
I want to know how i can read/write from USB port in vb.net?
|
|
|
|
|
The USB port doesn't work like a serial or parallel port. You have to write your code to communicate with a specific device attached to the bus. How you do that depends entirely on the device your trying to do something with.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello
I am using VS 2005 CR 10.
I am using typed datasets to populate a report.
From my database I have 1 field called incidentDate, this is a smallTimeDate datatype.
My reports always displayes the correct date, but is followed by the time which is always 12:00. For example 18/12/2006 12:00 AM.
I don't want to display this time. I have tried setting the DateWindowsDefaultType in the report properties for that field. But this did not work.
Does anyone have any other ideas,
Thanks very much,
Steve
|
|
|
|
|
How about trying CStr({@Date},'MM/dd/yyyy')). I dont have the IDE with me so check for the correct syntax
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu
|
|
|
|
|
<br />
Imports WMPLib<br />
' used to import the windows media player lib<br />
<br />
i can create a play list, play selected media and all that but i can't get it to select a play list from file and play it . i looked briefly at the "currentplaylist" and other IWMPPlaylist but they only have functions that adds to a play list. i just want to simply select a play list from a storage area of choice.
any help would be appreciated. thanks in advanced.
p.s. Bless up NCU and Bless up Jamaica.
c.smith
|
|
|
|
|
Hello,
I am writing a problem that populates a combo box. When the user selects something from the combo box, they will press a tab key that will take them to the next control. However, i have tried using the keydown, keyup, and keypress. All these capture the other keys but not the tab key.
Sample of what I am trying to do.
Private Sub ComboCompany_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboCompany.KeyDown<br />
If (e.KeyCode = Keys.Tab) Then<br />
MessageBox.Show(Keys.Tab)<br />
Else<br />
MessageBox.Show(e.KeyValue)<br />
End If<br />
End Sub<code><br />
<br />
many thanks for your help,<br />
<br />
Steve
|
|
|
|
|
What exactly are you trying to do?
You could use the leave event of the combobox to know when the focus moves from the combobox to any other control on the screen.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu
|
|
|
|
|
Yes the leave event would be a better option because a windows form intercepts the tab key. Leave event would be a hassle free workaround.
Posted by The ANZAC
|
|
|
|
|
Hello All!
Seems pretty simple, but this is my first attempt at printing. There are alot of options when it comes to printing. All I need to do is click on a button, and have that event print a pre-selected text file. Just a file created in notepad, 4 lines of text. I don't need to preview it, and just use the default printer. I don't need the user to set up any settings, just hit the print button, and that text file will get printed. What is the easiest way to accomplish this?
I'm working in VS 2003, vb.net.
Thanks!
Rudy
|
|
|
|
|
you can use 'print document' component from the toolbox and handle the printing event for that component. something like using grapics.drawstring function
|
|
|
|
|
I am working on a project that requires the ability to view a tiff file and be able to zoom in and out. Anyone know of a control that can do this in VB.Net 2005?
Thanks
Simmy
|
|
|
|
|
If you want that kind of functionality written for you, then you'll either have to look for a 3rd party component to do it for you or write it yourself.
Either way, you'll need to either write or find a 3rd party component to support TIFF files anyway, because TIFF support in GDI+ is limited. There is no support for JPEG compressed TIFF files in GDI+, and hence, no control that depends on GDI+, like the PictureBox control, will work with them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
does anyone know of some sort of freeware program that can analyse a .net component or application so see how its made up?
Im guessing some sort of reflection?
Regards
Mark
|
|
|
|
|
There is nothing that will "analyze" it for you. I have no idea what you mean by "see how it's made up". But, there is always the most indispensible tool on the planet Earth -> Lutz Roeder's .NET Reflector[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
if you want to look at the manifest and stuff you can use ildasm.exe.
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
Full Source Code For Advanced HTML Editor v1.2:
Features:
Edit multiple files at a time,
Preview in the built-in browser,
Complete help for all html tags,
Insert tags from the help panel,
Dialog boxes for all html tags,
No need to manually code every tag.
Advanced features of visual basic are used in this project. The source code is fully commented and easy to understand.
The source is free to use in your projects, but requires my permission befor distributing to anyone.
To download the source code for the project follow the links below..
http://rapidshare.com/files/7869936/THE10.rar[^]
http://www.megaupload.com/?d=3VSBMGRH[^]
nagarjuna
|
|
|
|
|
Nagarjuna123 wrote: The source is free to use in your projects, but requires my permission befor distributing to anyone.
To download the source code for the project follow the links below..
Why not write up your component with source code and publish an article here at code project. That is what the spirit of the site is all about sharing code. No one is interested in spam in the message boards, which is what your post is.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
i am using dynachart activex on a form. when the chart is refreshed the whole form flicker.
zafar
|
|
|
|
|
Is DoubleBuffer active on the form. in .NET 1.1 you can use the SetStyle command. If you use .NET 2.0 you can use SetStyle and/or the DoubleBuffer property. Either of these two ideas might help with the form flickering.
Another possibility would be to see if the activeX has a refresh event and set a handler for the event that will also refresh the form before the flicker.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Thanks thomas
I am actually working on vb6 is there any thing i can do.
regards
zafar
zafar
|
|
|
|
|
The Windows API call for LockWindowUpdate will control your form flickering when you do a lot of updates to controls.
In a code module, put this in your declaration section:
Declare Function LockWindowUpdate Lib "user32" _
(ByVal hWnd As Long) As Long
Then add this Sub to the same module.
Public Sub LockWindow(hWnd As Long, blnValue As Boolean)
If blnValue Then
LockWindowUpdate hWnd
Else
LockWindowUpdate 0
End If
End Sub
When you are about to update the chart, call LockWindowUpdate:
' Lock the form's window to prevent refresh
LockWindowUpdate Me.hWnd, True
' Do your thing with the chart...
' Unlock the window to show the updated form
LockWindowUpdate 0, False
I haven't tried this with chart controls, but it works OK with TreeViews and ListViews.
---------------------------------------------------------------------------------------------------
"It may not be rocket science, but then rocket science produced Apollo 13."
- GIS Timmy!?
|
|
|
|
|
Hi every one ,
I would like to add a command bar Popup to office word 2003,for this reason I created an Com Addin project with visual basic ,I can see the result of my project in word successfully ,I mean when I open word there is my popup in the Standard Command bar,but when I close the word I expect the code in the "OnBeginShutdown sub" is doing and the Popup is deleted ,I see this code is doing but after that when I open the word the My popup there is in the word and it was not deleted ,My code is same as below :
Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete
Dim oCommandBars As CommandBars
Dim oMerdciBar As CommandBar
On Error Resume Next
oCommandBars = applicationobject.CommandBars
oMerdciBar = oCommandBars.Item("Standard")
MyPopup = oMerdciBar.Controls.Item("Signature")
If MyPopup Is Nothing Then
MyPopup = oMerdciBar.Controls.Add(MsoControlType.msoControlPopup)
With MyPopup
.Caption = "MySignature"
.Tag = "MySignature"
End With
B_Add_DS = CType(MyPopup.Controls.Add(1), CommandBarButton)
With B_Add_DS
.Style = MsoButtonStyle.msoButtonCaption
.Caption = "Add Digital Signature"
.Tag = "Add Digital Signature"
.OnAction = "!<test1.connect>"
.Visible = True
End With
B_Undo_Last_DS = CType(MyPopup.Controls.Add(1), CommandBarButton)
With B_Undo_Last_DS
.Style = MsoButtonStyle.msoButtonCaption
.Caption = "Undo Last Digital Signature"
.Tag = "Undo Last Digital Signature"
.OnAction = "!<test1.connect>"
.Visible = True
End With
B_Verify_DS = CType(MyPopup.Controls.Add(1), CommandBarButton)
With B_Verify_DS
.Style = MsoButtonStyle.msoButtonCaption
.Caption = "Verify Digital Signature"
.Tag = "Verify Digital Signature"
.OnAction = "!<test1.connect>"
.Visible = True
End With
End If
oMerdciBar = Nothing
oCommandBars = Nothing
End Sub
Public Sub OnBeginShutdown(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnBeginShutdown
B_Add_DS.Delete()
B_Undo_Last_DS.Delete()
B_Verify_DS.Delete()
MyPopup = Nothing
MyPopup.Delete()
End Sub
I read below link "http://support.microsoft.com/default.aspx?scid=kb;en-us;302896"
but I do not understand what is my problem.
I appreciated for any help .
yours sincerely ,
Orchid
|
|
|
|
|
visual studio 2003
i wrote a custom container control for my project.
i compiled it to .dll, inserted it into 'windows forms' in toolbox, and then into my form.
now i moved the folder that is containing the original dll, thinking there will be no trouble, since my project folder also contains that dll.
didn't work, of course.
so how can i make sure, the programme always uses the dll that is included to my project folder, instead of using the original file in some folder that might not exist any more or at least not on the currently used computer? i have to develope my programme on different computers and everytime i copy the project to another computer, the source code doesn't work anymore, because the dlls are "missing" (i.e. the original dll's folder is on another computer).
what can i do?
|
|
|
|
|
Be sure the dll is in your project directory, delete the reference to the dll in your project, add the reference back to your project; but from the dll in your project directory, right click on the reference and select propertys set 'copy local' to false
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
i think, i tried this one already, and it didn't work. but maybe something went wrong. i will try again. thanks for your answer.
|
|
|
|