|
hi all,
i want to know what is the use of these button property
1.accessible description
2. accessible name
3. accessible role
vipin paliwal
|
|
|
|
|
|
Hello,
I want to make a flashing minimized form. I am doing an IP messenger and I wish i can make like msn. When my friend sends me a message while my messenger is minimized .. the minimized form will begin flasing orange. How can i do that!!
Someone help me please
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
You can use FlashWindow. But I don't know whether you can use it with VB
<italic>Work hard, Work effectively.
|
|
|
|
|
You can find the docs on FlashWindow here[^].
Create a Timer that fires every 1000 milliseconds or so. Start the timer only when the form is minimized (Resize event). In the Timer Tick event, check a flag to see if there is a reason to flash the window. If so, call FlashWindow like this:
Declare Auto Function FlashWindow Lib "user32" (ByVal hWnd As IntPtr, ByVal bInvert As Boolean) As Boolean
.
.
.
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
If Me.WindowState = FormWindowState.Minimized Then
Timer1.Interval = 1000
Timer1.Start()
Else
Timer1.Stop()
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static prevState As Boolean
' GetUsersAttention can be a Boolean flag somewhere or
' a method that returns a Boolean value...
If GetUsersAttention Then
prevState = FlashWindow( Me.Handle, Not prevState )
End If
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thank you very much!!! I love you
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
in vb.6 we have Left(string, integer) and right(string, integer) functions
but vb.net don't have what can i do?
|
|
|
|
|
You have to use
Microsoft.VisualBasic.Left(string, integer)<br />
Microsoft.VisualBasic.Right(string, integer)
This is because
Left means WidowForm.Left
Right means WidowForm.Right
Regards,
Chatura Dilan
|
|
|
|
|
Left can be achieved with myString.Substring(0,len)
Right you can do with myString.Substring(myString.Length - len,len)
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
strings.Left(variable,len)
strings.right(...)
Rizwan Bashir
|
|
|
|
|
Hi..below is my code. when i run the code, i got error
" run-time error '3075': syntax error(missing operator) in query expression 'Detail.Room)=Console Room'.
and when i debug, it highlighted at Set rs = DBMain.OpenRecordset(sql1)
i'm using list view component, and will get the data after user choose the room name from combo box.
Hope fully anyone could help me here.... i need it urgently.. Thank you very much..........
Sub Form_Load()
lstVwDetail.ListItems.Clear
Set DBMain = DBEngine.OpenDatabase(App.Path & "\dbDetail.mdb")
sql1 = "SELECT * FROM Detail WHERE (Detail.Room)=" & frmLayout.cbLayout.Text & ""
Set rs = DBMain.OpenRecordset(sql1)
If rs.RecordCount < 1 Then
msg= MsgBox("No Record Found ", vbYesNo, "Not Found")
If msg= vbYes Then
Form1.Show
Else
Exit Sub
End If
Else
rs.MoveFirst
With lstVwDetail.ColumnHeaders
.Clear
.Add , , "Room", 1000
.Add , , "Hostname", 1000
.Add , , "Environment ", 6000
End With
Set ListItemAdd = lstVwDetail.ListItems.Add(, , lstVwDetail.ListItems.Count + 1)
ListItemAdd.SubItems(0) = rs(0)
ListItemAdd.SubItems(1) = rs!Room
ListItemAdd.SubItems(2) = rs!HostName
ListItemAdd.SubItems(3) = rs!Environment
End If
End Sub
|
|
|
|
|
I think your problem is in your SQL statement for returning the recordset.
Try this:
sql1 = "SELECT * FROM DEtail WHERE (Detail.Room)= '" & frmLayout.cboLayout.Text & "';"
When Text parameters must be enclosed in single quotes.
Quecumber256
|
|
|
|
|
Hi Quecumber256, thank you so much for your help. I already tried and it worked but, sadly i have problem with the statement :
Set ListItemAdd = lstVwDetail.ListItems.Add(, , lstVwDetail.ListItems.Count + 1)
'ListItemAdd.SubItems(0) = rs(0)
ListItemAdd.SubItems(1) = rs!Room
ListItemAdd.SubItems(2) = rs!HostName
'ListItemAdd.SubItems(3) = rs!Environment
when i put the quote for bold statement above, no error but the output is not correct. The output should be in table. Just like in Ms Access. Do u have suggestion on this. Actually i already try to use Data Grid with statement :
Sub Form_Load()
Set DBMain = DBEngine.OpenDatabase(App.Path & "\dbDetail.mdb")
sql1 = "SELECT * FROM DEtail WHERE (Detail.Room)= '" & frmLayout.cbLayout.Text & "';"
Set rs = DBMain.OpenRecordset(sql1)
Set DataGrid1.DataSource = rs
End Sub
.....but i got error Type mismatch for Set DataGrid1.DataSource = rs
Can anyone help me?
Thank you so much
|
|
|
|
|
|
looking some1 who can help me in printing reports in landscape(size A4) in vb6
|
|
|
|
|
Hi has some1 ever done a uni project on the subject on vb.net, need some help urgent thanx........
|
|
|
|
|
hi can some1 help me in getting some codes concerning portability of vb.net programs to different computers thanx
Shai
|
|
|
|
|
A .NET program can be run on any computer that has a compatible framework installed. The Mono project[^] supports Linux, Mac OS X, Sun Solaris, BSD and Windows.
---
b { font-weight: normal; }
|
|
|
|
|
I have a problem how to get the current screen resolution
pls help me immmidiately
|
|
|
|
|
Hi,
You can simply get it like this
Dim Resolution As String<br />
Resolution = My.Computer.Screen.WorkingArea.ToString()
Or
Dim x As Integer<br />
Dim y As Integer<br />
x = My.Computer.Screen.WorkingArea.Width<br />
y = My.Computer.Screen.WorkingArea.Height
but note that This property is new in the .NET Framework version 2.0.
Regards,
Chatura Dilan
|
|
|
|
|
vb.net - winforms
MessageBox.Show(Screen.PrimaryScreen.Bounds.Size.ToString())
vb
wid = Screen.Width \ Screen.TwipsPerPixelX
hgt = Screen.Height \ Screen.TwipsPerPixelY
|
|
|
|
|
Sathish, I found another way by your code
I think this support both frameworks 1.1 & 2
wid = Screen.PrimaryScreen.WorkingArea.Width<br />
hgt = Screen.PrimaryScreen.WorkingArea.Height
Regards,
Chatura Dilan
|
|
|
|
|
Thanks alot man!!
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
|
Visual basic 2005 Express Edition:
I have a PrintDocument:
Private WithEvents mDoc As New PrintDocument()
I would like to convert it to a Bitmap, so that I can write it out to disk as a JPEG.
How do I convert a PrintDocument to a Bitmap?
|
|
|
|