|
Okay. I got it. Tks lots for ur help!
|
|
|
|
|
Dude, don't scream. Its not forum for doing homework. If you stuck somewhere doing code or getting some error which you cudnt be able to resolve by Googling it, then post it here. Then we may try to resolve or give you a right direction to proceed.
Oh , ya, don't put everything in subject line and don't post same thing twice.
-Peace
"Rome did not create a great empire by having meetings, they did it by killing all those who opposed them"
|
|
|
|
|
pls tell the code to use the text box to browse using listbox
my listbox inside was my database.
now i will use textbox as a searching but i dont know what code inside the text box to browse the database inside the listbox
sheldon
|
|
|
|
|
can u please inform it clearly that what u want to do ????
I am realy confused !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
i program in visual basic now i use textbox to as a searching..in the list box! the listbox inside the list is my database! my problem is i dont know what code inside the textbox to work it. for example when i type in the textbox for example i type "computer" in the textbox now the link in the listbox turn to "computer"pls help me
|
|
|
|
|
|
Instead of posting a question that makes no sense three times, try posting a question that makes sense, once.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how to use scroll bar in pictur box
Piyush Vardhan Singh
|
|
|
|
|
You'd have to write the code yourself to make the scrollbar have the right extent, and to move the image. IMO you're better off just drawing the image in your paint event, it makes scrolling easier to control.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
my dear i had done this but its not working
Piyush Vardhan Singh
|
|
|
|
|
but its working fine for me !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Did you put the PictureBox INSIDE the Panel control??
|
|
|
|
|
Hello Piyush,
I hope the following code helps:
Private bWindowIsResizable As Boolean
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTBOTTOMRIGHT = 17
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Form_Load()
HScroll1.Height = 255
VScroll1.Width = 255
'set flag indicating a resizable window
bWindowIsResizable = (Me.BorderStyle = vbSizable) Or _
(Me.BorderStyle = vbSizableToolWindow)
'set up the picture box used to fill
'the corner between the H and V scroll
'bars, and if the window is sizable
'print a 'gripper' image to the control
With Picture3
.AutoRedraw = True
.AutoSize = True
.ForeColor = &H80000015
.BackColor = Me.BackColor
.BorderStyle = 0
.ZOrder 0
'if sizable windows print the gripper image
If bWindowIsResizable Then
.Font.Size = 11
.Font.Name = "Marlett"
.Font.Bold = False
Picture3.CurrentX = 10
Picture3.CurrentY = 10
Picture3.Print "o"
End If
End With
With Picture1
.BorderStyle = 0
.Move 0, 0
.Cls
End With
With Picture2 'inner (cyan) picture box
'as we're loading an image, expand pix2
'to the size of the loaded graphic
.AutoSize = True
.BorderStyle = 0
.Move 0, 0
.Cls
'obviously, change this to a valid image on your system
.Picture = LoadPicture("c:\windows\xp5layout.jpg")
End With
With HScroll1
.Max = (Picture2.ScaleWidth - Picture1.ScaleWidth)
.LargeChange = .Max \ 10
.SmallChange = .Max \ 25
.Enabled = (Picture1.ScaleWidth <= Picture2.ScaleWidth)
.ZOrder 0
End With
With VScroll1
.Max = (Picture2.ScaleHeight - Picture1.ScaleHeight)
.LargeChange = .Max \ 10
.SmallChange = .Max \ 25
.Enabled = (Picture1.ScaleHeight <= Picture2.ScaleHeight)
.ZOrder 0
End With
Picture3.ZOrder 0
End Sub
Private Sub Form_Resize()
'Picture1 is the *outer* pix box (the red viewport)
'Picture2 is the inner pix box (the cyan container to scroll within the viewport)
'don't attempt resizing if minimized!
If Me.WindowState <> vbMinimized Then
'this prevents an error if
'the form is sized too small
If (Me.ScaleHeight > HScroll1.Height) And _
(Me.ScaleWidth > VScroll1.Width) Then
Picture1.Move 0, 0, Me.ScaleWidth - VScroll1.Width, _
Me.ScaleHeight - HScroll1.Height
With HScroll1
.Left = 0
.Top = Picture1.Height
.Width = Picture1.Width
.ZOrder 0
.Enabled = (Picture1.ScaleWidth < Picture2.ScaleWidth)
'if the form has been resized to
'display the entire pixbox,
'disable the scrollbars
If .Enabled Then
.Max = (Picture2.ScaleWidth - Picture1.ScaleWidth)
End If
End With
With VScroll1
.Left = Picture1.Width
.Top = 0
.Height = Picture1.Height
.ZOrder 0
.Enabled = (Picture1.ScaleHeight < Picture2.ScaleHeight)
If .Enabled Then
.Max = (Picture2.ScaleHeight - Picture1.ScaleHeight)
End If
End With
'position the fake sizing grip
Picture3.Move VScroll1.Left, HScroll1.Top
End If '(Me.ScaleHeight > HScroll1.Height) And ...
End If 'Me.WindowState
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Form1 = Nothing
End Sub
Private Sub Picture3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'if a sizable window..
If bWindowIsResizable Then
'..fake a resize grabber action
If Button = vbLeftButton Then
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTBOTTOMRIGHT, ByVal 0&
End If
End If
End Sub
Private Sub Picture3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'if a sizable window..
If bWindowIsResizable Then
'..users expect a sizing arrow
Picture3.MousePointer = vbSizeNWSE
End If
End Sub
Private Sub VScroll1_Change()
Picture2.Top = -VScroll1.Value
End Sub
Private Sub VScroll1_Scroll()
Picture2.Top = -VScroll1.Value
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1.Value
End Sub
Private Sub HScroll1_Scroll()
Picture2.Left = -HScroll1.Value
End Sub
Have a nice day.
Regards,
James
James Smith
www.componentone.com
|
|
|
|
|
Does any one have code to retrieve HardDisk serial no on VB.net 2003. I got some code from internet but its not working.
Thanks & Regards
|
|
|
|
|
U can Try This one also !!!!This is using WMI
Imports System.Management
Dim searcher As New ManagementObjectSearcher( _
"root\CIMV2", _
"SELECT * FROM Win32_PhysicalMedia")
For Each queryObj As ManagementObject in searcher.Get()
Console.WriteLine("HDD Serial No :")
Console.WriteLine("SerialNumber: {0}", queryObj("SerialNumber"))
Next
Happy Programming
-----
Abhijit
|
|
|
|
|
finally, this works for me.
thanks again...
|
|
|
|
|
welcome !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
good day everyone,
i hope you can again help me with this:
code :
dim strVal() as string
dim sVal as string = "a-b-c" - this can be changeable
dim result as string = ""
dim xCnt as integer
strVal = split(sVal, "-")
for xCnt = 0 to strVal -1
result & = strVal(xCnt)
next
first run : result = abc
second run: result = abcabc <<-- this is the problem
the code above runs smoothly, and no errors:
but for the second runtime of the code above it does not clear the previous "strVal" value / results.
how to clear the first result value of "strVal" ?
thank you in advance, your help are highly appreciated.
links/code are most highly appreciated thank you...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Start with result = string.Empty at the top of the loop.
You can't clear an array, it is a fixed size object.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear Friends,
I am trying to run an VB.NET 2003 project in 2005. After the successful conversion, If I run the project it is showing the below error.
"Visual studio cannot start debugging because the debug target "c:\.... project.exe" is missing. Please build the project and retry, or set the output path and Assembly name properties appropriately to point at the correct location for the target assembly"
Please help to avoid this error
Regards
Azeem
|
|
|
|
|
From Build Menu , Rebuild ur Application .....
Hope will work !!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Thank you for your timely reply.
I have tried this but its the same
Regards
Azeem
|
|
|
|
|
There's lot of possible causes... here[^].
|
|
|
|
|
What you need is some code to read and write to a database - sorry but no one here is going to do all you work for you - buy a book. Amazon sell books - please dont let your next post be "Help needed using amzon to buy book".
Dan
At university studying Software Engineering - if i say this line to girls i find they won't talk to me
Dan
|
|
|
|