|
Do you call the code that updates the screen when the image is deleted ? Why do you expect it to redraw itself, despite the fact it is not ?
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 )
|
|
|
|
|
I am working with VB.Net 2005 and I am looking at an Access 2003 database. What I need to do is open the database, look for a certain value (coming from text box 1) in a certain table (APCHK) and every one of them with that value replace/update with a different specified value (coming from text box 2),then close the database.
What would be the best way to do this? Thanks for any advice you can give me with this.
|
|
|
|
|
In very liberal psuedocode:
OpenDatabase()
ExecuteSQL("Update APCHK Set ColumnName = '" & TextBox2.Text & "' Where ColumnName = '" & TestBox1.Text & "'")
CloseDatabase()
Is that what you are trying to accomplish?
|
|
|
|
|
Hi,
I have a datagrid that needs to show different columns with different widths. So I use TableStyles and GridColumnStyles, no problem.
There are approximately 12 columns, three of which I need to visually jump out. So I figure I'll just make the font for these columns bold, or better yet, change the background color for these three columns only.
But there is neither a font nor a background color property in the GridColumnStyle.
Apparently I just don't know what to ask for in google, or I am the only person in the world who needs differently colored columns, because all I found was ways to change the background color and/or font of a cell / column when it is activated / clicked on / entered.
Any suggestions at all appreciated.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
you have to do the drawing yourself by deriving from datagridtextboxcolumn and then overriding the paint-method.
i found this c#-article being helpful:
Changing the background color of cells in a DataGrid[^]
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
I owe you my gratitude !
I can't say I have it figured out completely yet, but you have certainly managed to point me in the right direction, and given me a little push to boot, thanks.
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I've inherited a large VB6 project (with zero chance of moving it to VB.NET) that I am slowly refactoring, beginning with reading the .ini files. Never mind the way it currently works, I just want to read all the section names, then within each section name, read all the keys and values.
According to the documentation on MSDN, this should be simple. The GetPrivateProfileSectionNames function should give me the section names, then GetPrivateProfileString (with a null for key-name) should give me the list of key/value pairs within the specified section. But they're not working.
When the GetPrivateProfileSectionNames wouldn't work, I tried switching to GetPrivateProfileString and passing it a null for the section name (which according to MSDN should do basically the same thing as GetPrivateProfileSectionNames). Again, no luck.
I could copy all the declarations and usages here (and will if I need to), but was hoping someone else may have experienced the same thing and already recognizes the symptoms and knows the answer.
Any help appreciated.
David
---------
Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code.
http://yosefk.com/c++fqa/picture.html#fqa-6.6
---------
|
|
|
|
|
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
|
|
|
|