|
You can set a picture box to show the entire image stretched to fit whatever size the picture box is.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The problem I am having is, what if it is a large image by fitting onto the picture box size it becomes unreadable.
I must be doing something wrong with incoming file.
|
|
|
|
|
By unreadable, do you mean hard to understand ? If you shrink an image by a large amount, it's obviously going to lose all detail.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
True, but how can I shrink the image to such a size that it is readable. Then after that use the scroll bars to view different areas if needed.
Am I making sense?
|
|
|
|
|
You can tell the picturebox to shrink the image. If you want to use scrollbars instead, then you need to handle the drawing yourself, the picturebox becomes useless in this case.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
My application (designed in VB.Net 2.0) works good on local computer but when I deploy on server and try to run from clients I get following error:
'system.data.sqlclient.sqlclientpermission, systemdata Version = 1.0...,culture=neutral publickeytoken = ..... failed'
I have to run this appplication from 100s client computer and can't install on each client.
I have changed permissionSeting on server by using Microsoft .NET Framework Configuration Console and allowed 'FullTrust' for Local_Intranet_Zone, but still having the same error.
Can anyone help me out for this problem.
Regards
|
|
|
|
|
Have you tried something like:
CasPol.exe -m -ag 1.2 -url file://Server/MyShare/* FullTrust
|
|
|
|
|
Hello,
I tried it but still same result. Any idea what this problem could be?
Thanks
Nas
|
|
|
|
|
|
I have a problem concerning a row selection in a datagridview.
If i click on any cell in a specific row in a datagridview, I need it not to do anything, not even change the old selection in another row. I could not find any cancel for the click event on a cell. Do anyone have any solution for my problem?
Datagridview Selection
|
|
|
|
|
Have you tried SelectedIndexChanging, and set e.Cancel = true; ?
|
|
|
|
|
There is no SelectedIndexChanging in the datagridview events.
|
|
|
|
|
I want to trap system mouseup and mousedown events whether they are on any application .
Thanks in advance
Thanks
|
|
|
|
|
I believe you have to look into windows hooks. Install a hook into the OS and handle the wndproc looking for the events as they appear. I have no idea how to do it, but you might be able to narrow you searching.
-- modified at 19:22 Friday 26th January, 2007
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I have a listview on my form whereas my form is the child window of microsoft visio Application. I want to drag image from my listview and drop in visio drawing.
The problem is that how we track the mouse up events in visio because mouseup event does not fire without mousedown event. and my mouse down events fired on my form.
Plase help if someone have idea about that!
Thanks
Thanks
|
|
|
|
|
Sorry if this is elsewhere but I look and could not find.
Can I / How do I create an arrarylist of an object.
For instance for the below object
Public Class Posts
Public Name As String
Public ID As Integer
Public Selected As Boolean
End Class
Cheers
Geoff
|
|
|
|
|
Add a method that creates the ArrayList:
Public Class Posts
Public Name As String
Public ID As Integer
Public Selected As Boolean
Public Function MakeList() as ArrayList
Dim list as New ArrayList();
list.Add(Name);
list.Add(ID);
list.Add(Selected);
Return list;
End Function
End Class
I don't really know if this is the solution you want, as you haven't told anything about what you are trying to accomplish. If it's not, you have to surrender a bit more information...
---
Year happy = new Year(2007);
|
|
|
|
|
Sorry I was not tring to be difficult,
This looks like what I am after I want to create an arrary of the Posts objects (only using this as an example) and the dynamically add to the arrarylist.
How would I use the above to create the list of object and add to them.
Thanks I am strating to see the answer
|
|
|
|
|
Public Class Posts
Public Name As String
Public ID As Integer
Public Selected As Boolean
End Class
dim oArr as new arraylist
------Populate the arraylist ------
dim oPost as new Posts
oPost.Name = "me"
oPost.ID = 1
oPost.Selected=False
oArr.Add (oPost)
oPost = Nothing
oPost = new Posts
oPost.Name = "you"
oPost.ID = 2
oPost.Selected=true
oArr.Add (oPost)
oPost = Nothing
.
.
.
------example to get values out ------
For Each oPost in oArr
Msgbox(oPost.name)
Next
|
|
|
|
|
Aah Clear concise and I even understand
Many Thanks will give it a go.
Cheers
|
|
|
|
|
Ok, Iam stuck again I cobbled together a sort metod in by posts class (see below). When I run the code it works ok if my posts have names C,B, and A but if they have C, B and C no sorting occurs. Any Body got any clues pls
Public Class Form1<br />
Inherits System.Windows.Forms.Form<br />
<br />
Public Class Posts<br />
Implements IComparable<br />
<br />
Public Name As String<br />
Public ID As Integer<br />
Public Selected As Boolean<br />
<br />
Public Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo<br />
<br />
Dim temp As Posts = CType(obj, Posts)<br />
Dim vMe As String = Name<br />
Dim iMe As Integer = ID<br />
Dim mestxt<br />
<br />
mestxt = "Name=" & vMe & ", Id=" & ID & " Temp name=" & temp.Name & " Temp_ID=" & temp.ID<br />
MessageBox.Show(mestxt, "Compare")<br />
<br />
If vMe < temp.Name Then<br />
MessageBox.Show("1")<br />
Return 1<br />
End If<br />
<br />
If vMe > temp.Name Then<br />
Return 0<br />
End If<br />
<br />
End Function<br />
<br />
End Class<br />
<br />
<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim oArr As New ArrayList<br />
Dim mestxt As String<br />
<br />
<br />
Dim oPost As New Posts<br />
oPost.Name = "C"<br />
oPost.ID = 1<br />
oPost.Selected = False<br />
oArr.Add(oPost)<br />
oPost = Nothing<br />
<br />
oPost = New Posts<br />
oPost.Name = "B"<br />
oPost.ID = 2<br />
oPost.Selected = True<br />
oArr.Add(oPost)<br />
oPost = Nothing<br />
<br />
oPost = New Posts<br />
oPost.Name = "C"<br />
oPost.ID = 3<br />
oPost.Selected = True<br />
oArr.Add(oPost)<br />
oPost = Nothing<br />
<br />
mestxt = "Original -> "<br />
For Each oPost In oArr<br />
mestxt = mestxt + oPost.Name & ", "<br />
Next<br />
MessageBox.Show(mestxt)<br />
<br />
oArr.Sort()<br />
oPost = Nothing<br />
oPost = New Posts<br />
<br />
mestxt = mestxt & "Sorted -> "<br />
For Each oPost In oArr<br />
mestxt = mestxt + oPost.Name & ", "<br />
Next<br />
MessageBox.Show(mestxt)<br />
<br />
End Sub<br />
End Class
|
|
|
|
|
Thanks That works fine.
The bit I was having trouble with was I thought you had to link the obeject to the arraylist somehow. I see now that arrarylist will allow you to add to it with whatever you like there is no need to "preset" it to do so.
Thanks again
|
|
|
|
|
Hey I solved my own question.
The problem with my code was I was returning 1 for greater than an zero for <= .
The compare function should return 1 for greater than 0 for equal to and -1 for less than. Phew on to the next stage.
Public Class Posts<br />
Implements IComparable<br />
Public Name As String<br />
Public ID As Integer<br />
Public Selected As Boolean<br />
<br />
Public Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo<br />
Dim temp As Posts = CType(obj, Posts)<br />
Dim mestxt<br />
<br />
If Name > temp.Name Then<br />
Return 1<br />
ElseIf Name = temp.Name Then<br />
Return 0<br />
Else<br />
Return -1<br />
End If<br />
<br />
End Function<br />
<br />
End Class
|
|
|
|
|
Hi,
I have list of Files and Folders containg files in a Directory.
Can anybody say how to bind the names of the folders,files in that
folder in datagrid.
|
|
|
|
|
hi,
im trying to print a barcode on my report using vb6 printer object but i dont have a clue of how to go about doing this,
Pls help
Thabang
im a junior developer at a company called securemail in south africa
|
|
|
|