|
Chuck Norris can hit you so hard that he can actually alter your DNA. Decades from now your descendants will occasionally clutch their heads and yell "What The Hell was That?"
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi
I'm using the dwm api to get another application's "form" on my application. It's working great so I have the vista/windows 7 preview window on my application. But I'm now trying to get a screenshot of my application and saving it to a file. When I try to accomplish this I get everything (buttons,pictureboxes etc) but I don't get the preview window (the other application's form).
I have searched around to get some information about how the DWM Thumbnail works, and it seems like it isn't alot information around. What I do know is that the DWM Thumbnail is creating a constant connection between my application and the source application.
My question's are.
------------------
The picture information I get from the DWM is it available in my application or is somehow rendered directly to the graphic card, and isn't really sending the info to my application.
Is it possible to print a screenshot of my application that will work even when my application is not ontop?
Best Regards Henrik
|
|
|
|
|
I have use Text box to my project and i want to implement Undo method of the textbox. When i check CanUndo property of the textbox it always return false.
somebody tell me how can i enable undo method to my textbox.
|
|
|
|
|
It helps to read the documentation on the TextBox class. Undo has already been implemented.
CanUndo tells you if the last operation the user did in the TextBox can be undone or not. It does NOT enable or disable the Undo functionality of the TextBox.
In whatever code you have that lets the user command an undo, you have to check the CanUndo property of the TextBox and then, if true, call the Undo method of the TextBox. You would also look into calling the ClearUndo method if appropriate in your situation.
|
|
|
|
|
Hi mates,
What tools are available to convert Access projects (Forms, Code, Queries,Reports) to Vb.net?
I have a new project now, its an mdb file, they want me to work on vb.net. An access application running in Access 97.
Is this possible to convert in vb.net? It has 20 forms, 50 tables, 200 queries, 4 reports, and 10 modules.
If I will do it in manual it takes a months to do this.
Can anyone tell me how to approach this kind of project.
or should i start from a scratch>?
Thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
modified on Thursday, December 17, 2009 3:24 AM
|
|
|
|
|
i don't know of any tools that will do this, however even if there is one I would not use it. The tool from VB6 to dotnet was dodgy so Access to dotnet would be just plain nasty. Besides how would the tool deal with the database object, tables and queries and reports?
Take the opportunity to write from scratch, you almost certainly will need to anyway.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: he tool from VB6 to dotnet was dodgy
Guess what I have to do for the next 3 months...
|
|
|
|
|
Redesign and rewrite. A rewrite opportunity should always be taken, almost all apps can benefit from a rewrite/refactor.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You speak.. . as if... as if I had a choice...
|
|
|
|
|
Yah, a newbie would be looking into that upgrade/wizardy thing and praying, you are right, reality is you have to rewrite. Look on the bright side, at least the specs are fairly solid.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yeah, ur correct. lots of problem encounter/bugs if i will use a tool. specially in database thing.
anyway thanks guys. i'll start it with scratch.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Hi All
I have a problem....
I want to add a dropdownlist to a datagrid in a GUI application.
This can be done using the [DataGridViewComboBoxColumn Class]
But my problem is this class is only available from .Net Framework 2.0
And i can only use Framework 1.1
Is there any workaround i can use?
I thought about designing a new DataGrid(by Inheriting the standard DataGrid Class)
Is this possible or is there another way to do this?
Any help would be appreciated.
Regards,
Josef
SO? No Help at all? I'm disappointed CP!!
Don't worry, i used 2.0
How to solve a Programing error:
1. Spell check
2. Debug
3. http://www.codeproject.com
modified on Monday, January 11, 2010 6:18 AM
|
|
|
|
|
Dear All,
Now I want structure to similar treeView or listview but the format is like that:
Company_ID------Company_Name----Address--------xxxx------xxxxx (Note: Filed Name)
+ 001-----------Com A-----------st154----------xxxx------xxxxx (Note: Record)
------- + contact Person
--------|------Name------------Position--------Email (Note: Field Name)
--------|------Mr A------------Admin-----------mr.A@yahoo.com (Note: Record)
--------|------Mr B------------Finance---------mr.B@yahoo.com
--------+ Products
--------|------Name---------Kind--------Expired-------xxx-----xxxx
--------|------Pro A--------A-----------1/1/2010------xxx-----xx
--------|------Pro B--------A-----------1/1/2010------xxx-----xx
--------|------Pro C--------B-----------1/1/2010------xxx-----xx
+ 002-----------Com B-----------st154-----------xxxx------xxxx (Note: Record)
--------+ contact Person
--------|--------Name--------Position--------Email (Note: Field Name)
--------|--------Mr C--------Admin-----------mr.A@yahoo.com (Note: Record)
--------|--------Mr D--------Finance--------mr.B@yahoo.com
--------+ Products
--------|--------Name--------Kind------Expired
--------|--------Pro Q--------A -------1/1/2010
--------|--------Pro W--------A --------1/1/2010
--------|--------Pro E--------B --------1/1/2010
Example above is have 3 tables but there relation by Company ID
When I click on + the sub (contact person, Product, and ...) it will show.
and when i click on + of subs (contact person or product...) it will show their data.
I would like to say sorry if my wrote is not clear.
What any tool that can make like that ?
Can you send me the source code ?
Thanks you.
VB.Net
|
|
|
|
|
I would have thought a dataGridView would be a better solution than either Tree or Listview.
Infragistics has a an OutlookExpress style on their treeview that will allow a treeview with columns.
There is an A Much Easier to Use ListView[^] here on CP that does the same and it is free.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have a program that requires several prerequisite programs (such as the Office 2007 compatibility pack). Is there a way for me to write an install program that has these additional programs included (as some sort of resource) that I can launch, wait for the program to exit, and then run the next one, finishing with copying my software and files to a target directory? I know how to execute programs and wait for then to finish through code, just not to sure about how to add multiple EXEs inside a single EXE and execute them individually. I was thinking of adding them almost like how you add icon files and such. Any direction on this would be greatly appreciated.
Dominick
|
|
|
|
|
There may be a more clever way to do it, but for the general case, you should be able to pack them as resources (As you said, just like icons). When it's time to run them, write them out to a temporary file, execute that file, then delete it.
If you want to delve into unmanaged code and REALLY hack it up a bit, there are ways to supply a pointer to the embedded resource and execute it directly... But I wouldn't suggest that route.
|
|
|
|
|
why not just use the pre-requisite packaging feature of the VS Installer project? You should code for the app being missing anyway, and give a nice message to tell the end user to install the missing app.
|
|
|
|
|
Okay...when I decided to read out the files to a temporary file and execute them from there. For a quick test I wrote code that would read the files out byte by byte and the following code worked fine:
Dim sWriter as Stream = Me.GetType.Assembbly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." "JBX2JBN IV.exe")
Dim x as Integer
Dim fFile as New FileStream(TemporaryFolder &" \JBX2JBN IV (Copy).exe",FileMode.OpenOrCreate)
For x = 1 to sWriter.Length
fFile.WriteByte(sWriter.ReadByte)
next
fFile.Close()
After that worked I decided to try and increase speed/performance I would read out chuncks of data and write them to the temporary file. However, when I try the following code it doesn't work:
Dim sWriter As Stream = Me.GetType.Assembly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." + "JBX2JBN IV.exe")
Dim x As Integer
Dim fFile As New FileStream(TemporaryFolder & "\JBX2JBX IV (Copy).exe", FileMode.OpenOrCreate)
Do
sWriter.Read(buffer, 0, 4096)
fFile.Write(buffer, 0, buffer.Length)
Loop While sWriter.Position < sWriter.Length - 1
fFile.Close()
After trying the second block of code however, the file won't run. I get the following error message:
The application failed to initialize properly (oxc000007b). Click on OK to terminate the application.
FYI I declared buffer as Dim buffer(4096) as Byte .
Thanks.
|
|
|
|
|
Alright I got it to work. I changed the code to the following:
Dim buffer(4096) as Byte
Dim sWriter As Stream = Me.GetType.Assembly.GetManifestResourceStream(Assembly.GetExecutingAssembly.GetName.Name() + "." + "JBX2JBN IV.exe")
Dim x As Integer
Dim fFile As New FileStream(TemporaryFolder & "\JBX2JBX IV (Copy).exe", FileMode.OpenOrCreate)
While (x < sWriter.Length)
x += sWriter.Read(buffer, 0, buffer.Length)
fFile.Write(buffer, 0, buffer.Length)
End While
fFile.Close()
Thanks for the help.
|
|
|
|
|
Hi All
I have created a macro to identify a word "and" and highlight it in a word document
First Look at my Macro Function
Public Sub AmESerialComma()
CheckDate
TurnOnTrackChanges
Call Home
With Selection.Find
.ClearFormatting
.Text = ",[!.]@ and [!.]@."
.MatchWildcards = True
.Execute
Do While .Found
With Selection.Range.Duplicate
.Find.Execute FindText:=" and "
.Start = .Start + 1: .End = .End - 1
.HighlightColorIndex = wdBrightGreen
End With
.Execute
Loop
End With
Call Home
RestoreTrackChanges
End Sub
My problem is that when it Goes In "With Selection.Range.Duplicate" Loop the first time it Capture "and" & highlight it .but next time "Selection.Range.Duplicate" is always comes Empty..So its going in Infinite Loop...
Can Any Body solve this problem,,I think after Highligting the text its not getting out from loop..
Please Show me some way
|
|
|
|
|
Hi,
I suppose the answer to this question is simple but I can't seem to find it anywhere.
What I would like to know is:
How do you set the properties of a "FontDialog" box before it opens ?
All I want to do is make it start up with font type "Arial UNICODE MS" at 20 point size instead of the usual "MS sans serif" with 8 point size.
I can't do it now because I am always getting "read only" error message when I try to change anything.
Anybody out there that can point me in the right direction ?
Many thanks for anyone who does.
|
|
|
|
|
Hi again,
Found it in the mean time.
The answer is to modify the ".Font" property of FontDialog. That one is modifiable and it works a treat.
All for now.
|
|
|
|
|
Hi,
I have build application in vb.net 2005 and using Access 2003 database.
When i am compressing database then it is showing error message which is below.
"Could not load file or assembly 'Interop.DAO, Version=5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Any one can suggest me what i am doing wrong and when this type of error occurred.
Thanks in Advance.
Regards
Dharmchand Dhingra
|
|
|
|
|
Simple. You don't have DAO installed on that machine. I wouldn't even use it considering it's older than dirt itself.
Instead of using DAO, use the "Microsoft Jet and Replication Objects" library.
You can find an example of its use here[^].
|
|
|
|
|
Hi
I found the solution of this problem with the help of your reply.
The problem was that on target machine. On target machine .net framework was corrupted. and i repair framework then it is working correct.
Thanks n regards
Dharmchand Dhingra
|
|
|
|