|
HI,
thanks for reply.
but i want it in vb6.0.
any help related to sendmessage with setbuttoninfo api will greately helpful.
plz help as early as possible.
thanks.
amolk
|
|
|
|
|
I'm trying to develop a app like the office outlook. but i don't know how to make a timesheet like calendar.
Please show me that iss?
Thanks all!
|
|
|
|
|
There are no controls that do this, you need to buy custom controls, or write your own.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi all. I have seen many applications that listview ONLY updates when new data is avilable or when current data changes. I am making an application that deals with similar case. But i don't know how these applications achive this task. I tried to use timer to refresh my listview every few seconds(I am loading data from dynamic xml to listview.)But there is a big problem that i keep losing focus on the form and i see many unnecessary refreshes!! Could any one show me a better solution to avoid these unnecessary refreshes?I know these professional applications are using a method that i am not aware of.Thanks
|
|
|
|
|
The solution is surprisingly simple and you use them every day. They're called "events". If you break your application into seperate layers for UI, business logic, and data, the opportunity to create your own events that signal changes in the data becomes clear. Then all you have to do is subscribe to those events in your UI code and you've got your solution.
|
|
|
|
|
Dave thank you for reply.I am not very experienced vb6 developer.So i need some more information about this process.
In my case i have a listview that it gets data from a dynamic xml file. I use timer to re populate the listview every few seconds. Obviously this cause lots of flicking and lose of form focus and i see lots of unnecessary listview reloads. Could you consider this case and let me know how to reload listview ONLY when new data has arrived. I have seen it many applications doing that but don't know how they do it!! Looking forward for some examples.Thanks
|
|
|
|
|
Since you're reading from an XML file every few seconds, there isn't a simple solution to this. You'd have to implement your own method of detecting changes in the file, like checking the Modified date/time on the file, in order to fire the event.
method007 wrote: Looking forward for some examples
I don't have any.
|
|
|
|
|
Hi Everyone!
I need to keep track of what line the Cursor is on and the position of the cursor on each line in a Rich Text Box. I am trying to get the Speech API to read out the Line/word where the cursor is situated. I am using VB .NET.
Is there any way of determining these values?
Best Regards.
Josh
|
|
|
|
|
Try RTB.GetLineFromCharIndex(RTB.SelectionStart)
|
|
|
|
|
Hello,
I am trying to search for specific text in a file but I would like to use a wildcard and I don't know how to implement it, here is what I have so far:
<br />
If strfilecontent.IndexOf("this is the first part") <> -1 Then<br />
messagebox.show("found")<br />
end if<br />
I would like to know how to use a wildcard so that the following strings be detcted:
"this the first part"
"this is the first part"
"this was the first part"
and I know that I could use multiple If statement however this is just a sample of what I would like, so thats why I would like to use a wildcard so that I wouldn't have to create multiple if statements.
Thanks
Al968
Avast Antivirus-<url>http://www.avast.com<url>
|
|
|
|
|
You can use regular expressions to search your text, but I don't believe there are any classes that offer wildcard support (regex is better anyhow )
www.expresso.com[^] ( I believe ) is the place to download Expresso, an awesome tool for learning regex. There is a version on CP as well, I believe....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I'm getting a syntax error when debugging the code on the following line.
disc1ID = CType(mycmd.ExecuteScalar(), Integer) in the below code. All the error give me to go on is syntax error. ???
Any idea what the problem could be?
Private Sub NewToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripButton.Click<br />
<br />
Dim mycmd As New SqlCommand("SELECT MAX(DiscountId) AS discID FROM(Discountstructure)", MDIParent1.Conn)<br />
mycmd.CommandType = CommandType.Text<br />
<br />
Dim disc1ID As Integer<br />
<br />
MDIParent1.Conn.Open()<br />
disc1ID = CType(mycmd.ExecuteScalar(), Integer)<br />
MDIParent1.Conn.Close()<br />
<br />
MsgBox(disc1ID.ToString)<br />
End Sub
|
|
|
|
|
Remove the parentheses around the table name.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello,
I am creating a user control in the CF 2.0 for a PDA smart device.
When the user creates an instance of the user control it will assign variables to the controls on the user control in its constructor.
However, this works fine for all the controls, apart from the cboUsers, and cboType. The name, and type contain actual string data, and I have checked this with the debugger. When I place the cursor over the combo boxes after the line has been executed, nothing has been assigned and the combo boxes end up with just an empty string.
Does anyone know of a solution to this problem,
many thanks in advance,
Steve
Public Sub New(ByVal name As String, ByVal type As String, ByVal scheduledTime As Date, ByVal< scheduledDate As Date, ByVal details As String, ByVal status As String, ByVal completionNotes As String)<br />
InitializeComponent()<br />
<br />
Me.cboUsers.Text = name 'Does not assign the new name<br />
Me.cboType.Text = type 'Does not asign the new type<br />
Me.dtScheduledTime.Value = scheduledTime<br />
Me.dtScheduledDate.Value = scheduledDate<br />
Me.txtDetails.Text = details<br />
Me.cboStatus.Text = status<br />
Me.txtCompletionNotes.Text = completionNotes<br />
<br />
End Sub
|
|
|
|
|
Hello,
Working in visual studio 2005, I have managed to create, setup, and populate a datagridview as follows:
Dim ds As DataSet = New DataSet
'FILL DATASET
da.Fill(ds, "qryTableReports")
ds.Locale = System.Globalization.CultureInfo.CurrentUICulture
'DISPLAY DATASET TO DATAGRIDVIEW1
DataGridView1.DataSource = ds
DataGridView1.DataMember = "qryTableReports
'SET COLUMN WIDTH
DataGridView1.Columns(0).Width = 25
DataGridView1.Columns(1).Width = 125
DataGridView1.Columns(2).Width = 50
DataGridView1.Columns(3).Width = 50
DataGridView1.Columns(4).Width = 50
DataGridView1.Columns(5).Width = 45
'*** END DATAGRIDVIEW1 SETUP
What I want to do now is to be able to select any row from my data grid, and once selected, it will open up a new form with the dataset from the row selected.
How can I accomplish this? Is the DataGridView control the best control to use in this case?
Thanks in advance.
|
|
|
|
|
Is this a case where you want to have like a list of orders and want to open the specific order on a seperate form when you doubleclick the row on the datagridview or something like that?
|
|
|
|
|
Yes. That is exactly correct.
|
|
|
|
|
OK....I have just been doing the exact same thing and have it working great. Here is what you need to do:
1) Declare a public parameter as integer on the MDIParent form called something like OrderID or whatever
2) on the doubleclick event on the datagridview you need to:
-Get the correct orderID from the datagridview by specifying the correct index (column) value on the currentrow.
-Set the orderID parameter = ID found on the datagridview
3) on your table adapter that is called on the load event on the new form you need to pick up the MDIParent.OrderID in a parameterized fill query.
Let me know if you need some example syntax?
Let me know and I'll post some.
|
|
|
|
|
That's great... Could you please post some sample code? I have declared my variable, but it is not passing the id to the other form when I double click on the datagridview row...
Thanks for your assistance!
-- modified at 12:50 Thursday 10th May, 2007
|
|
|
|
|
Just to clarify....by MDIParent I mean the MDI frame form. I have found that is a stable base to place parameters that need to be shared between forms.
here is a syntax example
Private Sub CustSalesOpportunityDataGridView_CellDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles CustSalesOpportunityDataGridView.CellDoubleClick<br />
<br />
<br />
MDIParent1.SalesOppToOpen = Me.CustSalesOpportunityDataGridView.Item(0, CustSalesOpportunityDataGridView.CurrentRow.Index).Value<br />
<br />
Dim SalesOpportunity As New NewSalesOpportunity()<br />
SalesOpportunity.Show()<br />
End Sub
This should work for you too
|
|
|
|
|
somebody tell me please how to shutdown the system from Visual Basic.NET Windows Application.
I need the code which allow me to do that ..
Actually I'v tried to do it by declaring for an API function and write ExitWindowsEx(....) but it works only for Log Off the system. 'EWX_SHUTDOWN' doesn’t work at all.
thanks for help
|
|
|
|
|
So lets see your code. We'll help you fix yours. We won't write your code for you.
|
|
|
|
|
'In general section
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Integer, ByVal dwReserved As Integer) As Integer
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ExitWindowsEx(EWX_FORCE Or EWX_SHUTDOWN, 0)
End Sub
'' Thanks in advance
|
|
|
|
|
OK. You really need to read the documentation on ExitWindowsEx[^]. If you use 0 for the second parameter, you can delay system shutdown considerably because this tells Windows that this is more-or-less an unplanned shutdown and XP and above will treat it like a crash. The ShutdownReason parameter is there for a reason, use it.
Also, if any application says that it's not OK to shutdown, it can abort the shutdown.
Your ignoring the return code. If this the return code is 0, then an error occured and you'll have to call the Win32 API function GetLastError to figure out why the call failed.
And last, but not least, you need to request the SE_SHUTDOWN_NAME privilege before you call ExitWindowsEx. You can find out how to do this by following the link on the ExitWindowsEx page for AdjustTokenPrivileges.
|
|
|
|
|
Hi
Is there a SIMPLE way to play MP3 and Midi files from within an application - Is there a class that can access media player or something?
What I want to be able to do is to Play, Stop, Adjust Master Volume, and perhaps have a Slider that I can drag to a position in a song.
I found some stuff in C#, but I need it in VB.Net.
I'm using VS2005
|
|
|
|