|
Can anyone point me to an article or example that shows how to do the following,
i have a picturebox (sizemode = zoom) inside a panel
when double clicking on the picture, it increases the size of the image by a set factor (1.2 times current size each time its double clicked),
although i can scroll to a point after doing this, i want to scroll to the same point in the image. so if the user doubleclicks on an arrow in the image, after the image is made bigger, i want the panel to scroll to where the arrow is again.
any links or help would be great
thanks
|
|
|
|
|
Not sure, but maybe the code samples here[^] will be helpful, especially the Zoom In and Out, and Fit the image in the PictureBox according to the image's true aspect ratio one.
|
|
|
|
|
unfortunately the firewall here at work doesnt allow me to download things so i cant see that code!
|
|
|
|
|
Hi
In my project for shipment i am using FedEx web service.
i get sample code project and wsdl both, i copied n took reference of wsdl it is ok
But when I run my code am getting
Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\0mjvfr_h.0.cs' could not be found
error CS2008: No inputs specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\WINDOWS\TEMP\0mjvfr_h.0.cs' could not be found
error CS2008: No inputs specified
any help from anybody
thanks in advans
ShivashankarThe Value Has Its Value Only Its Value Is Valied
|
|
|
|
|
|
Hello to everyone
I receive the following error message when trying to do some simple remoting tasks on my computer. Can anybody tell the meaning of this message and, if any, suggest a solution please?
Unhandled Exception: System.Security.SecurityException: Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level.
Pleeeease ... don't tell me to search Google (as someone did before) because I have already done so, but it didn't do any better
I also tried typeFilterLevel="Full" ... but, no difference ...
Thank you.
|
|
|
|
|
H[^] is the google search with info on your problem. You may want to read the article I link to in my sig.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all, i need help in extracting the time and date of different files. Example .ppt files... I need to compare the time date so as to know wat file i want to delete. Thanks....
|
|
|
|
|
Do you mean date and time of created file?
If yes you can use the FileInfo
Dim fil As New IO.FileInfo("Your File Name")
MsgBox(fil.CreationTime)
Shay Noy
|
|
|
|
|
Yes almost there.. but the problem is that i need to use the creation time and date to compare with the time and date now and if the file is 4 days old i have to delete it..
|
|
|
|
|
The rest is so trivial, you really need a VB.NET book if you don't know it.
DateTime.Now is the current date/time. If you subtract one DateTime from another, you get a TimeSpan which has a days property.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the advise. I have tried the code and indeed it can show the date but it needs specific URL. What i ask to do is to look through a folder and know all the date of the files inside.. I try edit to use .directory but was unsuccessful. Any other ways that i can do?
|
|
|
|
|
--> Its simple if you read the "File Handling" chapter in any book of vb.net..!
--> You are suppose to go through the folders and search files. How to do it. Its all in the above chapter...!
J A Nasir K
|
|
|
|
|
Summary of my problem:
I have a DLL which generates some messages. I want to pass back a message to a VBA in Excel with the callback function in VBA whenever the message is generated.
Here is what I tried, but encountered a problem.
I have a callback function implemented in a DLL, called Test.dll, written in C as
typedef void (*SHOW_MSG_T) ( const char *message );
void __stdcall SetShowMsg( SHOW_MSG_T func );
I declare the callback and call functions in the Excel VBA as
Public Declare Function SetShowMsg Lib "Test.dll" (ByVal pCallback As Long) As Long
Public Function CallbackShowMessage(ByVal strMsg As String) As Long
MsgBox strMsg
End Function
:
:
:
Dim lRet As Long
lRet = SetShowMsg(AddressOf CallbackShowMessage)
However, when the DLL calls back CallbackShowMessage, I get Microsfot Visaul Basic Run-time error '14': Out of string space in the VBA. I am not sure what's wrong. Maybe the strMsg string in the VBA is not initialized. If that's the case, how do I fix it?
Thank you very much in advance for your help.
Bill
Please email me any comment/suggestion at yuebiao_wang@yahoo.com
|
|
|
|
|
When you invoke the callback from your C code, pass it a global char[] array rather than one that's been allocated on the stack in your local function. That solved the same issue for me.
In other words, instead of this:
int void __stdcall SetShowMsg( SHOW_MSG_T func )
{
char message[1000];
sprintf(message, "something");
func(message);
}
^-- bad
Do this:
char message[1000];
void __stdcall SetShowMsg( SHOW_MSG_T func )
{
sprintf(message, "something");
func(message);
}
Or you could allocate it dynamically (not tested)
void __stdcall SetShowMsg( SHOW_MSG_T func )
{
char *message = new char[1000];
sprintf(message, "something");
func(message);
delete [] message;
}
|
|
|
|
|
--> I m developing a software which will work on a network.
--> The problem is that i want to store the creation date on which the customer is created but not from the software but from the server. How will i do this..?
J A Nasir K
|
|
|
|
|
Where are you storing the data, and what date do you want to store. If you are storing to a SQL Server database if you use the getdate() function it will get the server time. I expect Oracle would work in the same way. An alternative would be to use the UTC date.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Dear All,
I would like to know more if there are anyway to write a program to detect if there are replication of data.
Regards,
Kel
|
|
|
|
|
You can query the system tables in sql server, the information should be available in there somewhere.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I have the following code which i have type for getting the use of refection for button class,
But I got following error
Object reference not set to an instance of an object.
<br />
Public Class Form1<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Dim pobjtype As Type<br />
pobjtype = Nothing<br />
Dim PobjObject As New Object<br />
PobjObject = Nothing<br />
Dim pobjButtons As New Windows.Forms.Button()<br />
PobjObject = pobjButtons.GetType()<br />
<big> For Each PobjObject In pobjtype.GetMembers </big><br />
LstDisplay.Items.Add(PobjObject.ToString())<br />
Next<br />
End Sub<br />
End Class<br />
<br />
Thanks in advance,
amit
|
|
|
|
|
You assign Nothing to the variable pobjtype, and then you try to use it as if it referenced an object.
Did you assign the value to the wrong variable on the line before?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Sorry I didn't get you. Can you please explain with the line code ?
Thanks
|
|
|
|
|
He means that you assign Nothing to variable: pobjtype = Nothing
and then you try to use it
for ... in pobjtype.GetMembers
Shay Noy
|
|
|
|
|
Good Day,
I am busy writing a I2C communication link through the printer port. I need to set up a square wave of 100-400kHz for the I2C clock signal. This is for an EEPROM programmer.
I was going to use the windows timer, but the interval only goes down to 1 ms. I need an interval less than 10 to 2.5 nano second.
I was trying to use system.timers.timer, but am not sure if this is the correct class for what I need to do.
Is there another way to create and interval or a delay in vb.net?
Is there an example implementation for sytem.timers.timer?
Here is my code for system.timers.timer:
Public Class Main
Dim WithEvents myTimer As New System.Timers.Timer
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myTimer_Init()
AddHandler myTimer.Elapsed, AddressOf myTimer_Run
End Sub
Sub myTimer_Init()
With myTimer
.Interval = 0.001
.Enabled = True
End With
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myTimer.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
myTimer.Stop()
End Sub
Dim counter As Long
Sub myTimer_Run()
counter += 1
TextBox1.Text = counter.ToString
End Sub
End Class
Error at runtime: Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on.
|
|
|
|
|
My math was wrong above. its 10 to 2.5 microseconds.
|
|
|
|