|
Yes, you're right (well not quite, the msdn help for Image.GetThumbnailImage() says that it looks for an embedded thumbnail first... I guess), but I think I didn't put the right question. If you save a file(TIFF or JPEG) in Photoshop for example, the file is saved along with it's thumbnail (in the actual file, not as a thumbs.db or anything like that... there is a checkbox in the Photoshop Save dialog). I want to know if I can do that with a VB application. Maybe saving the graphics does just that, but I'm not sure (you just said that it doesn't so...).
I hope this makes more sense. I tried to get a thumbnail with DrawImage(...) and it takes about 3-7 seconds for a 4000x4000 TIFF image, while using GetThumbnailImage() takes only 0.4 seconds for the same image (the image was generated in Photoshop with the Thumbnail checkbox checked).
Hope I was explicit enough, thanks for the prompt answer.
|
|
|
|
|
The thumbnail is an extension to the JPEG format. I can't find ANY documentation that says the Image class can save that extension.
All you can do is try to get the thumbnail, then save the Image. Load into Photoshop and see if the thumbnail is there or not.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have the following structure:
This is my object
Public Structure structTransoverride
Public Account_Name As String
Public PolicyNumber As String
Public TransCodeOrig As String
Public TransEffDate As String
Public Override_Action As String
Public Override_New_Renewal As String
Public Override_Transaction_Code As String
Public ModifiedDate As String
Public ModifiedUID As String
Public Plan_Year As String
Public RowNum As Integer
End Structure
I need to initialize it? And set the values in the below subroutine. How do I do this?
I need to initialize it? And set the values in the below subroutine. How do I do this?
NOTE==> It cannot be declared in Sub highLightRow it since it will have to be passed in
the sub routine below called doModify()
objTransoverride.RowNum = hit.Row?
objTransoverride.Account_Name = Convert.ToString(grd.Item(RowNum, 0))
Private Sub highLightRow(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim pt = New Point(e.X, e.Y)
Dim grd As DataGrid = CType(sender, DataGrid)
Dim hit As DataGrid.HitTestInfo = grd.HitTest(pt)
If hit.Type = grd.HitTestType.Cell Then
grd.CurrentCell = New DataGridCell(hit.Row, hit.Column)
objTransoverride.RowNum = hit.Row
grd.Select(objTransoverride.RowNum)
objTransoverride.Account_Name = Convert.ToString(grd.Item(objTransoverride.RowNum, 0))
objTransoverride.PolicyNumber = Convert.ToString(grd.Item(objTransoverride.RowNum, 1))
objTransoverride.TransCodeOrig = Convert.ToString(grd.Item(objTransoverride.RowNum, 2))
objTransoverride.TransEffDate = Convert.ToString(grd.Item(objTransoverride.RowNum, 3))
objTransoverride.Override_Action = Convert.ToString(grd.Item(objTransoverride.RowNum, 4))
objTransoverride.Override_New_Renewal = Convert.ToString(grd.Item(objTransoverride.RowNum, 5))
objTransoverride.Override_Transaction_Code = Convert.ToString(grd.Item(objTransoverride.RowNum, 6))
objTransoverride.ModifiedUID = Convert.ToString(grd.Item(objTransoverride.RowNum, 7))
objTransoverride.ModifiedDate = Convert.ToString(grd.Item(objTransoverride.RowNum, 8))
objTransoverride.Plan_Year = Convert.ToString(grd.Item(objTransoverride.RowNum, 9))
End If
End Sub
Public Sub DoModify()
Dim dTable As DataTable = Me.DataGrid1.DataSource
Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)
Dim dRow As DataRow = CType(bm.Current, DataRowView).Row
Me.lbNumRec.Text = Me.DsTransOverride1.Tables(0).Rows.Count.ToString()
Dim cEditTransOverride As New EditTransOverride
' object being passed
**********************************************
cEditTransOverride.ShowDialog(objTransoverride)
***********************************************
cEditTransOverride.Dispose()
Me.SqlDataAdapter1.Update(Me.DsTransOverride1)
Me.DsTransOverride1.Tables(0).Clear()
Me.SqlDataAdapter1.Fill(Me.DsTransOverride1)
Me.DataGrid1.Refresh()
End Sub
Where do I instantiate or initialize the object and to I make it public?
I will need to do a XXXXX objTransoverride As new structTransoverride ?
I will have this in my dialog form?
'Form overrides dispose to clean up the component list.
Public Overloads Sub ShowDialog(ByRef objTransoverride As structTransoverride)
'
' Do All the work that you want to i.e. the one that you have written in the Load
'
'
MyBase.ShowDialog()
End Sub
|
|
|
|
|
I HAVE SPEND TWO WEEKS ON MY YEAR PROJECT ONLY TO FIND OUT THAT I WAS DOING THE RIGHT THING BUT DID NOT USE ARRAY TO PASS MY PARAMETERS.CAN U HELP ME OUT? PLEASE.
I NEED TO OPEN A FILE USING ARRAYS,DISPLAY THE DATA ON THE CONSOLE AND THATS JUST IT.THE REST I'LL DO IT MYSELF 'CAUSE I DON'T WANT TO STRESS U.
HOPE TO HEAR FROM U SOON.
PLS
Sma
|
|
|
|
|
STOP SHOUTING! Or at least get your caps lock key fixed.
DJSMA wrote:
I NEED TO OPEN A FILE USING ARRAYS,DISPLAY THE DATA ON THE CONSOLE AND THATS JUST IT.
That is not enough information. I don't know what you mean by "open a file using arrays"? Do you mean you want to read the contents of a file into an array of some kind? Do you mean you have multiple files that you need to open and the filenames are stored in an array?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I am building a program in vb.net and I am at final stage of developing reports. My problem is my application is multi-lingual having english and Arabic (right to left ) language. What I want is to build the dynamic reports which can me changed from (left to right) to (right to left) is there any reporting tool which supports this along with dynamic field ?
Crystal do not support such things
|
|
|
|
|
Hi,
Cane somebody help me ..
I've a dataset that has some updated rows and some new inserted rows. Could I use the single update method of data adapter to insert as well update my data ???
|
|
|
|
|
Im still new to vb.NET but I believe that calling the datasets update method will automatically call all required update/insert/delete sql commands to make the database match the changes you have made in the relevant table.
|
|
|
|
|
I have a web site Built with .net. I am geting complaints that the page is scrambles up on mac's I have data grids and such running on the site. HELP!!!!
|
|
|
|
|
One of the projects that has just gone live put a few weeks of the project plan aside for fixing up cross browser problems. We also bought a MacMini for testing purposes.
You need to find out what the problems are. A user report of "the page scrambles up on macs" is not sufficient. And you telling us that "I have data grids and such" is equally vague. You have to see how it "scrambles up" and create some html pages that show the error and an equivalent that shows the result you want. If you cannot see how to get from one to the other you can post a sample and say something like "this HTML works fine in IE but not on Opera, can you tell me where I'm going wrong?"
You can then apply that knowledge to your code. You may have to have lots of conditional statement in your web application to render things differently dependent on the browser it will be serving the page to.
Hopefully this will help you define your problem better so that you can receive the help you need.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thanks Colin I will check into that.
|
|
|
|
|
I need an example using the IDescriptiveContext.
I need an example of converting string to Color Object while it has been saved to string before
militiaware
|
|
|
|
|
How to make a VB.NET program run at startup windows.
militiaware
|
|
|
|
|
The best approach is to create the app as a Windows Service. You can find articles on CP that describe creating services, and the NET help has a basic walkthrough as well.
|
|
|
|
|
For Windows Startup, this would be a Windows Service application.
For when a User Login occurs, you could run a normal application from the Registry Run key.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am working on a touchscreen jukebox program like some of the more modern ones you may have seen in bars or pool halls. It's quite generic right now but I have been playing around with the ListView control to display an accurate representation of the current playlist. I have gotten it so that the user can DragDrop items (music files) in (*not "into" from an outside source..yet) the playlist to alter the order of the songs, i.e. move track 1 to track 3, thus resulting in track 2 becoming track 1 and track 3 becoming track 2. You get the picture. Actually it's quite like the playlist ListView in Windows Media player right now. In any cause, when the user moves the media up and/or down the list I am drawing a line on the ListView Control between the items that the chosen media is to be moved and thus inserted. I am using Graphics and Graphics.DrawLine and it works fine. However, I have to ListView.Refresh() everytime the line changes otherwise a whole bunch of lines will just continue to be drawn on the playlist ListView. It is in Detail Mode Behavior btw. This is all dandy when I have just a few items in the playlist but when I get around 30 or so when I drag an item to be moved the ListView Refreshing causes the control to flicker. Nothing major but annoying and unprofessional. How do I get this to quit? The Media Player for Windows does not flicker. Also on a side note, when the playlist becomes too big for the ListView the scrollbars take effect however on mine I get a horizontal one as well and do not want it. Do I have to resize the ListView when it reaches a certain number of items to accomodate the width of the vertical scrollbar or is there a way to tell the ListView control not to display the horizontal scrollbar at all? Any help, suggestions, or comments would be greatly appreciated.
|
|
|
|
|
Hi guys
my question is simple : Is there a way to dock the main window of an application on top of the screen. When it's dock, any other window maximized (even outside our application) would not be OVER or UNDER our main window? (as the Windows taskbar?)
It would work if we could SET Screen.workingArea() but it is readonly... Any ideas would be welcome... thx
============= --> our main window
------------|
| --> any window
|
|
|
|
------------|
============= --> Windows's taskbar
|
|
|
|
|
So i've been battling this problem for too long now and i'm hoping someone can assit me with either the design aspect or the code aspect (or both, if i'm that lucky).
Here's what i'm trying to do:
- I have a small command line application that basically runs SQL queries and saves the results to .csv files (call this repmake.exe)
-I will have many many instances of repmake.exe all running different sql queries (pass it as parameters when executed)
- I want to write another application to monitor all these RepMaker.exe ones. Ideally, when I launch this Monitor.exe app, it will query all processes, return the ones that are repmake.exe (this part is easy), and .. the hard part.. Give me a one line status message that is set in each repmake.exe
for example.. each repmake.exe would set a variable...
strStatus = "Running report #:3333"
I would like to monitor app to show me all the strStatus' from each repmake that is running.
HOW DO I DO THIS????
I looked into Remoting, but this doesn't seem like a good solution, as the Monitor program won't always be running, just every now and then, and the repmakers will waste too many resources always looking for a client everytime they change their status variable...
any other server-client solution doesn't seem to fit... i need a solution where the Monitor app queries each repmaker.exe for a value....
I could use a database and have all repmakers update that, but I'd rather not..
Any suggestions??
I don't know if this is possible, and maybe someone knows, but I've heard of 'hooking into' other processes and acccessing stuff.. is this viable in this scenario? How do i do this and what would I have to set up on the repmaker's to make this easier?
Thanks again!!!
|
|
|
|
|
Well, instead of querying all these processes...
I've done something similar to this before, except I wasn't getting status messages from a bunch processes on a single machine running an app, rather I was getting statuses of a process running on many servers.
My solution was to setup a Service application on a central server that just listened on a certain port for status messages sent by the worker app's. This service created an internal table of all the servers and what was going on on each of them.
I wrote a second application that just contacted the same service, on a different port, and just asked for the entire table when it started, then at specified intervals, asked for the records that were updated since the last download time. This app then just displayed all the status messages. This way, you could still collect status messages, even if your display app wasn't running.
If you so desired, this same setup could also be used to implement a command channel, with the service managing deployments of commands sent back to the clients doing the work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the reply... This is actually a pretty good idea and will look into it. What did you use for the communication part? Remoting?
|
|
|
|
|
Actually, I used UDP sockets to send messages. In my case, there was no need to have an exact representation of what was going on, so using a connectionless protocol worked nicely.
Remoting will also work. You could probably even use a Web Service to report back to a central database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can i distribute the dot net dll?
We used to distribute active x dll for VB6 VC. At the installation with
installer,
we always reigster the dlls with regsvr32. However for dot net dlls
this doesn't work. I have been going through the web and some told me to use
regasa.exe. some says don't need to register and just ask custoemrs to
provide dot dll files
when developping with vb.net or c#. what is the real solution for this
issue?
SK
|
|
|
|
|
The real solution is to have your customers download the .NET Framework and install it first. You may be able to supply (redistribute) that with your application, but you cannot build it into your installer.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Search the MSDN for "Bootstrapping" + "NET Framework". Microsoft has an executable project that you can download that allows you to redistribute and install the NET Framework as part of your installation package.
|
|
|
|
|
Interesting... Last time I looked they were saying no you cannot do this as we don't allow it. Guess they must have changed their mind....
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|