|
what does your code look like to update the boolean column? most likely yuo're just using current row property of the datagrid, and you should be using the currency manager, to get at the currently selected row. just a thought.
-jim
|
|
|
|
|
i need to write a prgram that will sort a 1000 number faster any suggestions.
|
|
|
|
|
Hi all,
I want to write a little function in VB.NET.
It must convert an array of byte ( ex: data as Byte() ) into other types like Integer, Float, Double...
I think the fastest way is copy memory like in C, but VB.NET does not support any such method.
Any help is appreciated, thank you.
|
|
|
|
|
Hi all,
I just found the method to convert to Integer types like Int16, Int32, Int64 by Marshal class: Use the Copy method to copy the data in Byte() into an IntPtr pointer, after that copy the pointer into an integer variable by the ReadInt32 method.
But the problem still exists: the Marshal class does not have any method to copy a pointer into a Single or Double variable.
Anyone have suggestion?
|
|
|
|
|
The .NET Framework has beaten you to this little project. Check out the BitConverter[^] class.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you,
The BitConverter class meets most of my needs, except the String type
|
|
|
|
|
StringBuilder[^] class
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to play a flash movie (.swf) in pocket pc for my application. Could anyone tell me whether it can do or not?
if yes, would you mind tell me how can i do? need any lib or something?
Thanks a lot!
|
|
|
|
|
I think your looking for this[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your reply.
In fact, I want to develop a application which can play flash movie when the user click a hyperlink.
I have flash player. But I don't know whether I can call Pocket IE to run the flash player to play the movie.
Please give me some advices.
Thanks a lot!
|
|
|
|
|
I think all you would have to do is use the Process class to launch IE, giving the full path to the .SWF file as a command line argument. You can find the docs on Process.Start , along with some samples, here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have tried Process.Start. But it cannot be used in .NET Compact Framework. Any other choices?
Thanks!
|
|
|
|
|
Hello,
I am working on a case that would be so painful and time consuming if, there is no such way of doing what i need to do automatically. As you may very well know, applying the same action on a large number of images in photoshop and imageready is pretty easy, as well as it could be extremely tricky at times. Could VB.NET my saviour?
What i need to do is to open files from a number of directories which has the same basic subdirectory construct in which the image file is contained, embed a transparent copyright layer, and export the opened files to their original directories optimised, with a different filename. (The code could do it one at a time. Doesn't have to bulk edit the files.)
This process is something i normally do on a daily basis using my pre-recorded actions in Photoshop 7.0 but with one important difference: this time i don’t have the chance to bulk edit files because they all have the same filename and they are placed in different directories.
I think it would be much better if i give examples at this point:
What i have is a directory with several directories in it, categorized by consept names. In every category named directory there are several different directories with numbers in the end for various contents. The very last of this chain is a directory called XYZ. The image i have to edit is, in XYZ directory.
So the hierarchy would be like:
pictures>>cars>>car1>>XYZ>>image1.gif
pictures>>cars>>car2>>XYZ>>image1.gif
pictures>>cars>>car3>>XYZ>>image1.gif
So the image names are the same and they are located in the same directory hierarchy categorized by directory names.
What i need to execute is to open all the files i have to edit, make my edit then export them (save optimized as) in the same directory with a different filename such as image1D.gif.
Is there anyone to help me with a sample VB.NET code for this purpose? Or is there any kind of tutorial i could use for building image editing/processing applications in VB.NET?
Thank you.
|
|
|
|
|
Read my C# articles on image processing, but I think all you need to do is create a bitmap with your copyright message, and a magenta or limegreen background, draw it over your bitmap using a color key, then save them out. Quite a trivial exercise.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi all,
I want datagrid to be exported to excel (thru button). Following is my code but it is just displaying the header row. P.S.- I'm displaying some data on item databound.
Private Sub btnExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExcel.Click
RenderGridToExcelFormat(dgActivitySummary, "test")
End Sub
'''------------------------------------
Private Sub RenderGridToExcelFormat(ByVal grid As DataGrid, ByVal saveAsFile As String)
' check Excel rows limit
If grid.Items.Count.ToString + 1 < 65536 Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"
HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" & saveAsFile & ".xls")
' Remove the charset from the Content-Type header.
HttpContext.Current.Response.Charset = ""
'HttpContext.Current.Response.WriteFile("style.txt")
' Turn off the view state.
grid.EnableViewState = False
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
' Get the HTML for the control.
grid.HeaderStyle.ForeColor = Color.Black
grid.HeaderStyle.BackColor = Color.Red
grid.ItemStyle.ForeColor = Color.Black
grid.BorderColor = Color.White
ClearControls(grid)
grid.RenderControl(hw)
' Write the HTML back to the browser.
HttpContext.Current.Response.Write(tw.ToString())
' End the response.
HttpContext.Current.Response.End()
Else
HttpContext.Current.Response.Write("Too many rows - Export to Excel not possible")
End If
End Sub
'-----------------------
Sub ClearControls(ByVal control As Control)
Dim i As Integer
For i = control.Controls.Count - 1 To 0 Step -1
ClearControls(control.Controls(i))
Next i
If TypeOf control Is System.Web.UI.WebControls.Image Then
control.Parent.Controls.Remove(control)
End If
If (Not TypeOf control Is TableCell) Then
If Not (control.GetType().GetProperty("SelectedItem") Is Nothing) Then
Dim literal As New LiteralControl
control.Parent.Controls.Add(literal)
Try
literal.Text = CStr(control.GetType().GetProperty("SelectedItem").GetValue(control, Nothing))
Catch
End Try
control.Parent.Controls.Remove(control)
Else
If Not (control.GetType().GetProperty("Text") Is Nothing) Then
Dim literal As New LiteralControl
control.Parent.Controls.Add(literal)
literal.Text = CStr(control.GetType().GetProperty("Text").GetValue(control, Nothing))
control.Parent.Controls.Remove(control)
End If
End If
End If
Return
End Sub 'ClearControls
Please Help...
Thanks,
Hetal Kamdar
|
|
|
|
|
i use the bulk insert statement and my query are like this
BULK INSERT tmpStList FROM 'C:\test1.txt' WITH (FIELDTERMINATOR = ',')
It keep giving me the error message
Server: Msg 4860, Level 16, State 1, Line 1
Could not bulk insert. File 'C:\test1.txt' does not exist.
Anyone know how to solve this? Thank you
|
|
|
|
|
Have you tried copying the .TXT file to the SQL server first, then running this statement?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am kinda lost, can you show me how?
|
|
|
|
|
I am kindda lost, how do you copy .TXT to SQL server, somehow they gave this error
Server: Msg 4861, Level 16, State 1, Line 1
Could not bulk insert because file 'y:\pricefile\test1.txt' could not be opened. Operating system error code 3(The system cannot find the path specified.).
|
|
|
|
|
OK, suppose your SQL Server is installed on one machine. It recognizes the C: drive only on the machine it is residing on. It will not recognize the C: drive on a client machine. So trying to load a file with a path "C:\test1.txt" when the file is on the client will not work, because the SQL Server looks on it's own C: drive for the file and the file does not exist. If you need to run the action from a client, the SQL Server needs to recognize a mapped drive on the client. If you copy the file to the SQL Server machine, use C:\Test1.txt. If your file is on your local machine as C:\Test1.txt, AND your local C: drive is mapped to the SQL Server machine so it recognizes your local C: drive as "Y" then use Y:\Test1.txt.
Hope that makes sense?
Robert
|
|
|
|
|
you're right, thanks rwestgraham. I got it working now.
|
|
|
|
|
I'm making a program in VB.NET to manage concerts, but the problem is that each concert would have it's own database fields since each concert has different kinds of expenses and whatnot. So I thought in order to do this, I could figure out how to create new tables using the language, but I can't seem to figure it out. I've looked through my teacher's manuals and can't seem to find the code for it. I'm using an OLE database made in Microsoft Access.
I found something called datasetname.tables.add but I don't really know how to use it. If someone could help me, I would appreciate it.
|
|
|
|
|
How much do you know about databases? Databases don't have fields and you should not create a table for each concert.
Instead of looking VB manuals, maybe you need to look at some books that explain relational databases, how information is stored in tables, and how the tables are related to each other. If the database is created correctly, you should not have to keep adding tables to it.
|
|
|
|
|
I need to publish the reports which are in VB online,using ASP.ie. to open up the reporst in the Internet explorer browser.Pls send me the solution...as i need to implement immediately...
|
|
|
|
|
That's about a vague a question are you can get. What reports? Generated by what? Crystal Reports? Excel? Access?
Without further information, there's nothing we can do to help you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|