|
please tell me how to install or use webcam in Vb 6.0 and how to save images in ms access through vb. im developing a system now and it needs to use webcam to capture and store pictures.
thanks!!!!!
adikkaymonic
|
|
|
|
|
Hi all,
Im using a windows form and on mouse down on a label i want to draw an rectangle on the label. Its working fine when the label without border. But When i have the label with border, after clicking the label for the fisrt time its throwing "System.Runtime.InteropServices.ExternalException" . and an Generic GDI+ Error.
In DrawRectangle function i removed the border of the control by converting the control to a label inroder to have that BorderStyle Property. I think problem might have occured in this line of code.
and its not drawing the rectangle, for the second time mouse down, its working fine and draws the rectangle properly.
Whats could be the problem, Please guide me. I was struggling with this error for the past two days. Code is given below.
Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown
If CInt(Label1.Tag) = 0 Then
Label1.Tag = 1
DrawRectAngle(Label1)
ElseIf CInt(Label1.Tag) = 1 Then
Label1.Tag = 2
Label1.Refresh()
DrawCrossLine(Label1)
Else
Label1.Tag = 0
Label1.Refresh()
End If
End Sub
Private Sub DrawRectAngle(ByVal ControlName As Control)
Dim RectPen As New Pen(Color.Lime)
RectPen.Width = 6
g = ControlName.CreateGraphics()
Try
If TypeOf ControlName Is System.Windows.Forms.Label Then
CType(ControlName, Label).BorderStyle = BorderStyle.None
End If
Dim rect As Rectangle
rect = New Rectangle(1, 1, ControlName.Width, ControlName.Height)
g.DrawRectangle(RectPen, rect)
Catch ex As Exception
End Try
End Sub
Regards
Mukilan.
|
|
|
|
|
hi!
im new to vb.net. and lookin for help frm u all genius working in .net
i have seen the showpopup method, this is very nice thing in .net now good to c such thing for quick help. i have tried the example from msdn, i thot from example that the showpopup will show help on the bottom of the textbox but unfortunately it is not working that way. it is showin somewhere else on the form.if i do maximize the form the location also changes. so plz let me knw is there anyprob for this popup help showing location or is there anything im doing wrong. i have seen one topic in this website too on this. in this topic they have used mousepointer position to showpopup help. that is working fine. wherever the cursor is system show that popup on that place but i wana to show that quick help popup on the textbox or anycontrol bottom side as example in msdn is saying.
thankx in advance and help will b v v appreciate.
atif saeed khan
software developer
realtime technology
dubai
|
|
|
|
|
|
hi!
yup its a desktop application. actually im working on a product in which i have to give enduser the help option too.
|
|
|
|
|
Let me see a sample of your code. Maybe I can fix it if I can figure out what it is you want from it.
|
|
|
|
|
ok! actually if u can c the help of showhelp popup in msdn the same example i tried to run.
wat i gt idea from this example is that the popup help will popup on the edge of the textbox. but it is not working so. try the example in msdn.
Private Sub textBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyUp
' Determine whether the key entered is the F1 key. Display help if it is.
If e.KeyCode = Keys.F1 Then
' Display a pop-up help topic to assist the user.
Help.ShowPopup(textBox1, "Enter your first name", New Point(textBox1.Right, Me.textBox1.Bottom))
End If
End Sub 'textBox1_KeyUp
|
|
|
|
|
popalzai wrote: New Point(textBox1.Right, Me.textBox1.Bottom))
There's you're problem right there - the point you're creating will plot the location relative to the screen, not the textbox control or it's containing form. You have to take into account the location of the textbox on the form AND the location of the form itself.
Try this, it'll show the popup over the top right of the textbox no matter where the form is or what window state it's in (normal/maximized).
Private Sub TextBox1_KeyUp(....) Handles TextBox1.KeyUp
If e.KeyCode = Keys.F1 Then
Help.ShowPopup(Me.TextBox1, "Help is at hand", New Point((Me.Left + TextBox1.Right), (Me.Top + TextBox1.Bottom)))
End If
End Sub
|
|
|
|
|
thankx for reply.
but dear its not working in the mdi application.
lets suppose if u take this form as a child form then wat ?
|
|
|
|
|
Then you mess around until you get it right.
Private Sub txt_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt.KeyUp
If e.KeyCode = Keys.F1 Then
Dim x, y As Integer
Dim r As Rectangle = txt.RectangleToScreen(txt.Bounds)
x = (r.Left - txt.Left) + txt.Width
y = (r.Bottom - txt.Top) - txt.Height
Help.ShowPopup(Me.txt, "Help is at hand", New Point(x, y))
End If
End Sub
|
|
|
|
|
i finish my first application into vb.net 2003 i need to create setup package for application with these options
1-create the database on client computer during setup
2- check if there is no sql engine setup the sql_engine
3- i need setup interface like normal setup interfaces and i have the ability to make any changes in it
ma_refay
|
|
|
|
|
Thanks for the update on yur project.
Did you have a question also?
---
b { font-weight: normal; }
|
|
|
|
|
i work in vb.net 2003 i need to play wave songs into my application when i click button the sons run in the background when i clicked another button the sound file stop
how?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ma_refay
|
|
|
|
|
|
i work in vb.net 2003 i use datagrid to input data to save to database when i try to put date in any format except default format ''mm/dd/yy' the datagrid cleared datetime cell when i change row
i want to put date in the format 'dd/mm/yy' and when i reterive date from database into datagrid i reterive datetime column in the format ''dd/mm/yy'
ma_refay
|
|
|
|
|
i simplly have a application with a form containing a button ,i have to pass the content to show on label that is in another apllication. how i can pass pass it from one exe to another & then get it in another exe
jagmit
|
|
|
|
|
WM_COPYDATA is the easiest way to do this, I believe. Not sure how you'd do that in VB.NET, but I'm certain you can.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My Project has a requirement of storing Image and Text data in Access Database. I am using Vb.net for coding.
According to me, This requirement can be fullfilled using binary files. But i am not able to figure out how to do it.
The requiremnt is to accept data in RichTextBox(Text and Images) and convert it to binary file and store it to DB(Access). and Vice Versa.
Can any body help me regarding this...
Any links berifing the matter or any article
Plz i need help...
Jats
|
|
|
|
|
hey, I am C# developper, but i think my code might be useful since we are both using .NET framework.
do the following.
Check if file exist first by using the File class.if exists then do this
byte[] Imagespace = File.ReadAllBytes(strPath);
strpath is the full path of the photo.
you can then send to stored procedure or do whatever you want once you have the photo in Imagespace variable.
I wish my code would be useful.
I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
|
|
|
|
|
Thanks rabih_kai for sharing this information.
|
|
|
|
|
Hi thankx for the help rabih.
Any how i have fullfilled the reqirement in a different and simple way. As the data is inserted in RichTextBox i accessed the data in RTF format from RTBox and stored in database. And while retrieving i can assign the data to RTBox.Rtf. It will convert the Text and Images and will display them.
Simple isnt it...
Jats
|
|
|
|
|
Hello
How can I make the IDE show tool tips for the properties of my own objects? I know it can be done but am not sure where to look.
Many Thanks
-- modified at 8:49 Tuesday 22nd August, 2006
The FOZ
|
|
|
|
|
Take a tool tip component and place it on the form.
Go to Mouseover event of ur object and add this text...
ToolTip1.setToolTip(ObjectName(EX:Button1),"ToolTipText"(Ex:"New"))
Jats
|
|
|
|
|
Thanks for the reply, but its not quite what I'm after, I may have phrased the question wrong.
The kind of tool tips I am after are when I am using my object in code and the intellisense pops up. When I select a particular property for my object I would like some text to appear detialing what the property does. Like when you are using a text box and you type TextBox1.Text and a tool tip pops up telling meabout the Text property.
Many Thanks
The FOZ
|
|
|
|
|
hi everyone,
i have created a hashtable that will create 5 random and unique numbers, and have copied it to an array. i now need to retrieve the stored values from the array to individual labels (label1.Text, labe12.text). your help is appreciated.
here is my code:
Dim hash As New Hashtable
Dim RandNum As Integer
Dim targetArray() As DictionaryEntry
For I As Integer = 1 To 5
Do
RandNum = Convert.ToInt32(Rnd() * 15)
Loop While hash.Contains(RandNum)
hash.Add(RandNum, Nothing)
Next
ReDim targetArray(hash.Count - 1)
hash.CopyTo(targetArray, 0)
label.text = targetArray(1) 'i am getting an error stating i cannot
'convert a dictionary entry to string.
Julian
"New to programming and I am hooked"
|
|
|
|