|
find the forms OnClosing event, and show a message box from there, if they press yes, just continue and if they press No, you can set e.cancel = True which will stop the form closing.
hope this helps
- Andy
http://www.guardian.co.nr
|
|
|
|
|
Andy, I got it. Thank you so much!
|
|
|
|
|
Glad to be of help
http://www.guardian.co.nr
|
|
|
|
|
Hello,
I just installed Microsoft .NET Framework SDK v1.1.
(http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en)
I need to compile to a DLL a VB file which has a class with some functions.
I know that if I have Visual Studio 2003 installed I would do:
vbc /t:library /out:myFile.dll myFile.vb
Is vbc in Frameword DSK? I can't find it.
Thanks,
Miguel
|
|
|
|
|
Hi guys. I am making a software which also contains a screenshot grabber. I want to draw rubber band selection area box for it. That means I have to draw on screen. I have been able to draw boxes on screen anywhere but they do not get cleaned up when the mouse moves and a new box has to be drawn for that new location. Could somebody please help me out in this. Please remember not for drawing on the form; For drawing on the screen anywhere.
|
|
|
|
|
This[^] article shows how to get the desktop window using interop functions. If you're able to use interop functions, you should be able to use GDI functions as well. In GDI, you can draw using SRCINVERT, which means that your rubber band is created by inverting pixels in the box. Thus, you can undo this operation by doing it again before you change your co-ordinates, and no data is lost. Or you can just call Invalidate() on the desktop window so it refreshes itself before you draw your rubber band ( this could cause flicker )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanx Mr. Graus,
Thanks for the help but I'm sorry I didn't specify that I am working in Visual Basic 6. I know how to get the desktop window's DC and methods to draw on it but during dragging the desktop DC doesn't refresh and doesn't clear the box last drawn.
|
|
|
|
|
I don't get why people still use VB6.....
In that case, this[^] is an article on rubber banding in C++, using different ROP codes. Basically, you select a code that is not destructive, then you draw your rectangle, and you draw it again to restore the old values before drawing a new rectangle elsewhere.
Or you could do the other thing I suggested, which is to Invalidate the desktop window, and force it to redraw.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I think I want to use a DataGrid on a form! What I want to do is have all data in grid "Readonly" and have a link button to open a separate form with all of the data from the selected row for editing: the form will open with the ID of the row from the DataGrid and the edit etc. is done here.
THis is much the same way as I use the asp.net DataGrid. Should I be using a different control or can the DataGrid be changed to do this?
Thanks in advance.
Declan.
|
|
|
|
|
a datagrid allow you to get the selected row (CurrentRowIndex() ) and to get each cell on that row (i don't remember the function name, but it might be something like CurrentCell() ).
then, you recover each cell you like, and pass them to the form that is supposed to treat'em
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
How would i get a list of all Active Computers on a network? All I need are
the computer names. Method that i am currently using lists all
computers even if they're not currently connected to the network.
Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://CORP")
Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry)
Dim resEnt As SearchResult
mySearcher.Filter = ("(objectClass=computer)")
TotalNodesLabel.Text = "Total computers: " + mySearcher.FindAll.Count.ToString
For Each resEnt In mySearcher.FindAll()
If IsNothing(resEnt) = False Then
ListOfNodesListBox.Items.Add(resEnt.GetDirectoryEntry().Name.ToString())
End If
Next
I was hoping to get a list of active computers, this method lists all
computers even if they're not currently connected to the network.
Thanks
Sumit Domyan
|
|
|
|
|
You'll probably have to go down the list your getting and ping them all to determine which ones are live and which are not.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I want to restrict the user to type only 4 characters in the combo box
i have specified in the property max length=4
But its not working
How to do so
Thanks in Advance
|
|
|
|
|
If (myComboBox.Text.Length() >= 4) Then
myComboBox.Text = myComboBox.Text.Left(4);
End If
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Plz send the details about m_myComboBox
Is it some user defined function
|
|
|
|
|
sorry, i just made a copy/paste from a sample of a code of mine...
<br />
m_myComboBox is the same as myComboBox ...
just remove its leading m_
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Sorry,but i am not getting any such property as combobox1.text.left(4)
Left property after text is not coming
|
|
|
|
|
it was in the idea...
do this :
If (myComboBox.Text.Length() >= 4) Then
myComboBox.Text = Left(myComboBox.Text, 4);
End If
is that ok now ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
No,Left() is not taking any parameter
|
|
|
|
|
No,But Left() is not taking any parameter
|
|
|
|
|
Anonymous wrote:
No,But Left() is not taking any parameter
sure it does. but it is into the Microsoft.VisualBasic Namespace (assuming you're working on VB.NET).
MSDN tells
Public Shared Function Left( _
ByVal Str As String, _
ByVal Length As Integer _
) As String
is this[^] satisfy you better now ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Private Sub Combo1_KeyPress(KeyAscii As Integer)
'check for backspace
If KeyAscii = 8 Then
Exit Sub
End If
If Len(Combo1.Text) > 3 Then
KeyAscii = 0
End If
End Sub
<italic>Work hard, Work effectively.
|
|
|
|
|
hai in vb.net it is working check once again
i check now
by
bodanampalli@yahoo.com
|
|
|
|
|
in Property of ComboBox - MaxLength set value 4
then write code which the user try to write more then 4 letter
example:
If ComboBox1.Text > 4 Then
MessageBox("enter only 4 letters")
End If
|
|
|
|
|
seferi wrote:
If ComboBox1.Text > 4 Then
MessageBox("enter only 4 letters")
End If
you shouldn't "spam" the user screen with such a message...
or i didn't like to use your softs...
(hey, i'm joking )
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|